Skip to content

Commit 7f61dc4

Browse files
committed
Fix spatialite text pks and other issues
... also fixes the geometry information query when spatialite version is >= 4 Fixes #21176 With tests
1 parent 7e106ef commit 7f61dc4

File tree

4 files changed

+284
-168
lines changed

4 files changed

+284
-168
lines changed

src/providers/spatialite/qgsspatialitefeatureiterator.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ bool QgsSpatiaLiteFeatureIterator::prepareStatement( const QString &whereClause,
355355
if ( limit >= 0 )
356356
sql += QStringLiteral( " LIMIT %1" ).arg( limit );
357357

358-
// qDebug() << sql;
358+
QgsDebugMsgLevel( sql, 4 );
359359

360360
if ( sqlite3_prepare_v2( mHandle->handle(), sql.toUtf8().constData(), -1, &sqliteStatement, nullptr ) != SQLITE_OK )
361361
{
@@ -515,6 +515,7 @@ bool QgsSpatiaLiteFeatureIterator::getFeature( sqlite3_stmt *stmt, QgsFeature &f
515515
}
516516
else
517517
{
518+
QgsDebugMsgLevel( QStringLiteral( "Primary key is not an integer field: setting autoincrement fid" ), 3 );
518519
// autoincrement a row number
519520
mRowNumber++;
520521
feature.setId( mRowNumber );

0 commit comments

Comments
 (0)