SQLite

Check-in [a3713741]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Implement full xSync() for the OPFS VFS. The previous implementation was not correct for journal files. Reported in forum post 647d2f811dbc2dfe.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a371374148a2874be6e48890781aa5952229056b146a50fa4d035693341c5636
User & Date: stephan 2023-05-01 15:15:11
References
2023-05-01
19:28
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 thread 647d2f811dbc2dfe. (check-in: f809de7f user: stephan tags: trunk)
Context
2023-05-01
15:42
Expose the SQLITE_DBCONFIG_STMT_SCANSTATUS and SQLITE_DBCONFIG_REVERSE_SCANORDER sqlite3_db_config() options to JS. (check-in: 0a7024af user: stephan tags: trunk)
15:15
Implement full xSync() for the OPFS VFS. The previous implementation was not correct for journal files. Reported in forum post 647d2f811dbc2dfe. (check-in: a3713741 user: stephan tags: trunk)
14:50
Fix typos in documentation comments in sqlite3.h. (check-in: 6a8b0078 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/wasm/api/sqlite3-vfs-opfs.c-pp.js.

776
777
778
779
780
781
782



783
784
785
786
787
788
789
790
          rc = capi.SQLITE_IOERR_READ;
        }
        mTimeEnd();
        return rc;
      },
      xSync: function(pFile,flags){
        ++metrics.xSync.count;



        return 0; // impl'd in xFileControl()
      },
      xTruncate: function(pFile,sz64){
        mTimeStart('xTruncate');
        const rc = opRun('xTruncate', pFile, Number(sz64));
        mTimeEnd();
        return rc;
      },







>
>
>
|







776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
          rc = capi.SQLITE_IOERR_READ;
        }
        mTimeEnd();
        return rc;
      },
      xSync: function(pFile,flags){
        ++metrics.xSync.count;
        mTimeStart('xSync');
        const rc = opRun('xSync', pFile, flags);
        mTimeEnd();
        return rc;
      },
      xTruncate: function(pFile,sz64){
        mTimeStart('xTruncate');
        const rc = opRun('xTruncate', pFile, Number(sz64));
        mTimeEnd();
        return rc;
      },