Skip to content

Commit

Permalink
oracle provider: don't try to verify requested geometry type in estim…
Browse files Browse the repository at this point in the history
…ated metadata mode
  • Loading branch information
jef-n committed Nov 21, 2016
1 parent c3852c0 commit 39ff97e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/providers/oracle/qgsoracleprovider.cpp
Expand Up @@ -2353,9 +2353,14 @@ bool QgsOracleProvider::getGeometryDetails()
.arg( qry.lastQuery() ), tr( "Oracle" ) );
}

if ( exec( qry, QString( mUseEstimatedMetadata
? "SELECT DISTINCT gtype FROM (SELECT t.%1.sdo_gtype AS gtype FROM %2 t WHERE t.%1 IS NOT NULL AND rownum<100) 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 ( mUseEstimatedMetadata && mRequestedGeomType != QGis::WKBUnknown )
{
QgsDebugMsg( "Trusting requested geometry type" );
detectedType = mRequestedGeomType;
}
else if ( exec( qry, QString( mUseEstimatedMetadata
? "SELECT DISTINCT gtype FROM (SELECT t.%1.sdo_gtype AS gtype FROM %2 t WHERE t.%1 IS NOT NULL AND rownum<100) 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 39ff97e

Please sign in to comment.