1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-24 09:53:10 +03:00

Get all but 3 of the tester1.js test groups running in 64-bit builds. The outliers are virtual tables and commit/rollback/update hooks.

FossilOrigin-Name: c135d9743698b3331e56f72160e2b78840aa2c8fa1a70daea9d4a0952dbda186
This commit is contained in:
stephan
2025-09-20 18:51:10 +00:00
parent a8756afdbc
commit 832dfd97d1
6 changed files with 58 additions and 30 deletions

View File

@@ -1748,9 +1748,9 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
const jKey = wasm.cstrToJs(zXKey);
const jV = kvvfsStorage(zClass).getItem(jKey);
if(!jV) return -1;
const nV = jV.length /* Note that we are relying 100% on v being
ASCII so that jV.length is equal to the
C-string's byte length. */;
const nV = jV.length /* We are relying 100% on v being
ASCII so that jV.length is equal
to the C-string's byte length. */;
if(nBuf<=0) return nV;
else if(1===nBuf){
wasm.poke(zBuf, 0);
@@ -1758,11 +1758,13 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
}
const zV = wasm.scopedAllocCString(jV);
if(nBuf > nV + 1) nBuf = nV + 1;
wasm.heap8u().copyWithin(zBuf, zV, zV + nBuf - 1);
wasm.poke(zBuf + nBuf - 1, 0);
wasm.heap8u().copyWithin(
Number(zBuf), Number(zV), Number(wasm.ptrAdd(zV, nBuf,- 1))
);
wasm.poke(wasm.ptrAdd(zBuf, nBuf, -1), 0);
return nBuf - 1;
}catch(e){
console.error("kvstorageRead()",e);
sqlite3.config.error("kvstorageRead()",e);
return -2;
}finally{
pstack.restore(stack);
@@ -1778,7 +1780,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
kvvfsStorage(zClass).setItem(jKey, wasm.cstrToJs(zData));
return 0;
}catch(e){
console.error("kvstorageWrite()",e);
sqlite3.config.error("kvstorageWrite()",e);
return capi.SQLITE_IOERR;
}finally{
pstack.restore(stack);
@@ -1792,7 +1794,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
kvvfsStorage(zClass).removeItem(wasm.cstrToJs(zXKey));
return 0;
}catch(e){
console.error("kvstorageDelete()",e);
sqlite3.config.error("kvstorageDelete()",e);
return capi.SQLITE_IOERR;
}finally{
pstack.restore(stack);