Skip to content
Permalink
Browse files

MSSQL and DB2: Use trust datasource config flag

  • Loading branch information
rldhont committed Sep 9, 2020
1 parent 760347c commit 74ffc1a0936af44e23e9351d0e42c4a93d8321d2
Showing with 8 additions and 0 deletions.
  1. +4 −0 src/providers/db2/qgsdb2provider.cpp
  2. +4 −0 src/providers/mssql/qgsmssqlprovider.cpp
@@ -63,6 +63,10 @@ QgsDb2Provider::QgsDb2Provider( const QString &uri, const ProviderOptions &optio
QgsDebugMsg( "mExtents " + mExtents );

mUseEstimatedMetadata = anUri.useEstimatedMetadata();
if ( mReadFlags & QgsDataProvider::FlagTrustDataSource )
{
mUseEstimatedMetadata = true;
}
QgsDebugMsg( QStringLiteral( "mUseEstimatedMetadata: '%1'" ).arg( mUseEstimatedMetadata ) );
mSqlWhereClause = anUri.sql();
QString errMsg;
@@ -79,6 +79,10 @@ QgsMssqlProvider::QgsMssqlProvider( const QString &uri, const ProviderOptions &o
mHost = anUri.host();

mUseEstimatedMetadata = anUri.useEstimatedMetadata();
if ( mReadFlags & QgsDataProvider::FlagTrustDataSource )
{
mUseEstimatedMetadata = true;
}

mDisableInvalidGeometryHandling = anUri.hasParam( QStringLiteral( "disableInvalidGeometryHandling" ) )
? anUri.param( QStringLiteral( "disableInvalidGeometryHandling" ) ).toInt()

0 comments on commit 74ffc1a

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