Skip to content
Permalink
Browse files

oracle provider: don't reject (none no)geometry queries on tables wit…

…hout geometry (fixes #11843)
  • Loading branch information
jef-n committed Dec 11, 2014
1 parent 2b210a5 commit e5e85a5445b469de99b7bfc7c70fe2534ce76482
Showing with 2 additions and 7 deletions.
  1. +2 −7 src/providers/oracle/qgsoraclefeatureiterator.cpp
@@ -137,7 +137,7 @@ bool QgsOracleFeatureIterator::fetchFeature( QgsFeature& feature )

int col = 0;

if (( mRequest.flags() & QgsFeatureRequest::NoGeometry ) == 0 ||
if ((( mRequest.flags() & QgsFeatureRequest::NoGeometry ) == 0 && !mSource->mGeometryColumn.isNull() ) ||
(( mRequest.flags() & QgsFeatureRequest::ExactIntersect ) != 0 && !mConnection->hasSpatial() ) )
{
QByteArray *ba = static_cast<QByteArray*>( mQry.value( col++ ).data() );
@@ -262,16 +262,11 @@ bool QgsOracleFeatureIterator::close()

bool QgsOracleFeatureIterator::openQuery( QString whereClause )
{
if (( mRequest.flags() & QgsFeatureRequest::NoGeometry ) == 0 && mSource->mGeometryColumn.isNull() )
{
return false;
}

try
{
QString query = "SELECT ", delim = "";

if (( mRequest.flags() & QgsFeatureRequest::NoGeometry ) == 0 )
if (( mRequest.flags() & QgsFeatureRequest::NoGeometry ) == 0 && !mSource->mGeometryColumn.isNull() )
{
query += QgsOracleProvider::quotedIdentifier( mSource->mGeometryColumn );
delim = ",";

0 comments on commit e5e85a5

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