aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-05-01 19:28:07 +0000
committerstephan <stephan@noemail.net>2023-05-01 19:28:07 +0000
commit58d40363b955ea096f903326bc30b8e265a74e0a (patch)
tree85ef7a11953afd5846a9527bcd4dddcbb741a1f5 /ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
parent59fe13e39a118e64558291e3fe211203043b84d4 (diff)
downloadsqlite-58d40363b955ea096f903326bc30b8e265a74e0a.tar.gz
sqlite-58d40363b955ea096f903326bc30b8e265a74e0a.zip
Remove xFileControl() handling from the OPFS VFS altogether, re-routing all syncing through xSync() instead. This eliminates superfluous syncing introduced in [a371374148a2], as discussed in [forum:647d2f811dbc2dfe|forum thread 647d2f811dbc2dfe].
FossilOrigin-Name: f809de7f232c8c2731a877c7bf1ad39fda5b326b2e45e4748cab4dc5e5b535bd
Diffstat (limited to 'ext/wasm/api/sqlite3-vfs-opfs.c-pp.js')
-rw-r--r--ext/wasm/api/sqlite3-vfs-opfs.c-pp.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
index e74279a55..5c584702d 100644
--- a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
+++ b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
@@ -353,7 +353,6 @@ const installOpfsVfs = function callee(options){
state.opIds.xClose = i++;
state.opIds.xDelete = i++;
state.opIds.xDeleteNoWait = i++;
- state.opIds.xFileControl = i++;
state.opIds.xFileSize = i++;
state.opIds.xLock = i++;
state.opIds.xOpen = i++;
@@ -718,12 +717,9 @@ const installOpfsVfs = function callee(options){
return capi.SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN;
},
xFileControl: function(pFile, opId, pArg){
- mTimeStart('xFileControl');
- const rc = (capi.SQLITE_FCNTL_SYNC===opId)
- ? opRun('xSync', pFile, 0)
- : capi.SQLITE_NOTFOUND;
- mTimeEnd();
- return rc;
+ /*mTimeStart('xFileControl');
+ mTimeEnd();*/
+ return capi.SQLITE_NOTFOUND;
},
xFileSize: function(pFile,pSz64){
mTimeStart('xFileSize');
@@ -779,8 +775,8 @@ const installOpfsVfs = function callee(options){
return rc;
},
xSync: function(pFile,flags){
- ++metrics.xSync.count;
mTimeStart('xSync');
+ ++metrics.xSync.count;
const rc = opRun('xSync', pFile, flags);
mTimeEnd();
return rc;