diff options
author | Andy Shaw <andy.shaw@qt.io> | 2017-12-07 16:01:48 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2018-01-02 06:32:16 +0000 |
commit | 52b85212a2ec8ec5bf187f6cd00b669a45bcf0bd (patch) | |
tree | cbf15416a504b005bb38627e0af7d043b41e8c9c /src | |
parent | db92f2f3aac60218756a1aa8811cf192acc0b0e6 (diff) |
sqlite: Check that there are values to be set when binding
If the values vector is empty then we know already that the paramCount
will still be invalid, so we should just accept that and not check the
reused named placeholders.
Task-number: QTBUG-64923
Change-Id: Ifaa755540c4574f1f76d3f9f129bf0f66b837b70
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp index e9f5ee9508..67dd1a6ee5 100644 --- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp +++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp @@ -467,7 +467,7 @@ bool QSQLiteResult::exec() #if (SQLITE_VERSION_NUMBER >= 3003011) // In the case of the reuse of a named placeholder - if (!paramCountIsValid) { + if (paramCount < values.count()) { const auto countIndexes = [](int counter, const QList<int>& indexList) { return counter + indexList.length(); }; |