1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

oo #1 api: correct a case where a null callback is called. Rename some vars for clarity. Increase wasm-side memory in order to be able to load the speedtest1 output.

FossilOrigin-Name: b5058f14fadbc8a1886f27cff08593dd2c8e2b2cb6d7bed3b8733a55f031989f
This commit is contained in:
stephan
2022-08-29 08:04:55 +00:00
parent a3825e78bd
commit d7d1098baa
4 changed files with 13 additions and 12 deletions

View File

@ -521,7 +521,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
? opt.rowMode : undefined);
let stmt;
let bind = opt.bind;
let doneFirstQuery = false/*true once we handle a result-returning query*/;
let runFirstQuery = !!(arg.cbArg || opt.columnNames) /* true to evaluate the first result-returning query */;
const stack = wasm.scopedAllocPush();
try{
const isTA = util.isSQLableTypedArray(arg.sql)
@ -565,14 +565,14 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
stmt.bind(bind);
bind = null;
}
if(!doneFirstQuery && stmt.columnCount){
if(runFirstQuery && stmt.columnCount){
/* Only forward SELECT results for the FIRST query
in the SQL which potentially has them. */
doneFirstQuery = true;
runFirstQuery = false;
if(Array.isArray(opt.columnNames)){
stmt.getColumnNames(opt.columnNames);
}
while(stmt.step()){
while(!!arg.cbArg && stmt.step()){
stmt._isLocked = true;
const row = arg.cbArg(stmt);
if(resultRows) resultRows.push(row);