mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
ogr provider: limit mysql driver to requested layer
This commit is contained in:
parent
e5dbd186d8
commit
536135a3f4
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user