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>
This commit is contained in:
parent
db92f2f3aa
commit
52b85212a2
@ -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();
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user