Skip to content

Commit

Permalink
[ogr provider] insure connection pool updated when subset sql added/c…
Browse files Browse the repository at this point in the history
…hanged (#5174)
  • Loading branch information
nirvn committed Sep 12, 2017
1 parent 9c4d1da commit a45913b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -555,7 +555,12 @@ bool QgsOgrProvider::setSubsetString( const QString& theSQL, bool updateFeatureC
uri += QString( "|geometrytype=%1" ).arg( ogrWkbGeometryTypeName( mOgrGeometryTypeFilter ) );
}

setDataSourceUri( uri );
if ( uri != dataSourceUri() )
{
QgsOgrConnPool::instance()->unref( dataSourceUri() );
setDataSourceUri( uri );
QgsOgrConnPool::instance()->ref( dataSourceUri() );
}

OGR_L_ResetReading( ogrLayer );

Expand Down

0 comments on commit a45913b

Please sign in to comment.