Skip to content
Permalink
Browse files

ogr provider: limit mysql driver to requested layer

  • Loading branch information
jef-n committed May 9, 2015
1 parent e5dbd18 commit 536135a3f4f453d9a93dc2e83a1c2c5278e3bfd3
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/providers/ogr/qgsogrprovider.cpp
@@ -366,6 +366,11 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
QgsDebugMsg( "mSubsetString: " + mSubsetString );
CPLSetConfigOption( "OGR_ORGANIZE_POLYGONS", "ONLY_CCW" ); // "SKIP" returns MULTIPOLYGONs for multiringed POLYGONs

if ( mFilePath.startsWith( "MySQL:" ) && !mLayerName.isEmpty() )
{
mFilePath += ",tables=" + mLayerName;
}

// first try to open in update mode (unless specified otherwise)
if ( !openReadOnly )
ogrDataSource = OGROpen( TO8F( mFilePath ), true, &ogrDriver );

0 comments on commit 536135a

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