Skip to content

Commit

Permalink
[oracle] Fix detection of geometry type when table contains some
Browse files Browse the repository at this point in the history
empty geometries

On behalf of Faunalia, sponsored by ENEL
  • Loading branch information
nyalldawson committed Jul 6, 2016
1 parent f1a15e3 commit fe93e62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/oracle/qgsoracleprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2289,8 +2289,8 @@ bool QgsOracleProvider::getGeometryDetails()
}

if ( exec( qry, QString( mUseEstimatedMetadata
? "SELECT DISTINCT gtype FROM (SELECT t.%1.sdo_gtype AS gtype FROM %2 t WHERE rownum<1000) WHERE rownum<=2"
: "SELECT DISTINCT t.%1.sdo_gtype FROM %2 t WHERE rownum<=2" ).arg( quotedIdentifier( geomCol ) ).arg( mQuery ) ) )
? "SELECT DISTINCT gtype FROM (SELECT t.%1.sdo_gtype AS gtype FROM %2 t WHERE t.%1 IS NOT NULL AND rownum<1000) WHERE rownum<=2"
: "SELECT DISTINCT t.%1.sdo_gtype FROM %2 t WHERE t.%1 IS NOT NULL AND rownum<=2" ).arg( quotedIdentifier( geomCol ) ).arg( mQuery ) ) )
{
if ( qry.next() )
{
Expand Down

0 comments on commit fe93e62

Please sign in to comment.