Skip to content

Commit

Permalink
oracle provider: don't reject (none no)geometry queries on tables wit…
Browse files Browse the repository at this point in the history
…hout geometry (fixes #11843)
  • Loading branch information
jef-n committed Dec 11, 2014
1 parent 2b210a5 commit e5e85a5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/providers/oracle/qgsoraclefeatureiterator.cpp
Expand Up @@ -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() );
Expand Down Expand Up @@ -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 = ",";
Expand Down

0 comments on commit e5e85a5

Please sign in to comment.