Skip to content
Permalink
Browse files

oracle provider: consider srid when looking trying spatial index (fol…

…lowup 991f94d; fixes #12230)
  • Loading branch information
jef-n committed Feb 20, 2015
1 parent be1c07f commit d001c9d97fab293880063cfeffc83bab69fe3067
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/providers/oracle/qgsoracleprovider.cpp
@@ -694,9 +694,10 @@ bool QgsOracleProvider::loadFields()

if ( !mHasSpatialIndex )
{
mHasSpatialIndex = qry.exec( QString( "SELECT %2 FROM %1 WHERE sdo_filter(%2,mdsys.sdo_geometry(2003,NULL,NULL,mdsys.sdo_elem_info_array(1,1003,3),mdsys.sdo_ordinate_array(1,1,-1,-1)))='TRUE'" )
mHasSpatialIndex = qry.exec( QString( "SELECT %2 FROM %1 WHERE sdo_filter(%2,mdsys.sdo_geometry(2003,%3,NULL,mdsys.sdo_elem_info_array(1,1003,3),mdsys.sdo_ordinate_array(1,1,-1,-1)))='TRUE'" )
.arg( mQuery )
.arg( quotedIdentifier( mGeometryColumn ) ) );
.arg( quotedIdentifier( mGeometryColumn ) )
.arg( mSrid < 1 ? "NULL" : QString::number( mSrid ) ) );
if ( !mHasSpatialIndex )
{
QgsMessageLog::logMessage( tr( "No spatial index on column %1.%2.%3 found - expect poor performance." )

0 comments on commit d001c9d

Please sign in to comment.
You can’t perform that action at this time.