1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(db): prepare and execute queued statements one at a time

* Allows for queued preparations to depend on the execution of previous statements
This commit is contained in:
Anthony Bilinski 2019-05-15 15:15:34 -07:00
parent 7cd20f0e28
commit af02542e05
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -744,10 +744,9 @@ void RawDatabase::process()
} }
curParam += nParams; curParam += nParams;
} while (compileTail != query.query.data() + query.query.size()); } while (compileTail != query.query.data() + query.query.size());
}
// Execute each statement of each query of our transaction
for (Query& query : trans.queries) { // Execute each statement of each query of our transaction
for (sqlite3_stmt* stmt : query.statements) { for (sqlite3_stmt* stmt : query.statements) {
int column_count = sqlite3_column_count(stmt); int column_count = sqlite3_column_count(stmt);
int result; int result;