Skip to content

Commit

Permalink
oracle provider: consider srid when looking trying spatial index (fol…
Browse files Browse the repository at this point in the history
…lowup 991f94d; fixes #12230)
  • Loading branch information
jef-n committed Feb 20, 2015
1 parent eb6910e commit 582d009
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/providers/oracle/qgsoracleprovider.cpp
Expand Up @@ -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." )
Expand Down

0 comments on commit 582d009

Please sign in to comment.