Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ogr provider: limit mysql driver to requested layer
  • Loading branch information
jef-n committed May 9, 2015
1 parent e5dbd18 commit 536135a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 536135a

Please sign in to comment.