Opened 10 years ago

Closed 7 years ago

Last modified 7 years ago

#5552 closed defect (fixed)

OCI doesn't check unquoted tablename for OCI_PTYPE_VIEW

Reported by: alexkusace Owned by: warmerdam
Priority: normal Milestone: 2.2.2
Component: default Version: svn-trunk
Severity: normal Keywords: OCI
Cc:

Description (last modified by Jukka Rahkonen)

There is an error in the trunk of ogrocitablelayer.cpp, on line 202 and 203. The comment says "View name unquoted", but it's passing the osQuotedTableName and osQuotedTablename.length() to OCIDescribeAny.

History: In GDAL 1.9, function OGROCITableLayer::ReadTableDefinition ran OCIDescribeAny on the tablename, querying the DB with OCI_PTYPE_TABLE and OCI_PTYPE_VIEW.

Ticket #4966 and Changeset #r25656 put quotes around the tablename to help it work with NAS and special/keyword tablenames. As I understand, this broke some features.

To fix the bugs introduced with r25656, changeset r25759 is supposed to run OCIDescribeAny on the unquoted tablename as well as the quoted tablename, querying both OCI_PTYPE_TABLE and OCI_PTYPE_VIEW. Instead of using the unquoted tablename, it queries the OCI_PYTPE_VIEW twice with the quoted tablename.

Change History (4)

comment:1 by Jukka Rahkonen, 9 years ago

Description: modified (diff)

comment:2 by Even Rouault, 7 years ago

Resolution: fixed
Status: newclosed

In 39941:

OCI: check view with unquoted table name (patch by geoguid, https://github.com/OSGeo/gdal/pull/236, fixes #5552)

comment:3 by Even Rouault, 7 years ago

In 39942:

OCI: check view with unquoted table name (patch by geoguid, https://github.com/OSGeo/gdal/pull/236, fixes #5552)

comment:4 by Even Rouault, 7 years ago

Milestone: 2.2.2
Note: See TracTickets for help on using tickets.