Opened 12 years ago
Closed 5 years ago
#4694 closed defect (wontfix)
Oracle driver writes to metadata table when reading
Reported by: | marcbria | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | OGR_SF | Version: | svn-trunk |
Severity: | critical | Keywords: | Oracle, OCI, OGR |
Cc: | msmitherdc, ilucena, andersmoe |
Description (last modified by )
This bug causes two erroneous things to happen:
- Connecting to an Oracle database and then disconnecting causes the Oracle driver to write updated extents information to the SDO_GEOM_METADATA_TABLE table for all detected layers.
- If a user connects using an OCI connection string which specifies a table name but that table either does not exist in the database or is not a spatial layer it is also written to the SDO_GEOM_METADATA_TABLE. If the user subsequently tries to connect and disconnect a duplicate record exception is thrown.
My proposed solution involves modifying ogrocitablelayer.cpp
- Set the boolean flag bExtentUpdated to false during the OGROCITableLayer() constructor. This way when the connection is destroyed and SyncToDisk() gets called the UpdateLayerExtents() method will not save updated extents to the SDO_GEOM_METADATA_TABLE unless new features have been added or removed.
- Restore the code in UpdateLayerExtents() which looks for a degenerate extent and does not update the SDO_GEOM_METADATA_TABLE accordingly.
I've made these modifications on my own and they do not appear to have any adverse effects however I don't have a complete understanding of the OGR drivers and I'm not sure what ramifications it may have.
Attachments (1)
Change History (6)
comment:1 by , 12 years ago
Description: | modified (diff) |
---|
comment:2 by , 12 years ago
Cc: | added |
---|---|
Component: | default → OGR_SF |
comment:3 by , 12 years ago
If you want to send your changes as a patch we could integrate it on trunk.
by , 12 years ago
Attachment: | ogrocitablelayer.patch added |
---|
comment:5 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
The offending change seems to have been related to #4079.
I'm not sure that I will have time to work on this, so anyone else is welcome to take a crack at it.