@@ -1356,7 +1356,7 @@ bool QgsOgrProvider::createSpatialIndex()
1356
1356
{
1357
1357
QByteArray sql = " CREATE SPATIAL INDEX ON " + quotedIdentifier ( layerName ); // quote the layer name so spaces are handled
1358
1358
QgsDebugMsg ( QString ( " SQL: %1" ).arg ( FROM8 ( sql ) ) );
1359
- OGR_DS_ExecuteSQL ( ogrDataSource, sql.constData (), OGR_L_GetSpatialFilter ( ogrOrigLayer ), " " );
1359
+ OGR_DS_ExecuteSQL ( ogrDataSource, sql.constData (), OGR_L_GetSpatialFilter ( ogrOrigLayer ), nullptr );
1360
1360
}
1361
1361
1362
1362
QFileInfo fi ( mFilePath ); // to get the base name
@@ -1369,9 +1369,9 @@ bool QgsOgrProvider::createAttributeIndex( int field )
1369
1369
{
1370
1370
QByteArray quotedLayerName = quotedIdentifier ( OGR_FD_GetName ( OGR_L_GetLayerDefn ( ogrOrigLayer ) ) );
1371
1371
QByteArray dropSql = " DROP INDEX ON " + quotedLayerName;
1372
- OGR_DS_ExecuteSQL ( ogrDataSource, dropSql.constData (), OGR_L_GetSpatialFilter ( ogrOrigLayer ), " SQL " );
1372
+ OGR_DS_ExecuteSQL ( ogrDataSource, dropSql.constData (), OGR_L_GetSpatialFilter ( ogrOrigLayer ), nullptr );
1373
1373
QByteArray createSql = " CREATE INDEX ON " + quotedLayerName + " USING " + mEncoding ->fromUnicode ( fields ()[field].name () );
1374
- OGR_DS_ExecuteSQL ( ogrDataSource, createSql.constData (), OGR_L_GetSpatialFilter ( ogrOrigLayer ), " SQL " );
1374
+ OGR_DS_ExecuteSQL ( ogrDataSource, createSql.constData (), OGR_L_GetSpatialFilter ( ogrOrigLayer ), nullptr );
1375
1375
1376
1376
QFileInfo fi ( mFilePath ); // to get the base name
1377
1377
// find out, if the .idm file is there
@@ -2434,7 +2434,7 @@ void QgsOgrProvider::uniqueValues( int index, QList<QVariant> &uniqueValues, int
2434
2434
sql += " ORDER BY " + mEncoding ->fromUnicode ( fld.name () ) + " ASC" ; // quoting of fieldname produces a syntax error
2435
2435
2436
2436
QgsDebugMsg ( QString ( " SQL: %1" ).arg ( mEncoding ->toUnicode ( sql ) ) );
2437
- OGRLayerH l = OGR_DS_ExecuteSQL ( ogrDataSource, sql.constData (), nullptr , " SQL " );
2437
+ OGRLayerH l = OGR_DS_ExecuteSQL ( ogrDataSource, sql.constData (), nullptr , nullptr );
2438
2438
if ( !l )
2439
2439
{
2440
2440
QgsDebugMsg ( " Failed to execute SQL" );
@@ -2472,7 +2472,7 @@ QVariant QgsOgrProvider::minimumValue( int index )
2472
2472
sql += " WHERE " + mEncoding ->fromUnicode ( mSubsetString );
2473
2473
}
2474
2474
2475
- OGRLayerH l = OGR_DS_ExecuteSQL ( ogrDataSource, sql.constData (), nullptr , " SQL " );
2475
+ OGRLayerH l = OGR_DS_ExecuteSQL ( ogrDataSource, sql.constData (), nullptr , nullptr );
2476
2476
if ( !l )
2477
2477
{
2478
2478
QgsDebugMsg ( QString ( " Failed to execute SQL: %1" ).arg ( mEncoding ->toUnicode ( sql ) ) );
@@ -2511,7 +2511,7 @@ QVariant QgsOgrProvider::maximumValue( int index )
2511
2511
sql += " WHERE " + mEncoding ->fromUnicode ( mSubsetString );
2512
2512
}
2513
2513
2514
- OGRLayerH l = OGR_DS_ExecuteSQL ( ogrDataSource, sql.constData (), nullptr , " SQL " );
2514
+ OGRLayerH l = OGR_DS_ExecuteSQL ( ogrDataSource, sql.constData (), nullptr , nullptr );
2515
2515
if ( !l )
2516
2516
{
2517
2517
QgsDebugMsg ( QString ( " Failed to execute SQL: %1" ).arg ( mEncoding ->toUnicode ( sql ) ) );
0 commit comments