Skip to content
Permalink
Browse files

ogr provider: avoid GDAL #4509 (fixes #8232)

  • Loading branch information
jef-n committed Jul 8, 2013
1 parent abd7533 commit bf1d1b0453ba5bc274cc3a960a2cb6de4e061ee4
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/providers/ogr/qgsogrprovider.cpp
@@ -2122,6 +2122,10 @@ void QgsOgrProvider::uniqueValues( int index, QList<QVariant> &uniqueValues, int
return; //not a provider field
}

#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM < 1910
// avoid GDAL #4509
return QgsVectorDataProvider::uniqueValues( index, uniqueValues, limit );
#else
QString theLayerName = FROM8( OGR_FD_GetName( OGR_L_GetLayerDefn( ogrLayer ) ) );

QString sql = QString( "SELECT DISTINCT %1 FROM %2" )
@@ -2151,6 +2155,7 @@ void QgsOgrProvider::uniqueValues( int index, QList<QVariant> &uniqueValues, int
}

OGR_DS_ReleaseResultSet( ogrDataSource, l );
#endif
}

QVariant QgsOgrProvider::minimumValue( int index )

0 comments on commit bf1d1b0

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