Skip to content

Commit

Permalink
ogr provider: limit mysql driver to requested layer
Browse files Browse the repository at this point in the history
(cherry picked from commit 536135a)
  • Loading branch information
jef-n committed May 27, 2015
1 parent c165e1f commit f68cfc7
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 f68cfc7

Please sign in to comment.