diff --git a/ext/wasm/GNUmakefile b/ext/wasm/GNUmakefile index 25d1e98084..6a0835ece4 100644 --- a/ext/wasm/GNUmakefile +++ b/ext/wasm/GNUmakefile @@ -294,10 +294,12 @@ $(speedtest1): $(MAKE) -C ../.. speedtest1 speedtest1.sql: $(speedtest1) $(speedtest1) --script $@ -batch-sql.in := $(sort $(wildcard *.sql)) -batch-runner.list: $(batch-sql.in) $(MAKEFILE) speedtest1.sql +speedtest1-000.sql: + echo "select 1;" > $@ +batch-runner.list: $(MAKEFILE) speedtest1.sql speedtest1-000.sql bash split-speedtest1-script.sh speedtest1.sql - ls -1 *.sql | sort > $@ + ls -1 *.sql | grep -v speedtest1.sql | sort > $@ +CLEAN_FILES += batch-runner.list speedtest1*.sql batch: batch-runner.list ######################################################################## diff --git a/ext/wasm/api/sqlite3-api-oo1.js b/ext/wasm/api/sqlite3-api-oo1.js index 5d4b19b5a9..2cfb478865 100644 --- a/ext/wasm/api/sqlite3-api-oo1.js +++ b/ext/wasm/api/sqlite3-api-oo1.js @@ -540,7 +540,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ if(isTA) wasm.heap8().set(arg.sql, pSql); else wasm.jstrcpy(arg.sql, wasm.heap8(), pSql, sqlByteLen, false); wasm.setMemValue(pSql + sqlByteLen, 0/*NUL terminator*/); - while(wasm.getMemValue(pSql, 'i8') + while(pSql && wasm.getMemValue(pSql, 'i8') /* Maintenance reminder:^^^ _must_ be 'i8' or else we will very likely cause an endless loop. What that's doing is checking for a terminating NUL byte. If we @@ -548,8 +548,8 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ around the NUL terminator, and get stuck in and endless loop at the end of the SQL, endlessly re-preparing an empty statement. */ ){ - wasm.setMemValue(ppStmt, 0, wasm.ptrIR); - wasm.setMemValue(pzTail, 0, wasm.ptrIR); + wasm.setPtrValue(ppStmt, 0); + wasm.setPtrValue(pzTail, 0); DB.checkRc(this, capi.sqlite3_prepare_v3( this.pointer, pSql, sqlByteLen, 0, ppStmt, pzTail )); diff --git a/ext/wasm/batch-runner.html b/ext/wasm/batch-runner.html index f5031f8fe1..c91e591553 100644 --- a/ext/wasm/batch-runner.html +++ b/ext/wasm/batch-runner.html @@ -24,35 +24,48 @@
ACHTUNG: this file requires a generated input list +
+ This page is for running extracts from the output of speedtest --script. +
+ACHTUNG: this file requires a generated input list file. Run "make batch" from this directory to generate it.
-WARNING: if the WASMFS/OPFS layer crashes, this page may +
WARNING: if the WASMFS/OPFS layer crashes, this page may become completely unresponsive and need to be closed and reloaded to recover.