stephan
92df71a360
Add a note about the journaling mode in the OPFS VFS. No code changes.
...
FossilOrigin-Name: e79c95fc130fc302719690eb6391d96070aff825b2b51ef6c4ad459d9a8918d7
2023-04-24 04:25:42 +00:00
dan
4d24eff8dc
Avoid a crash in fts5 when combining an empty expression with another.
...
FossilOrigin-Name: 33681ff3d29c9f096dbd8c5d885993f780e93974a7653adc00fa41a158356d7c
2023-04-22 20:47:08 +00:00
dan
9549245509
Fix a broken assert() in the recovery extension. [forum:/forumpost/82a88f5812|Forum post 82a88f5812].
...
FossilOrigin-Name: 8a1ad137606ce5bddbed62f89ff9a5cd922c6530db84c12b8b27c08df3c66bc6
2023-04-20 10:26:56 +00:00
dan
8cb4f0b1b2
Add tests for the progress-handler callback with the fts5 'secure-delete' feature.
...
FossilOrigin-Name: 48505ad950bc0902d58210be066d4672e6085eb27c525ba2bc663fde7e932ff7
2023-04-19 20:29:26 +00:00
stephan
b669956637
Correct use of an undefined symbol in one of the OPFS VFS loading failure error reporting cases (copy/paste error).
...
FossilOrigin-Name: c81c968b458977b2d6dd2fdd3c3d667f0e7cee069f3715363d0e8aed4e6e8377
2023-04-19 13:39:13 +00:00
dan
a5eab9579a
Fix an assert() in fts5 that could fail following an OOM or IO error.
...
FossilOrigin-Name: 49595083ba58e13d404b6a11c28f53768a257c59f3f36be3591438127df7e875
2023-04-18 11:33:35 +00:00
dan
68c0da6f66
Fix some problems with using fts5 options 'secure-delete' and detail=none together.
...
FossilOrigin-Name: 4d3f27ba90aa59837e49ceaae9f36cad426af3a33707d85d1bb848fc1bda6fed
2023-04-17 18:32:22 +00:00
dan
48824f23cb
Fix problems handling corrupt records in new fts5 code.
...
FossilOrigin-Name: 2f63d4a8bac6dc72197df32efd84c148adbc4794943088dff08da57b15dd7900
2023-04-17 11:41:42 +00:00
dan
5c45a9fbaf
Fix an assert() in fts5 that may be true when dealing with corrupt records.
...
FossilOrigin-Name: e8de2774463c07b76cd6b9a44ab32a583fe973f42a21b21af46fe82ab177c1b8
2023-04-17 10:39:51 +00:00
dan
ae6f6ef3b0
Change a memcpy() to memmove() in new fts5 code.
...
FossilOrigin-Name: 8de4542553ae20947787b4daf5e88bbe69f815679960e700e19f9c1148234b08
2023-04-15 21:00:55 +00:00
dan
0e429cf934
Fix a use-after-free that could follow an OOM or IO error in fts5 when using 'secure-delete' mode.
...
FossilOrigin-Name: 904be83d9f3dd4b21a3aa47dde337b5c045b925ffdde4bccd1f8e8fdbef68c18
2023-04-15 19:58:58 +00:00
dan
e45317a50a
Avoid dropping the error code following an OOM in fts5 when using 'secure-delete' mode.
...
FossilOrigin-Name: 9ee24a499c7b4a048f269f1c03c7c0b22b2898a3c23ea3e2511c2ba0342afa30
2023-04-15 19:13:51 +00:00
dan
7dcc3dfc04
Add the 'secure-delete' option to the fts5 extension. For configuring fts5 to delete old entries directly from the full-text index instead of using delete keys.
...
FossilOrigin-Name: 394980e4fe12125460ab14da41edae9089a4da332a46f3124bf0b9778793791f
2023-04-15 17:47:32 +00:00
dan
112500028e
Further tests for fts5 secure-delete mode.
...
FossilOrigin-Name: c5a47063b7971868ebbb3f0718434dd6bd22d01c43697f48941df9aae3885abc
2023-04-14 18:00:03 +00:00
dan
3fc123b7bc
Add extra OOM test for the new code on this branch.
...
FossilOrigin-Name: 846ae7e099ce67dab6b5df0ad5648a01d7bf7f2acf8312d817ed8505d4ea5aec
2023-04-14 17:00:29 +00:00
dan
d36106c954
Add tests for the new feature on this branch.
...
FossilOrigin-Name: 0268d1a59316d169927cbd4c562725e46a9023b7d7123ade911c12203e222adf
2023-04-14 16:11:05 +00:00
dan
95dc3e08bd
Update test script recoverbuild.test so that it may be run using old test harnesses that run more than one test script in a process.
...
FossilOrigin-Name: 5135aab0c0ab39f3b9cc84efbbc57f7266b42d98134fc0c5dace06f707374195
2023-04-14 13:34:26 +00:00
dan
7877dca93f
Avoid leaking a database handle in test script rbuexlock.test.
...
FossilOrigin-Name: 2edf98d128cabc0c9de1295470d7f87eb64e4cc1f13344fe3c198fcf9c7bf019
2023-04-12 18:18:28 +00:00
dan
02877e9558
Remove temporary debugging code accidentally left on this branch.
...
FossilOrigin-Name: 0a0f64870feaf95d2673efc8884ad1236d9bbf9bdb94364f8d2602221bd36ff3
2023-04-12 18:06:43 +00:00
dan
015020cd1a
Add the 'secure-delete' option to fts5. Used to configure fts5 to aggressively remove old full-text-index entries belonging to deleted or updated rows.
...
FossilOrigin-Name: 4240fd09b717dbc69dffe3b88ec9149777ca4c3efa12f282af65be3af6fa5bb0
2023-04-12 17:40:44 +00:00
larrybr
69881887b8
For sha3 extension, mention NIST standard implemented.
...
FossilOrigin-Name: 529ab138a438379f0cbd170bff5211aee1c327a1b3119a714ee15f68fd2239f3
2023-04-10 23:21:19 +00:00
dan
6d47af64e4
Fix a problem causing the rbu_exclusive_checkpoint=1 to be ignored with zipvfs databases.
...
FossilOrigin-Name: d8f50b31e8d64fce5141da4a016767a15482703364692a55df346f059fc9d30c
2023-04-07 14:03:30 +00:00
dan
1e24f9f1f3
Add further tests for the rbu_exclusive_lock=1 URI option.
...
FossilOrigin-Name: c07b62bef96bb69e9b1ce08f0084fdce8de981f4d8ea9689c87a41f1e4451ac7
2023-04-07 11:18:08 +00:00
drh
ebec9c475e
A prepared statement that aborts due to SQLITE_SCHEMA should not invalidate
...
cursors in other prepared statements that are already running.
See [forum:/forumpost/cae4367d9b|forum post cae4367d9b] for the original
trouble report.
FossilOrigin-Name: 857d0f5e16ba69ac9e5ee581befca2f7ed933edfe6e36396b10dae7979b44a57
2023-04-06 13:35:42 +00:00
drh
c6349ce205
In the zipfile extension, defend against corrupt ZIP files that contain
...
a zero-length filename.
[forum:/forumpost/b15f5e3ad8|Forum post b15f5e3ad8].
FossilOrigin-Name: 46db2e42a5f9b18da9661ccedca68cb70257ea5c58b33b401db2a5e030c1346a
2023-04-06 00:59:41 +00:00
stephan
20537f0dc7
Expose the new SQLITE_VTAB_USES_ALL_SCHEMAS to JS.
...
FossilOrigin-Name: b7ef09be667dd349e195842304c03cbebb1693164e1c3587a5d7c96baa713edf
2023-04-04 17:35:38 +00:00
drh
0669d6ebbf
Add the SQLITE_VTAB_USES_ALL_SCHEMAS option to sqlite3_vtab_config(). Update
...
the sqlite_dbpage, sqlite_dbdata, and sqlite_dbptr virtual tables to make
use of that interface. This was formerly handled by the internal
sqlite3VtabUsesAllSchemas() routine that was called directly from sqlite_dbpage.
But since sqlite_dbdata and sqlite_dbptr are an extension, an external
interface to that functionality had to be provided.
dbsqlfuzz 1a29c245175a63393b6a78c5b8cab5199939d6a8
FossilOrigin-Name: bcd51abee0b0f82bb5dbb881025a92d55baf9df6adeaf3a305e2e0da96a81d58
2023-04-03 15:01:37 +00:00
larrybr
756c6cf281
Clear executable bit on base64.c
...
FossilOrigin-Name: ec1ddbce7db270afc25f71546fa745935ad74bc72920fccfcb37e98649612bf2
2023-04-02 14:53:59 +00:00
stephan
fc6c3936aa
Remove a meaningless JS test. Add a timer to the OPFS async-side worker loader in an attempt to catch a browser-specific quirk in which the worker loading silently fails, per discussion in/around [forum post a708c98dcb3ef|forum:a708c98dcb3ef].
...
FossilOrigin-Name: 4fc1904b8e18c7d41fa65490ced125f1df4f0c22c13de957b24615ed09b3ecb7
2023-03-27 13:57:08 +00:00
stephan
4a1c8ed725
Add a JS test which checks for the issue described in [forum post 895425b49a|forum:895425b49a].
...
FossilOrigin-Name: 98d30400e4721b1d48ff601698ced146052654f8c6de7c014d4d239bb2dbef43
2023-03-24 17:15:15 +00:00
stephan
2255d89f0a
Internal cleanups in JS code. No functional changes.
...
FossilOrigin-Name: 8fbdf7d10400c4f54fc3d8bc823f97818de860deeeed35ab6ad717260cd301e0
2023-03-22 19:57:19 +00:00
dan
9b532d1e1b
Avoid a buffer overread in fts3 that could occur when processing a corrupt record.
...
FossilOrigin-Name: 02ac2297abee6af64c8df230b42b07f21cff4565d7e315860b2396a7c0c556ca
2023-03-18 16:12:27 +00:00
dan
66086eb6a6
Fix a potential buffer overread in the recovery extension.
...
FossilOrigin-Name: 0b3b5bf9597615589a1d045aaa697c13550553ee4fe4b9008a8e51415b6fe96a
2023-03-17 14:18:39 +00:00
dan
eb5d71ed58
Fix a broken assert() in the recovery extension.
...
FossilOrigin-Name: 4c4e66f293d7768cceb875a936ca0f4cd910473e20b9910698cc1e1ce221a7d4
2023-03-15 13:53:47 +00:00
dan
5f708cc832
Fix a problem with the fts5 snippet() function that shows up when snippets just 1 token in length are requested.
...
FossilOrigin-Name: 96d5116d17cbf3de6be38952881c6ddf6a226ddfd7649197bdb2df39c42b5d8e
2023-03-10 13:36:19 +00:00
stephan
17bbbde537
Export SQLITE_FCNTL_RESET_CACHE to JS.
...
FossilOrigin-Name: 6195cfc86b15614b8db0e0dc5cc79b8d1acaf483f0131c8526992dc8ca075630
2023-03-10 11:57:23 +00:00
stephan
434205a2c1
Replace a lingering use of 'self' with 'globalThis' in JS code, for node compatibility.
...
FossilOrigin-Name: 7e3782b5aa07621db95c2dc25b25ae21da988c9876d537b78ea289a83c75b06b
2023-03-09 22:09:13 +00:00
dan
bad7d5041a
Reinstate some test cases accidentally removed by [cb023fe28560ce0f].
...
FossilOrigin-Name: 870de61f8ef8781f2f9969b012f5c1cb95b6bce1a9a4dcaf02945b7846c3aa83
2023-03-09 16:11:43 +00:00
stephan
fcdfd4716e
Experimental addition of sqlite3-node.mjs, for node.js, based on feedback from [forum:ac7a94d4f77db235|forum post ac7a94d4f77db235] and related off-list discussions. Build changes only - no code changes.
...
FossilOrigin-Name: a5db97fa17d15711ab19af70595912d342ffa326a9b7029d4deb2194ae72a9f0
2023-03-09 08:51:04 +00:00
stephan
99ace82634
Export the new SQLITE_CHANGESETAPPLY_IGNORENOOP flag to JS.
...
FossilOrigin-Name: ac7359b2633ead74a53b2796fe038ca285aacad45b45980db2a76a87154e66e3
2023-03-08 18:05:57 +00:00
dan
975f2062da
Add the SQLITE_CHANGESETAPPLY_IGNORENOOP flag, which may be passed to sqlite3changeset_apply_v2() to have it ignore changes that would be no-ops if applied to the database (e.g. deleting a row that has already been deleted), instead of considering them conflicts.
...
FossilOrigin-Name: cb023fe28560ce0f8c2fd48042553fcdb9db81eba9552be75165de0d46a2645c
2023-03-08 18:03:04 +00:00
stephan
248c1abdf4
Extend wasm build to support a custom sqlite3.c to support building against sqlite3-see.c. The JS code now binds the SEE-specific functions if it detects an SEE build.
...
FossilOrigin-Name: dd8612c8adbaf9d06bf0d7319b9afc9bd8ca3d0fcfa1cb591a7a2fcb86480048
2023-03-08 10:05:42 +00:00
stephan
416e9c1908
Improve how sqlite3.initWorker1API() determines whether it's running in a Worker thread. Based on feedback in [forum:ac7a94d4f77db235|forum post ac7a94d4f77db235].
...
FossilOrigin-Name: 2f712b836a0dafd0b2ee6ba4eaa9caa35e49375c7ad0562477e0f2d3b086ec03
2023-03-07 19:23:36 +00:00
stephan
4214cc32ba
Replace use of 'self' in JS code with 'globalThis', as that works in browsers and node environments. Avoid using globalThis.location if it's not set (e.g. in node). Based on feedback in [forum:ac7a94d4f77db235|forum post ac7a94d4f77db235]. Minor JS build tweaks.
...
FossilOrigin-Name: dbbe8f25e58738c10b6192d41f1e3886983871f17631cbc45ce626d3f05a6e26
2023-03-07 19:12:06 +00:00
stephan
7272f6d64d
In the JS sqlite3.vfs/vtab utility APIs, use a local reference to StructBinder instead of sqlite3.StructBinder, as that object is removed from the sqlite3 namespace during the final steps of API initialization. Based on feedback from [forum:d19d96183badca70|forum post d19d96183badca70].
...
FossilOrigin-Name: 0d89885d28b44b1858117a72a180841f4f5f44bcc574fc59a116ca3526325932
2023-03-07 12:59:20 +00:00
stephan
eac6e8cb6a
Rename sqlite3-worker1-bundler-friendly.js to sqlite3-worker1-bundler-friendly.mjs and refactor it to work as an ES6 module, based on feedback in [forum post a255f89c2eadf4c4|forum:a255f89c2eadf4c4].
...
FossilOrigin-Name: af312b131457743d98b84137bd51d9ba60e0daf0bd8f5a66f05956ca35ab68fb
2023-03-05 07:44:23 +00:00
stephan
32b3444f15
Correct rendering of error messages in demo-worker1.js. Remove some stray EOL whitespace.
...
FossilOrigin-Name: 1d5d515ad97cf61bd679f8c1afc607815c079583fe80264b591c6ef18f56fb8b
2023-03-05 07:33:11 +00:00
dan
3410e550dc
Make the SQLITE_DBCONFIG_STMT_SCANSTATUS option on by default.
...
FossilOrigin-Name: 5a09191186bc03b374e0c0d029e1a15208c6b845bc2f5f5f9f6a8a882809d9f3
2023-03-03 21:17:12 +00:00
stephan
c355f6c839
Resolve a parallel build timing issue when building sqlite3.c/h from ext/wasm. For the time being, do not add sqlite3_wasm_extra_init.c to fiddle.wasm because it can cause duplicate definitions of extensions which are already built into the shell (a better resolution for this conflict is pending). No longer add sqlite3_wasm_extra_init.c to speedtest1.wasm because it's useless there.
...
FossilOrigin-Name: 75fdd5b83b4c527d25649b0d08841e3dc7d4d8109c1c97b2195b303538ced73d
2023-03-02 06:58:55 +00:00
stephan
c3d84b4cbd
Rename some vars in the ext/wasm makefiles for consistency's sake.
...
FossilOrigin-Name: c23589d92cd16b67266d97f4a3d8c0991864dbea30ec074173e1a67466532d21
2023-03-02 05:51:03 +00:00
dan
b211a4b391
Improve the error message generated by the recovery extension if it is used with a non-SQLITE_ENABLE_DBPAGE_VTAB build.
...
FossilOrigin-Name: c1f2a1d55c180fb51a4e203befbbe529bdd23137b26190c50b8f85820450e7fa
2023-02-28 11:02:02 +00:00
stephan
ef22012b6e
Minor doc tweak for the previous commit.
...
FossilOrigin-Name: a8832164d36ea88dc1c5c874c67212800238eab6b1477e5ca92fbf8c77f341b4
2023-02-27 07:23:54 +00:00
stephan
9885c76c4c
Extend wasm build to enable inclusion of client-custom C code, initialized via the SQLITE_EXTRA_INIT mechanism, per discussion in [forum:1e1c04f3ed1bc96b|forum post 1e1c04f3ed1bc96b].
...
FossilOrigin-Name: 68a52cafff60f19c9c998133d04f192b1e8b23f78b8cee13807d76845ef5e13d
2023-02-27 07:12:28 +00:00
stephan
dbb3260627
Remove some unnecessary bind() calls in JS code.
...
FossilOrigin-Name: 71215599cd8ebb970500d8366dfac40420a9a6b243ea9d6ba62d5cde28fae3d3
2023-02-21 20:08:10 +00:00
stephan
2b83570b5f
Unconditionally disable -sSTRICT_JS flag in wasm build because it no longer works with emsdk 3.1.31+.
...
FossilOrigin-Name: b5e0b69649e6341ffff4e62f9f68abd2a53519f73964559a133f3b708e007e98
2023-02-21 18:47:25 +00:00
dan
a3e6192941
Fix a problem with the fts5 trigram tokenizer and LIKE or GLOB patterns for which contain runs of 2 or fewer non-wildcard characters that are 3 or more bytes when encoded as utf-8.
...
FossilOrigin-Name: 00714b39b39c51519edbc0194f98c7275fecf96763a06fd95db6e1d81bb9f1f1
2023-02-10 17:17:04 +00:00
stephan
98094e2f4c
Minor text-only updates to wasm demo/test HTML and license header.
...
FossilOrigin-Name: f28e2a8613571fe3c23bfbbb602311071f4cb9731653216cfe436c38b0a59736
2023-02-10 11:05:16 +00:00
stephan
c9e3cbe873
Fix ext/wasm/fiddle build, which was silently broken by recent build refactoring.
...
FossilOrigin-Name: dcf532931136d09bef23ccad669d486cb31daec8565317c3209c280b5695d45d
2023-02-10 11:04:39 +00:00
dan
0d12a79310
Better fix the problem where optimizing an fts5 table too often causes it to become unreadable (first attempt was [35bed981]).
...
FossilOrigin-Name: 459d986d38fc0ccbfd66801e0f22900cfed831268cf59ac8d1cd1e556f0d1441
2023-02-08 17:28:08 +00:00
dan
c3ea539dc2
Fix a test script problem causing "make test" to fail for non-RBU builds.
...
FossilOrigin-Name: 2abc3f9de0d2b66342598ab9015e62568ed20c7da4744a0f0a76b1db72c7e941
2023-02-07 18:41:23 +00:00
stephan
9f29998d2a
Roll back part of [c54f29d8] which attempted to use symbols which that worker does not have access to.
...
FossilOrigin-Name: 90b12211376eb445df7221b3d3593394ff651ef93f4218492c6208bc74b8fc63
2023-02-06 21:20:59 +00:00
dan
8057fe9baa
Fix RBU test scripts to avoid attempting to copy or delete a locked file.
...
FossilOrigin-Name: f25eb898fce44120136f8ee5557305f43541e8a75323cfc3becf103f3fa795aa
2023-02-06 19:00:54 +00:00
stephan
3ff812aa94
Add capability to override the JS's use of console.log/debug/warn/error() with client-provided versions via the bootstrap-time config object.
...
FossilOrigin-Name: c54f29d8e55419eaa9168e799dab5030e89063b13d8390a50616606422d164dc
2023-02-06 14:01:19 +00:00
drh
9ce8643676
Add the "devtest" makefile target that runs both fuzztest and testrunner.
...
FossilOrigin-Name: c81398c6215d6d1bc7a15b6be9bb1f81effd430ff0a7c86158372accfa77814c
2023-02-05 17:40:03 +00:00
dan
a3d4d7a0ae
Avoid running rbu tests under permutation "journaltest", which does not support wal. Fix some other test script problems.
...
FossilOrigin-Name: 92f018698a87ed32acc31d83f7246dbb7295867bd6a801b7984a16f97a5c7786
2023-02-04 21:25:17 +00:00
dan
fb962837fd
Updates to the testrunner.tcl script so that uses a separate sub-process for each test. And so that it runs the release test procedure currently handled by wapptest.tcl.
...
FossilOrigin-Name: 4c3c587500ac5a3758008f0acb9432bd3bc6f0f31bacd5615f46280e55842982
2023-02-04 19:01:17 +00:00
dan
d40a183506
Fix a problem where optimizing an fts5 table too often might cause it to become unreadable.
...
FossilOrigin-Name: 35bed981416269018a0d52171d9997c43d3b097f5db1910d10d882eabe2e137f
2023-02-03 19:28:50 +00:00
stephan
7667eedf95
Remove automatic installation of JS-global S object for the sake of client libraries which embed this library, per [forum:9d4f722c6912799d|request in the forum].
...
FossilOrigin-Name: 9504f68af8360ea6d61574fd4b9811af34b721c12d9653eb50adcf0f12b129fc
2023-02-02 06:17:22 +00:00
dan
986c22a6d0
Update testrunner.tcl to use a separate process for each test script. And to run some extra tests too.
...
FossilOrigin-Name: d090948a69a9c4b86693bd3caedba3d7e5883e4b2ad1f2d4bf7ae14c105ddea7
2023-02-01 20:14:59 +00:00
stephan
26c7cff254
Two JS file renames which got inadvertently undone while setting up [9062b31174618c0e]. Cosmetic cleanups in ext/wasm/dist.make.
...
FossilOrigin-Name: 0c2fde767f77d6204e95737edd573f42d72e956a3c20ea7e4daeff906657bbe5
2023-01-29 06:01:32 +00:00
stephan
2f5330036d
Correct the handling of the worker1 and promiser JS files in the face of the bundler-friendly changes. Those files require separate, bundler-friendly copies.
...
FossilOrigin-Name: 9062b31174618c0e67e86441e14eac420c734a0cc321f7eebc7d89ff8a449c10
2023-01-29 05:09:39 +00:00
stephan
c7170350d7
Makefile doc touchups - no code/build changes.
...
FossilOrigin-Name: 3458a481b9ee391122dba531358d664d5219ce4a58cbce93d07df57cc64dc2c7
2023-01-28 09:51:41 +00:00
stephan
919fe5bac6
Overhaul ext/wasm/GNUmakefile to consolidate what amounts to much copy/paste/slightly-edit duplication into a single function, called once per distinctive build mode (vanilla, ESM, bundler-friendly).
...
FossilOrigin-Name: 168e5a93013d8650c180e19788e5f301b5d5ae8501d0ce728004fd750ca9e682
2023-01-28 09:11:08 +00:00
stephan
e84454ff16
Enhance oo1.DB.exec() to simplify returning whole result sets.
...
FossilOrigin-Name: 7b168ee2af09f04b41a6ef4c14ccaddc0c9b0bfe9dc1e6a86d8f5317606bd78d
2023-01-28 05:09:26 +00:00
stephan
65f7942d06
Add JS bundler-friendly JS build. Minor test code cleanups.
...
FossilOrigin-Name: 24d3a53dea5e596230558e233cbbd9d0288b4c394cd5ea7b650fd99bff4cde2e
2023-01-28 04:20:46 +00:00
drh
cfd01014d0
Fix compiler warning in base85.c.
...
FossilOrigin-Name: bd9613fd63193bd6b33798d83f0ef21987ba468b53d13a25a31cb9e9e5f20562
2023-01-27 23:10:10 +00:00
stephan
69141f52be
Update ext/wasm/README-dist.txt for the bundler-friendly build.
...
FossilOrigin-Name: 6a5c4f6b19aa0704efe7f789102f757a1ed05d6542f37c7aa37a4439783944a3
2023-01-27 20:25:39 +00:00
dan
844e7183ae
Do not try to run rbu tests with builds that do not support rbu.
...
FossilOrigin-Name: c74ad902e3bbfc28d6b30a37f3791176d64cdd8fd5950f1d1749541e244a0494
2023-01-27 19:59:46 +00:00
stephan
6a3e2d3776
Add a feature idea note to DB.exec(), derived from a forum discussion.
...
FossilOrigin-Name: 792f43209c4b6e85386b6b3906814b7f2ad310d50ba563b3fd1cb37e55adf8db
2023-01-27 19:56:40 +00:00
stephan
cf73cb2fbc
Cherrypick [3773934e91c20ca243] into trunk.
...
FossilOrigin-Name: 50cf4300a6a92302010fa4a7662db82bf55180a4930771f0d3c07e558bc87e7d
2023-01-27 17:19:30 +00:00
stephan
aca8ce1535
Extract emcc version in JS build and use it to conditionally set build flags. Initially a workaround for [ https://github.com/emscripten-core/emscripten/issues/18610 |Emscripten ticket #18610 ] but may have other uses.
...
FossilOrigin-Name: 3773934e91c20ca2433cc414aaba75de9a4a4318fd1126fb781dba510ddefd94
2023-01-27 17:14:55 +00:00
stephan
9dc093d095
Work around a JS null pointer deref which could be triggered from the dev console, but not (it seems) from client-side code.
...
FossilOrigin-Name: eabb551b8b3d33fc3a327ecf7225436a3a3f616901e22c868fd76a5e3adc7b3f
2023-01-27 07:53:49 +00:00
stephan
ca86a5351e
Cherrypick [fa784101775b7|emscripten ticket #18609 workaround] into trunk.
...
FossilOrigin-Name: 9a26fae545b9c97129893b83ff97e62b1c477eccd1379af1dce4a3cc4fa9f932
2023-01-27 05:17:10 +00:00
stephan
c64a3fa6c6
Work around upstream emscripten 3.1.31 bug [ https://github.com/emscripten-core/emscripten/issues/18609 ].
...
FossilOrigin-Name: fa784101775b795077a23c211b5b16f51ad5a13967c284511f310dfcbfa9f77a
2023-01-27 05:14:34 +00:00
stephan
a0013fbe87
More work on creating a separate sqlite3.js build which is hopefully friendly to JS bundlers.
...
FossilOrigin-Name: b7b896fb448a7f46eb88eadadb1359255aec637a384cabcdd526276a02f4f0b4
2023-01-27 03:18:16 +00:00
stephan
67bfea4ea6
Resolve a nested if-block bug in ext/wasm/c-pp.c which caused output after a nested block to be unduly elided. Remove a kludge, added in the previous check-in, which worked around that bug.
...
FossilOrigin-Name: 7a026a4b24d57c1b0970923b972dd42c3f1bb5b282f908079075468b2e1bf601
2023-01-27 02:21:16 +00:00
stephan
0cd38cd2b9
Beginnings of a bundler-friendly build of sqlite3.mjs. Not yet ready for downstream testing.
...
FossilOrigin-Name: 4271bf5f41df091696f1dcfc4ffe7a60d24066fc75c896941e0b56de95fe5f89
2023-01-27 01:33:12 +00:00
stephan
0945197a39
End-of-line whitespace cleanups and doc typo fixes. No code changes.
...
FossilOrigin-Name: bdfd72a083fadd724030c4c89adae71426e1ddd402c6bc5abf40801ecf3253cf
2023-01-26 20:08:59 +00:00
dan
3db12cd7c4
Have some RBU tests run as part of veryquick.test/testrunner.tcl.
...
FossilOrigin-Name: f51406e3bf92f2b46f13d08fb7c7fe7683feba68b5a8fa18f6f6b8845662deac
2023-01-26 18:16:51 +00:00
drh
e3d71c078b
Fix a harmless compiler warning in FTS3.
...
FossilOrigin-Name: 68d02d3c2ab1b4afff2d3a71516ceee404fad0d2b717369ad732832c4f9b19a8
2023-01-25 21:28:30 +00:00
dan
a0fe1e7d13
Fix a problem with fts3 auxiliary functions and one or more NEAR expressions ORed together.
...
FossilOrigin-Name: de4690a10ad4631e7452ccbb05b177a821d9dda387a854d216a6c54c7a189ead
2023-01-25 15:45:45 +00:00
dan
0fa2bbf9e1
Fix another problem with fts3/4 auxiliary functions and NEAR expressions that consist entirely of deferred tokens.
...
FossilOrigin-Name: a8c91c132f6157b7e3649f57a799984b1d7f8a18fd434515c875617d4195db29
2023-01-25 13:42:55 +00:00
dan
e35d1e1e6a
Fix a problem with using fts3 auxiliary functions with expressions like "E AND ...", where E is a NEAR expression that consists entirely of deferred tokens.
...
FossilOrigin-Name: 39bfae4c4698a13e07c4a0725f2790955e03b601fe64e17a000c691def1bdcb8
2023-01-24 11:24:28 +00:00
drh
a794af53b4
Add the missing CARRAY_BLOB macro to the carray.h extension header.
...
FossilOrigin-Name: 10bf639cd169147d4608918543f9a9b15417c10a231590b961c91500a1856f6e
2023-01-23 16:16:00 +00:00
stephan
0bcded30e5
Minor API doc cleanups and JS code simplification.
...
FossilOrigin-Name: f608a3a45609693c1c0237f12c394275ec9a6225fa986e62345f21af763293a0
2023-01-21 16:53:01 +00:00
drh
a96cd076fe
Extend the carray extension to allow the use of BLOB values to be bound
...
as an array of "struct iovec" objects.
FossilOrigin-Name: e117a03ca6560e958884f277db827c51ae337a970c17143a0a5f9b150f52f87a
2023-01-20 21:00:03 +00:00
dan
d993b15aa3
Ensure that the database encoding cannot be changed while there are statements running. And that the connection is left in a valid state after an obscure OOM within sqlite3_deserialize().
...
FossilOrigin-Name: a02da71f3a80dd8e817e89cdaa775c95e38c90d2471f8fec516bed086539e2c0
2023-01-20 17:50:24 +00:00
drh
3601db8f86
The json_group_array(), json_group_object(), and fts5_source_id() functions
...
should all be deterministic and innocuous.
FossilOrigin-Name: edcb83fa0d3c832d044b267d608fed31a2ac841b81c7c9406b2136ac43d61a1a
2023-01-20 13:34:14 +00:00
stephan
8a45f68b1c
Emit sqlite3-api.(m)js during the JS build process, which are the JS APIs without the Emscripten/wasm-loading parts. They are hypothetically useful for arbitrary build environments/toolchains but have notable caveats related to the wasm imports, as elaborated on in the makefile.
...
FossilOrigin-Name: 966b55c513a14c6ab3ec128cfe6d157ecd9bec32e3fce2f559f130249cec50ab
2023-01-18 17:39:04 +00:00
dan
ae2e7fcc4c
Fix another issue with very large compressed LSM databases.
...
FossilOrigin-Name: d71154265a294a1ece89d257f55f6855db7c30aec55ea0dc4eeb61bce1e8fad3
2023-01-17 19:34:01 +00:00
drh
57003792df
Omit the long-disused FTS1 and FTS2 implements from the active source tree.
...
The code will persist forever in the source repository, but there is no point
in carrying it around in the latest tarballs where it is never used.
FossilOrigin-Name: 2bb50d5aedef0fd216d94058f477a58d88aa3a68bbadc94fa67998b7c391a8ff
2023-01-14 19:53:42 +00:00
larrybr
3f7b9944b8
Add OOM check, per tip at [forum:/forumpost/933479b2d5|forum post 933479b2d5]
...
FossilOrigin-Name: eda84dcffee6016fb3f8588d96c7ffb6275edd626b11f6fe12e81be90226c7d8
2023-01-14 19:27:40 +00:00
dan
2bb3a4d6d6
Fix another lsm compression-mode bug.
...
FossilOrigin-Name: f9fafc941370f805f6656ac13543333b36ee52f1ad44c891252b99a74bd2ddf4
2023-01-13 20:49:42 +00:00
drh
bd8e3d7d0a
Add missing "const" on variables in recent RBU fixes.
...
FossilOrigin-Name: 9b8dcd79050f9bfa745271f51377b38cfed4d8ce41a36b773a30799d69f7b943
2023-01-13 18:20:40 +00:00
dan
e4172b690b
Do not attempt to run new test file rbupass.test if the "demo" VFS is not available.
...
FossilOrigin-Name: c5d958eb942a8d6ea1e6e1d2d57637f9359d518965a28f298c7fbacdb9080f59
2023-01-12 19:28:34 +00:00
dan
67da9239ba
Avoid crashing when using an RBU VFS with a version 1 parent VFS.
...
FossilOrigin-Name: d149772d18c47bf986decb7e08d148b1d417bbcc8522fd6240ead836ec34074b
2023-01-12 19:11:41 +00:00
dan
64f03fa54f
When deleting any old OAL file before starting an RBU update or vacuum, use the same VFS as will be used for the target database, even if this is not the system default.
...
FossilOrigin-Name: 5a86c6cb1f16a15bdbc42544b8ed1912d9e87f04c514b8481a77442fbbd8accf
2023-01-12 17:13:44 +00:00
dan
7c6f915af8
Fix another 64-bit offset problem in lsm.
...
FossilOrigin-Name: 1f3d0bdc20aa74a595f7bb7b2c152259a9d3a8ffbe7cc229c57ad2142df5376d
2023-01-11 16:02:20 +00:00
dan
7d7b88dd2f
Fix some problems with large, compressed, lsm databases.
...
FossilOrigin-Name: 956e985ff9bf8f21a048e49f7190bcc52ec4a7d35ecd685b0a293a01c9777a96
2023-01-09 21:10:42 +00:00
dan
4b11e6efd6
Account for read-only connections on databases with non-default block or page sizes.
...
FossilOrigin-Name: 3a2075b089ecdb4b55243235dfabf466ea7999c2118aa8f58300925fb75c884e
2023-01-07 13:40:32 +00:00
drh
b8a655beeb
In the zipvfile extension (which is not part of the SQLite amalgamation, but
...
which is included in the CLI by default) ensure that fopen() is not invoked
using a NULL filename. Fix for the issue reported by
[forum:/forumpost/d1c96a9032e564f8|forum post d1c96a9032e564f8].
FossilOrigin-Name: d32757ddf5d311b6f62545c861fd606244e03f02cb2e317c1131ee6b80c2299c
2023-01-05 01:26:58 +00:00
larrybr
fd318937e7
Employ deliberate_fall_through macro to quiet some compilers.
...
FossilOrigin-Name: 869635fb81e0868dee80ce77653a2c1d2af41b3ffbf0a3f7b788ac99dc808887
2023-01-04 16:54:55 +00:00
stephan
5d2a25b254
Remove the JS-side SQLITE_WASM_DEALLOC sanity check which triggers the problem mentioned in [688c5c13d156] and [ae0196d86ee8], for reasons covered in the code comments, per discussion in [forum:e5b20e1feb|forum post e5b20e1feb].
...
FossilOrigin-Name: 65ff3200c6009a1649fc108d7ce36f5c014185ba46bbf98471ec86eaeb572656
2023-01-04 03:14:06 +00:00
stephan
e364a9da72
Add some docs explaining a particular piece of [ae0196d86ee8]. No code changes.
...
FossilOrigin-Name: 7f96803c1cbd0633367173ab0a67a8b301b9e0746e460c50d506b536c15db0a0
2023-01-02 20:52:46 +00:00
stephan
b1cc895c92
Another reformulation of SQLITE_WASM_DEALLOC to attempt to work around a Safari-specific quirk reported in [forum:5489305f601b8c3f|forum post 5489305f601b8c3f].
...
FossilOrigin-Name: ae0196d86ee8ca424b5ef5a43c32988f4ab5131ea146669bc1467e31a2384901
2023-01-02 20:07:30 +00:00
stephan
a347927d60
An alternative solution to mapping SQLITE_WASM_DEALLOC to the proper function pointer in JS, to account for a Safari-specific quirk reported in [forum:e5b20e1feb|forum post e5b20e1feb].
...
FossilOrigin-Name: 688c5c13d156f987b895df1d5a5b770616b0d9caec4726e03ba122eb8539e7b2
2023-01-01 12:22:16 +00:00
stephan
010ffff8d7
Add sqlite3changeset_new/old_js(), which work like sqlite3_preupdate_new/old_js() but on changesets.
...
FossilOrigin-Name: e8afad630b085a9208491e0516a6a30c9cda77a20b1aa2cba49b2f44eb9fa2f8
2022-12-27 22:46:49 +00:00
stephan
294968e030
Expose sqlite3_preupdate_hook() and friends to the JS API.
...
FossilOrigin-Name: cc02783a1210a083683320fae1ec1519e45b8e3003a9e32809d808513a2ce06b
2022-12-27 14:34:32 +00:00
dan
1dff401c42
Fix a broken assert() in fts5.
...
FossilOrigin-Name: ff5a9b054f4d5ad3d33787aee93b4181822c6dfc513626236d9867bb431f64da
2022-12-27 13:52:25 +00:00
stephan
de75c9c5a0
Add links to module-symbols.html for newly-added APIs.
...
FossilOrigin-Name: 335ef03eb9694d1fd123f113f235cd34e97834fadc5f7c80489b6513be45d070
2022-12-27 12:25:28 +00:00
stephan
69d8b3636e
Add two more tests to [f99f8e3ecfe20].
...
FossilOrigin-Name: 9cffccd335b11feb6a5beadb26e1a68af7b6b1b3c953063dcf6ef74edf3c59b1
2022-12-27 12:17:20 +00:00
stephan
55a21fbcef
Expose sqlite3_commit/rollback/update_hook() to JS API.
...
FossilOrigin-Name: f99f8e3ecfe205337996ee61c0b9f139d3e8788b14f32e26560888b3a16564de
2022-12-27 12:13:01 +00:00
stephan
c8f245ab5c
Add an optional argument to oo1.DB.transaction() to specify an explicit BEGIN qualifier.
...
FossilOrigin-Name: 507335c12b1dbe21d180cf6f0a0deb4cc737417acb44c8f1d8fac98b86f62b01
2022-12-27 11:40:05 +00:00
stephan
84261bac96
Expose the auto-extension API to JS and reorganize some nearby code.
...
FossilOrigin-Name: 52b229d11d82bfb81c8b63e252c51c57a34dc50498dd685451588c185873c628
2022-12-26 17:15:05 +00:00
stephan
64fa85bb5e
Document sqlite3.capi.sqlite3_prepare_v3() as accepting an ArrayBuffer and ensure that it can.
...
FossilOrigin-Name: ae3ae92ec45d3d5de92e70876502f8108fc3fcd87848e86c2b83f8842f1ff139
2022-12-26 15:08:48 +00:00
stephan
d9cfd0f339
Correct some internal-use JS docs and update the 'string:flexible' type conversion to accept an ArrayBuffer (as it was recently documented to).
...
FossilOrigin-Name: eff5d3bec29043cc1182bbb5229040dac5ff50264d025e354736bb63b4bc97a0
2022-12-26 14:55:00 +00:00
stephan
67e4f6fcdb
Only add an on-db-close cleanup entry for collations if adding the collation succeeds and xCompare is-a JS function.
...
FossilOrigin-Name: 18a5480f1e0dca55703b43fa17685a4cc577cab8841ce47c807af02348ad85ee
2022-12-26 14:25:21 +00:00
stephan
171aa209fa
Extend [0e69b2c379e618] to support uninstalling stale JS-to-WASM function pointers added on behalf of UDFs.
...
FossilOrigin-Name: 7a46e629dcbf97ae037c5abb39306af7ad55f1910c1e962373e09d88d8bd5a33
2022-12-26 13:45:10 +00:00
stephan
7197f0a8f2
Add JS infrastructure which enables sqlite3.capi.sqlite3_close_v2() to clean up stale JS-to-WASM collation function conversions installed on behalf of a given db handle. The same for UDF mappings is TODO.
...
FossilOrigin-Name: 0e69b2c379e61893c7db8a9c9d270650f2bd63b6cea30811d41136392a2e4f04
2022-12-26 13:00:58 +00:00
stephan
20170adf14
Reimplement sqlite3.capi.sqlite3_close_v2() and sqlite3session_delete() as a hand-written bindings so that they can attempt to clean up certain (potentially) FuncPtrAdapter-installed functions before closing. Correct the create-function family of JS-to-function-pointer automated conversions to include the UDF's arity as part of the mapping's key so that (un)binding a UDF to different functions for different arities works (and add tests confirming it). Correct a broken doc link in module-symbols.html.
...
FossilOrigin-Name: 60b262ef0f57b162c2566b12e70685a92afb00b441332ea7a6540fcb188cc7af
2022-12-26 11:13:09 +00:00
stephan
b87efce2c0
module-symbols.html: add some missing links to C-side API docs for recently-added JS counterparts.
...
FossilOrigin-Name: 7d4f4e96f33f37b0774cb8df22ed1ef33062534653a4fadf606704b855e28c49
2022-12-25 23:54:16 +00:00
stephan
7103801df1
Update JS worker #1 API and related tests for recent API changes.
...
FossilOrigin-Name: d797e183e96e04520636865204c02307b751fdc2949a04587de9259a1733e37b
2022-12-25 23:45:59 +00:00
stephan
ec35e92d1d
Rename the new wasm.irSizeof() to sizeofIR() because that seems clearer.
...
FossilOrigin-Name: 49a83ca3ba46d3ae8021fbdd72b48ce9181eea6845fa7bb7aa83b16fad1728be
2022-12-25 22:55:45 +00:00
stephan
6431f860ae
Minor internal API doc correction and extend a test for oo1.DB.selectValues().
...
FossilOrigin-Name: b7295b1ca700945ae4e89be69f954dce9960e8975664e620898392b2cc78d452
2022-12-25 22:49:55 +00:00
stephan
9f1adb8c12
Add sqlite3.oo1.DB.selectValues(). Correct a logic error which could cause DB.selectValue(), DB.selectArray(), and DB.selectObject() to fail to finalize a statement if a call to bind() failed. Add more session API tests.
...
FossilOrigin-Name: 6adc8a10146190037d55d3328d2f78aa5233559f88d4aa70fbbf9e10145b9b6c
2022-12-25 22:44:13 +00:00
stephan
3caf13f1cb
Merge wasm-session-api branch into trunk, adding the session API to the JS/WASM components.
...
FossilOrigin-Name: dfb8b651fa4faef2d3307a05512cdc479398484c3a59715827179c363861a777
2022-12-25 20:25:44 +00:00
stephan
9d61db1944
Add basic session API JS tests.
...
FossilOrigin-Name: 64e032602cf420851c8029603c76f5512000d1c9a40fa7a545528d69d6d1d4cc
2022-12-25 20:22:20 +00:00
stephan
7d59d90a5b
Add sqlite3.wasm.irSizeof() and extend certain allocation functions to make use of it.
...
FossilOrigin-Name: 1cbc7b1875e8611b9db7a747b4c9499501450deaf90c929d212511837d6f72b6
2022-12-25 20:05:11 +00:00
stephan
7a5544b958
Add tests confirming that JS sqlite3_exec()'s SQL argument participates in the 'string:flexible' type conversion.
...
FossilOrigin-Name: 926d0c61a391c601adc2804d3fdaa8b667ae2abd565939cddfa12d5151b098f8
2022-12-25 17:12:24 +00:00
stephan
73bf9d5fed
Replace the "manual" implementation of sqlite3.capi.sqlite3_exec() with a briefer "automated" one via the [7f9ace1b11a67] feature addition. Minor code-adjacent internal cleanups.
...
FossilOrigin-Name: 4888957baf18c6763f959fbba998a74156ff656368779107f502b926e9e9d949
2022-12-25 17:09:34 +00:00
stephan
031ee6b9da
Remove duplicated JS binding of sqlite3changeset_apply_v2().
...
FossilOrigin-Name: 2e8336b6e1cba89dbcc11d6316e39c929bf8b018a18b92efc232abd47e0a5cc6
2022-12-25 16:20:05 +00:00
stephan
8b5a5ef030
Add the address of the associated db handle to the sqlite3_trace_v2() output originating from sqlite3.oo1.DB's trace flag.
...
FossilOrigin-Name: 0a36568c5a3db56a8ad23fd8abc672c5a7f1abed55984d902842ffd3ebb816e8
2022-12-25 15:28:19 +00:00
stephan
3494ec15e5
Update the session-related JS bindings to account for today's internal API changes.
...
FossilOrigin-Name: be63944d4114f53f2dab65bc6c1b85f4766a4ea14ee7b2690acde239a2a0bf54
2022-12-25 15:14:10 +00:00
stephan
04071524ae
Merge trunk into wasm-session-api branch.
...
FossilOrigin-Name: 7f8f1acd82be7dc2eb2147d96299b1b443e86774dfe0b0a8d32669a0500fc9c6
2022-12-25 14:13:52 +00:00
stephan
7015aa9f49
Add missing sqlite3_context_db_handle() JS binding. Reimplement sqlite3_set_authorizer() and sqlite3_set_auxdata() JS bindings to take advantage of [7f9ace1b11a67]. Teach FuncPtrAdapter to emit a console.warn() message if it is invoked after the library is bootstrapped, the goal being to inform users that it's an internal API and should not be invoked from client-side code.
...
FossilOrigin-Name: 8e3d4f6294037396e388ec21abb18bf0201a6bec6ff004730cc5d11b705a6d2b
2022-12-25 14:04:06 +00:00
stephan
485229e147
Enhance sqlite3.wasm.xWrap.FuncPtrAdapter to be able to handle sqlite3_create_function() and friends and reimplement those bindings to use this feature (this will also simplify certain session API bindings). Interal API changes only with no client-side breakage.
...
FossilOrigin-Name: 7f9ace1b11a6703031790af9cf08ab25df25850a86e6ca2a7aeaefd8aa395e6d
2022-12-25 12:51:53 +00:00
stephan
75c04ba89c
Simplify the signature for JS functions, as opposed to function pointers, passed to sqlite3_exec(), eliminating the superfluous initial two arguments. Update related tests to demonstrate both function-passing approaches.
...
FossilOrigin-Name: e7cc70cdda426863f82ebe1305f4c3053824c5a605b1516b0b7f205f1203178b
2022-12-25 10:22:27 +00:00
stephan
4099b3cab3
Replace JS-side use of SQLITE_TRANSIENT with the new SQLITE_WASM_DEALLOC, reducing the amount allocation/copying required by sqlite3_bind_blob/text() and sqlite3_result_blob/text(). Remove the 'experimental' log message from the virtual table tests.
...
FossilOrigin-Name: ffe2999a91a7dec129a38afb675fe9e539d7c347886bfea85cba55f6367d54d1
2022-12-24 15:28:45 +00:00
stephan
cede6384fd
Extend oo1.Stmt.bind() to accept ArrayBuffer instances to bind as blobs.
...
FossilOrigin-Name: f76bd30137fbff981625ffcb28cddd5e8651803dfc3f2d8d7801ead33496311d
2022-12-24 14:16:02 +00:00
stephan
0db1c90137
Add a test for the (failure) case of client-level code calling the oo1.Stmt constructor directly.
...
FossilOrigin-Name: 6a37874db04f3b4842994ad17fc74cb6222f8ea0fa1315a23aff1ffa69bcd12a
2022-12-24 13:46:27 +00:00
stephan
4b4ae86445
oo1.DB.exec() rowMode="$columnName": a minor optimization and a preemtive fix for a hypothetical corner-case bug.
...
FossilOrigin-Name: 0b2df22bd92914708ad0851d0401ad2cf3edb1968b88b2c07fe40792a731c5ba
2022-12-24 11:16:49 +00:00
stephan
0cdc01d01a
If sqlite3.oo1.DB.exec()'s callback returns a literal false, stop step()ing over results as if the end of the result set had been reached. Unrelated minor code-adjacent cleanups.
...
FossilOrigin-Name: 33a58c8ece3b37a8edc3434af36643e2d489a53a672d778c5b77e66666045c30
2022-12-24 01:59:42 +00:00
stephan
027afccdcd
Reimplement JS's sqlite3_bind_text/blob() with hand-written bindings to permit more flexible inputs. Add automated JS-to-C function conversion to sqlite3_busy_handler(). sqlite3.wasm.xWrap()'s '*' argument conversion no longer treats JS strings as C-strings: those conversions require explicit opt-in via the 'string' converter (or equivalent).
...
FossilOrigin-Name: 96ba44946b3e88b6aa305c4363cbbfeab0d9120b3d8c4d2587d68b9293ea7cc6
2022-12-23 23:46:33 +00:00
stephan
bb769f0b4a
Merge trunk into wasm-session-api branch.
...
FossilOrigin-Name: 6cdb036d8e8c5ddb0c6578aeefe318e74d7a90228e57b9f9047057dae3252963
2022-12-23 21:23:26 +00:00
stephan
ab9c2d571e
Internal JS cleanups. Correct part of [ac136925a645] to account for the eTextRep flag being able to hold flags other than the encoding.
...
FossilOrigin-Name: 1dfc03ab1e0269807beef27bf884ab9ead7553d4a5f6ed213f812d7fa052045f
2022-12-23 21:10:49 +00:00
stephan
77eac0507c
Merge trunk into wasm-session-api branch.
...
FossilOrigin-Name: f1decc831fe0dc8523956e74474d9663852b0e5b56240dd8504952726e713a97
2022-12-23 19:33:22 +00:00
stephan
3705f38ab0
Consolidate/unify how the JS bindings of the create_function/collation family of functions react to a non-UTF8 encoding: they now treat a falsy value as SQLITE_UTF8 and fail with SQLITE_FORMAT for an invalid encoding.
...
FossilOrigin-Name: deffe6fb211410fa1a1fbca824a52b4e09b54d4b4f4a4e12d71c9e4b7e8606fb
2022-12-23 19:16:45 +00:00
larrybr
0953c5354a
Add base64() and base85() text/blob conversions to the CLI.
...
FossilOrigin-Name: 4bc98a2d9520efa9b80142163cbfab72a5f2fe9854cd6ba8291dcefdb872e657
2022-12-23 19:04:59 +00:00
stephan
ace682e149
Explicitly omit threading and extension loading from the ext/wasm/c-pp binary build to avoid a link error on some systems.
...
FossilOrigin-Name: 5d9a14715c25efcd81cadafabf03aad7213251bd1b3dc181939c2dba8d942fb6
2022-12-23 18:38:14 +00:00
stephan
7298c2e099
Add SQLITE_ENABLE_MATH_FUNCTIONS to the list of feature flags in sqlite3-wasm.c.
...
FossilOrigin-Name: 58503cd148c9613abfaf7c1386c34806150bd521966864ccbb821ea7dede8e5a
2022-12-23 18:25:48 +00:00
stephan
a9e1d96cd8
Cherry-pick [c4dab53b8ea3401abd] for sqlite3.wasm.xWrap() optimizations.
...
FossilOrigin-Name: 9b97412d3aa791870016ab3c6f565b6a6afa1764f98e969833aec093b9b29919
2022-12-23 18:19:28 +00:00
stephan
b5915699d0
Internal cleanups and minor speed optimizations in the sqlite3.wasm.xWrap() infrastructure.
...
FossilOrigin-Name: c4dab53b8ea3401abd57671b8f3cb39fa4431b864d4c4e14ae24592f8d4cba0a
2022-12-23 18:14:36 +00:00
drh
3547e4997f
Fix lots of harmless, nuisance compiler warnings, mostly unused parameter
...
warnings in extensions.
FossilOrigin-Name: c14bbe1606c1450b709970f922b94a641dfc8f9bd09126501d7dc4db99ea4772
2022-12-23 14:49:24 +00:00
stephan
0f29f17bf6
Add sqlite3.capi JS bindings for the sqlite3session_...(), sqlite3changeset_...() and sqlite3changegroup_...() APIs, noting that they are completely untested. Aside from missing tests, these bindings reveal a slight string-argument-type shortcoming in the callback function pointer "reverse binding" which should ideally be resolved before publishing them.
...
FossilOrigin-Name: 0a39172ee134816f5ce17a403b960e9c22bb56efd5bcf77ecde465efe0d88b1d
2022-12-23 14:11:54 +00:00
stephan
cc1cc9d7b7
Initial pieces for binding the session API to JS. Far from complete. See [forum:210e36a1e3 | forum post 210e36a1e3] for the discussion.
...
FossilOrigin-Name: cd8c100808da1043fcf63555f48f30c90272c48c6627321ceb0a0995b34733d1
2022-12-23 11:46:26 +00:00
dan
73e460c932
Fix a faulty assert() in fts5.
...
FossilOrigin-Name: 569018170b928cadfa0745db631981084e595d90a8c3d1e236c42adae161018f
2022-12-19 20:14:22 +00:00
stephan
c6c1d7bfbd
Minor sed script tweak in the wasm GNUmakefile for BSD portability, as reported in [forum:4a97813fcbd4f63e|forum post 4a97813fcbd4f63e].
...
FossilOrigin-Name: 49efcf6d9f894c28a3ffb350a7c5f0ffd12c7cbf61f5c27f76eb7f777b8a24c5
2022-12-19 14:46:17 +00:00
stephan
3ce8badcba
Update test-opfs-vfs.js to account for recent API changes. Reported in [forum:4a97813fcbd4f63e|forum post 4a97813fcbd4f63e].
...
FossilOrigin-Name: 2a636746360c109f1d39fc352b9f1c83a739735520252a264c774e848597475d
2022-12-19 14:43:17 +00:00
dan
1532f9d155
Fix an assert() in fts5. Simplify memdb xLock/xUnlock some.
...
FossilOrigin-Name: 7fe158aa8071acadd959b2b4a4b66e8a7f7eecec207ba681abf516b0457c2921
2022-12-19 14:06:36 +00:00
stephan
ba1e6f8279
JS namespace updates in ext/wasm/api/README.md.
...
FossilOrigin-Name: ca59e736b1839c30a820dd5795b4534e1565387ef701423451ea4c503a9701ea
2022-12-18 12:00:10 +00:00
stephan
a4d04c59ba
Update wasmfs.make to get WASMFS building again, but changes made to OPFS-over-WASMFS since we last tested it have made it incompatible with how we used it. It can now only be used from worker threads, eliminating the one benefit it had over the sqlite3_vfs OPFS implementation. Remove/amend references to WASMFS in the docs and remove all WASMFS-specific test app links from index.html.
...
FossilOrigin-Name: 32dc98c8001387b1970623192ec6cb89445000fa49bda5f4bd7c525bbe20bb5b
2022-12-17 11:14:35 +00:00
stephan
e9f740e484
Expose a JS-friendly subset of sqlite3_config() to JS, with the notable caveats that (1) setting up the JS bindings requires starting the library, making sqlite3_config() illegal to call and (2) calling sqlite3_shutdown() in order to make it legal to call sqlite3_config() may undo certain JS-side library initialization. Move sqlite3_(de)serialize() into the int64-mode-only bindings because of their int64 args.
...
FossilOrigin-Name: 62e0c931ac952219f68e22d64e20836781bf330b4581e4662266172a97c9289b
2022-12-16 13:04:21 +00:00
stephan
7c1c5b6232
Add a test confirming that exceptions are not passed through C-space if a JS-side sqlite3_set_authorizer() callback throws.
...
FossilOrigin-Name: 5a77c2c7aaa556007274e1b85790934665c2c12661ca11d896eb7d09cd49ce72
2022-12-16 11:33:42 +00:00
stephan
d83ab0cf85
Add sqlite3_set_authorizer() support and related tests to JS.
...
FossilOrigin-Name: 551b848894c249cb3c9d237643d2ed53ffcb3b003d0cf3f797a535df1731ce39
2022-12-16 11:13:32 +00:00
stephan
a51e044a5b
Added a couple missing 'not part of the public API' tags on functions in sqlite3-wasm.c. No code changes.
...
FossilOrigin-Name: eb27feecea508f3491a09699f2339951facd2345d479cfd3020183dc2af703b2
2022-12-15 18:50:30 +00:00
stephan
73b471964b
Internal refactoring of how sqlite3.wasm.xWrap() handles JS-to-C function pointer conversions, to enable similar conversions to be added more easily.
...
FossilOrigin-Name: 10cfe3fae6f680d3ecc3b0afbbf628ce91e34e3757b19dd27c231f0daf44232a
2022-12-15 02:28:55 +00:00
stephan
d60061616f
Remove an unnecessary/obsolete Emscripten-specific export.
...
FossilOrigin-Name: fa278022afd6dd6e499d26f74a8359f3e9973e1680772059ce331b64e77ec582
2022-12-15 02:26:13 +00:00
stephan
1a1d8bbdc3
Rename the new peek/pokeF32() and peek/pokeF64() to peek/poke32f() and peek/poke64f() for consistency with related APIs and because they're easier on both the eyes and the fingers.
...
FossilOrigin-Name: cc86f03ed698a071cd02ef3dfaba69092226bff20c917d662f808061627ad285
2022-12-14 18:06:01 +00:00
stephan
e5e61d40e9
Slight reformulation of some test code to test multi-arg wasm.peek() call form.
...
FossilOrigin-Name: 349bb28f614bc210b3283ed1c1144c45fbc7d9e2ffc3dc6193ccb9932d347efb
2022-12-14 16:40:17 +00:00
stephan
8a5c032b07
Use the new peek/poke() variants throughout tester1.js.
...
FossilOrigin-Name: ef7b783552f7783a728837fcfc81e493b135a7aac59747397e7e3d28f4309f95
2022-12-14 14:40:36 +00:00
stephan
feb9123a8c
Add convenience variants of sqlite3.wasm.peek/poke() for each numeric type to help reduce errors related to typos in the final argument (type-name strings). If wasm.xWrap.FuncPtrAdapter is called as a function, instead of a constructor, it now behaves as if it were called as a constructor (previously it threw an exception).
...
FossilOrigin-Name: 14e3fc01b929fa3f9a2fdbd93deb4a8aad58c111d46369c772def0437152fa75
2022-12-14 14:28:54 +00:00
stephan
bca56f384f
Add a test to demonstrate/verify which object acts as "this" in a oo1.DB.exec() callback.
...
FossilOrigin-Name: 8fc4b3f10f61e965853a22bf7a64ad2511ef656d66658a7910bac35b0f9805ec
2022-12-14 08:12:01 +00:00
stephan
b943df9323
A micro-optimization in sqlite3.oo1.DB.exec(). Changed the rowMode option of that method to only accept $X instead of $X, @X, and :X, as the extra options are entirely superfluous and may lead to confusion.
...
FossilOrigin-Name: 82a6c7fdf59729c182545b15c084b136e34513f340e87a7b6e5aa199117357b0
2022-12-14 08:01:34 +00:00
dan
5d75eb3fbf
Fix a comment in ext/session/test_session.c.
...
FossilOrigin-Name: bd814af14b6d67c4f8cf6482a0657f9437811a2820196ea6ccf22514291fe360
2022-12-13 19:52:23 +00:00
dan
e1dcb44307
Prevent the sessions rebaser from generating changesets containing UPDATE records for which non-PK fields are present in the old.* but not the new.* record. Also update the changeset iterator to work around such changesets.
...
FossilOrigin-Name: f9cd23dffba06b1982c0a5e5362dba53eba768120a2daa985b4f649d3fea1427
2022-12-13 19:40:56 +00:00
dan
83084267e0
Add extra test cases for applying sessions module changesets to databases that have been modified using "ALTER TABLE .. ADD COLUMN".
...
FossilOrigin-Name: a7b404f21f657f395eddb32e218eae14e09df08fa03f68ca8bba79ea322ce8ba
2022-12-13 14:59:28 +00:00
stephan
3c9749ab74
Document the role of the sqlite3.client JS API property.
...
FossilOrigin-Name: 5f11f1c7d5f8b627acd2ace277521d39fe2ffb0ef1dfe532e65fb56ea3dfb4d8
2022-12-13 10:54:12 +00:00
stephan
30f50a2d34
Extend the sqlite3.wasm function pointer argument converter to be able to handle the "two-layered context" of sqlite3_create_collation() and friends and make use of FuncPtrAdapter to perform JS-to-WASM function conversion for them.
...
FossilOrigin-Name: 0a60b7215e433f8c50027c70731b11e58d74c90ec5903e66ae42f9c98e40b044
2022-12-13 08:25:28 +00:00
stephan
33ce0b3ff3
Revert part of [9386d6f63468] because the new automatic function pointer binding cannot properly track per-context function mappings when the context is more complex than a single context-type pointer. e.g. it is fine for sqlite3_trace_v2() but it breaks down with sqlite3_create_collation() because that one needs to use the collation name as part of the context key and we cannot sensibly do so with the current code.
...
FossilOrigin-Name: 6cd21b79075367227b57bccf829cc7d4ccc7d7fbcfaed226b4c8e942ddae4eb6
2022-12-12 18:42:39 +00:00
dan
d8e07c780c
Add new logging code SQLITE_NOTICE_RBU and use it when logging for the spurious error that RBU injects into SQLite as part of applying an update.
...
FossilOrigin-Name: cd881d35150be7f28cc1ca1eca0e950b5a039bef61190fcae4f944ef0e91f234
2022-12-12 17:33:36 +00:00
stephan
124fc52d96
Move JS-to-C binding signatures from sqlite3-api-prologue.js to sqlite3-api-glue.js to allow for use of the new/experimental sqlite3.wasm.xWrap() feature which automatically binds JS functions to WASM/C as needed, which simplifies creation of bindings which take C function pointers. Reimplement sqlite3_exec(), sqlite3_create_collation(), sqlite3_progress_handler() to use this new feature.
...
FossilOrigin-Name: 9386d6f634680b4e0fa5487c34c63acb29f0b7a6ae738b8f6164ad084a229b62
2022-12-12 14:31:38 +00:00
stephan
5dbfc0dfdd
ext/wasm/module-symbols.html: for C APIs which have extended JS-side semantics, link to the JS-side API docs instead of the C docs.
...
FossilOrigin-Name: d557015208f504c6d5d20ebf1e451b3f07b19590d76371b16a9f4b54e9645282
2022-12-12 11:38:22 +00:00
stephan
13e5512b28
ext/wasm/module-symbols.html: add a hyperlink to the API docs for each exported sqlite3_...() function.
...
FossilOrigin-Name: 01d3a9bba3120cfec3f752048281f18ce7ab48fa7584750c097233a9ce095a20
2022-12-12 11:22:05 +00:00
stephan
b2eb8a5352
Rework the internals of how argument/result types are converted to/from wasm in prep for attempting to support automated conversions of function pointer argument types.
...
FossilOrigin-Name: 58052d8285cbc2aa8c4f8a9f5c2d33ac12014f6a70afbc93bc4ce5b9fd1f9ee5
2022-12-12 08:16:47 +00:00
stephan
81aca2574a
Add sqlite3.mjs to the new 'quick' wasm build for the sake of the snapshot build.
...
FossilOrigin-Name: 5a3f2224c37c7e28ce627bd98a9907a16635bffeea36e8ead707586aad37ccfe
2022-12-12 07:52:22 +00:00
stephan
fda3c30b7d
Expose sqlite3_txn_state() to wasm.
...
FossilOrigin-Name: f6f3397a4667b15a96bdf4189c54789d622fd90351405e963d7f56ac93a9344c
2022-12-12 07:31:37 +00:00
stephan
9bda4c53c1
Expose a number of infrequently-used sqlite3_...() functions to wasm whose absences were noticed while documenting.
...
FossilOrigin-Name: 3144e7c0b8633d99daa07d75dabfe6e115ad401110f6f3c85f768e973299f3d9
2022-12-12 07:27:22 +00:00
stephan
56bc31588e
Minor build tweaks in ext/wasm to create a faster-running build for the common dev-mode cases. No code changes.
...
FossilOrigin-Name: 6a61b14a6cf8279a5b8b77f934c2b97965f5e3fe4cddb03e78c2c0a840dbe6f6
2022-12-11 07:53:03 +00:00
stephan
e8bbf12ad3
Remove -flto from wasm build flags, as it increases build time and doesn't seem to have a measurable benefit.
...
FossilOrigin-Name: 35a88747eb0bb9eebb60550f91d0fe0c7a5ae11ec0a1315ae056fd79e9436a3f
2022-12-10 17:45:40 +00:00
stephan
130cd85026
Correct wasm heap corruption introduced in test code added in [e144fd5c88fa4] which led to unpredictable failures.
...
FossilOrigin-Name: 6c1e07e3857b38e394853891a9028e88319bad4bc7b7b15078e25f430c3b1222
2022-12-10 17:20:29 +00:00
stephan
8c0041f5bf
Remove two incorrect calls to structType.dipose() which prematurely freed objects in use by the virtual table test/demo code.
...
FossilOrigin-Name: 060eb2848975a24ff6683a8a9c4d7546ae36147323b0edae01fb42f52d9bb2d6
2022-12-10 15:41:47 +00:00
stephan
9cb6ff2792
Expose sqlite3_column_value() to WASM and add sqlite3_column_js().
...
FossilOrigin-Name: 7783aa4af1331190fd1f42a71bb724041e2e82b51745f9740926e4ead83a97ed
2022-12-10 15:13:29 +00:00
stephan
5c99d91e53
Refactor the internal JS routines for converting UDF results and errors to JS into public APIs.
...
FossilOrigin-Name: 35d1d63c7d60119b64341c561294890812837d5432d1d7bed3ed88d6212fbfa0
2022-12-10 10:24:46 +00:00
stephan
8ccef8f27f
Export sqlite3_result_subtype() and sqlite3_value_dup/free/subtype() to WASM.
...
FossilOrigin-Name: 4600a7bbdc4cbe14591d48ea19fe5f7de3a0c10a14cdd97fd51e263a13163d10
2022-12-09 15:26:58 +00:00
stephan
706780fbd9
Expose sqlite3_value_frombind/nochange/numeric_type() to WASM. Add a flag to sqlite3_value_to_js() to cause it to return undefined, instead of throwing, if no conversion can be found.
...
FossilOrigin-Name: de8fc4bf34f80f320012a0e506ed8e3e24806daf67845d5dabb00b916108f6ef
2022-12-09 15:12:07 +00:00
stephan
99f30f1cd4
Refactor the sqlite3_value-to-JS conversion from an internal detail to sqlite3.capi.sqlite3_value_to_js() for use with routines like sqlite3_module::xFilter().
...
FossilOrigin-Name: f6dbf280f99809a80c99337e4c22a86dea7a35ae41ae9a69144c4502385a0a1f
2022-12-09 14:46:24 +00:00
stephan
3ec44736b5
Remove some unused sqlite3_status() codes from the JS API. Add custom JS wrappers for sqlite3_create_collation/_v2() which accept JS functions (plus tests). Expand the argument options for sqlite3_wasm_db_error() to enable it to translate exception objects to C-level errors.
...
FossilOrigin-Name: 073a2f1eb006230ae0995a5ea6c789407bcaa819ec15b5064c66d8973ed4671a
2022-12-09 12:12:49 +00:00
stephan
81a3683174
Rename the oft-used, verbose sqlite3.wasm.get/setMemValue() and get/setPtrValue() to peek/poke() and peek/pokePtr(). The old names are retained as aliases just in case any client code actually uses them, but they are now deprecated.
...
FossilOrigin-Name: ad0a8139b0b025f8e9d2eca0c303557ef10fdfab8c8b65afb08c510a804073d5
2022-12-09 09:23:27 +00:00
stephan
5a83f52f48
Micro-optimization in the oft-activated JS-to-WASM arguments conversion step.
...
FossilOrigin-Name: ee47e9b83ca668b37dc1d8e519048a635693cf33d9967a2d81ff0824b7eea4ba
2022-12-09 08:44:22 +00:00
stephan
a3451dd990
Correct a test bug which broke the previous checkin's wasm tests in higher optimization levels. Test bug - it should not have worked in -O0 mode.
...
FossilOrigin-Name: f07141b7500c36169c2c96e045acf37ec97a0d75c0a5f4d0ebed4dc1d2094ccf
2022-12-09 07:17:54 +00:00
stephan
464c80d4c2
Export sqlite3_status() and sqlite3_stmt_status() to wasm. Expand the arg/return semantics of wasm.get/setPtrValue() and get/setMemValue() to simplify handling of multiple pointers.
...
FossilOrigin-Name: e144fd5c88fa4151429a2fef3daf389588402e158267f0afa0dfd142527d76b9
2022-12-09 05:47:42 +00:00
stephan
75f54dba50
JS API doc updates.
...
FossilOrigin-Name: 4f80fd3b8d4c85894664093d8310d6f5299faac4eb879edc608b3ffcd8558e9a
2022-12-09 02:23:15 +00:00
stephan
735dd03377
Expose sqlite3_table_column_metadata() to wasm.
...
FossilOrigin-Name: c31eb509e5cb1025de058132ee9a45d70c84ee47a6abe18811a65ce339f062a0
2022-12-09 02:12:43 +00:00
stephan
6ca03e14e9
Expose sqlite3_db_status() and sqlite3_db_config() to wasm, noting that the latter requires several internal wrappers to account for the various varidic forms (C varargs cannot be bound to wasm).
...
FossilOrigin-Name: d5753668915c1db204fa80153614653243081ffaddea22f26ad59bb1836948b9
2022-12-09 01:49:17 +00:00
stephan
d27c3e4e7e
Reorganization and renaming in the new VFS/vtab JS pieces.
...
FossilOrigin-Name: 1c2dda177a11fcc5b66e5554507c23ba4b9948a710b3bccfb26963b9851d40a4
2022-12-09 00:50:39 +00:00
stephan
1a9a29815a
Further docs and minor cleanups in the JS virtual table helper.
...
FossilOrigin-Name: c31e7488ac1a6b957782b72bd026b1f0590637b631e44a1fdf1dedeb5c587819
2022-12-08 18:18:37 +00:00
stephan
500fa7d518
Ease-of-use/legibility improvements in the virtual table JS helpers.
...
FossilOrigin-Name: 54c7ad7e08bdb87579398ade366605bfa2e2538a94aabcc6e4cda8e173649760
2022-12-08 17:07:27 +00:00
stephan
4bfacc4b40
Initial support for virtual tables implemented in JavaScript.
...
FossilOrigin-Name: a1454744c770a30a32a6d7b7fc59ef7be48cf67348b238540592850d7c2c7757
2022-12-08 15:00:53 +00:00
stephan
16bf97b507
More work on the JS vtable tests.
...
FossilOrigin-Name: 51e3c3b569dce2097063d39dc484f44b2f98cad0a902ef66765ca4cdc3e06f47
2022-12-08 10:06:07 +00:00
stephan
d061f14466
Got JS non-eponymous vtable working thanks to a hint from Dan.
...
FossilOrigin-Name: 750719b4981df62fa2ff3665e6f559ec760609ad2493495628295ad9ae6024fc
2022-12-08 09:06:20 +00:00
stephan
ab8b22a03d
Remove some dead JS code and tweak some docs.
...
FossilOrigin-Name: 0ee495452c014680697aa9035c245024df127a52d1820ab0e02580a015d96ecb
2022-12-08 04:19:38 +00:00
stephan
1eb1b59b89
Work on an alternate (slightly simpler) approach to binding JS vtabs. Non-eponymous vtabs are not working, for reasons as yet unknown.
...
FossilOrigin-Name: 6a0fefb93bcccd950df211cf5c2f49660c7b92115dd01b2b508a4ab9e3ab3d23
2022-12-07 07:22:34 +00:00
stephan
30da58c5d6
Add addOnDispose() method to Jaccwabyt and code-adjacent minor internal cleanups.
...
FossilOrigin-Name: 6a2723fe3f28dd94328d901e64e1e9ee9a1b2e9eeaed6c54038a5b83c914db78
2022-12-07 03:42:39 +00:00
larrybr
3c01af6ffc
Avoid several -Wall warnings in textfixture build.
...
FossilOrigin-Name: 03ae8680e430c6d2c39ca26fa2cb6eed46e3c3e52b53f7a8bf548560446c6d3d
2022-12-06 19:20:49 +00:00
stephan
241cde98b8
JS vtables: add infrastructure related to accessing and modifying sqlite3_index_info.
...
FossilOrigin-Name: 0d77c348039926c24e0fb50a7dc7e4b62895cd201c021f8e29832917e4b8b09f
2022-12-06 11:21:46 +00:00
stephan
d254db53e5
Remove deprecated symbol sqlite3.opfs.OpfsDb, which was renamed to sqlite3.oo1.OpfsDb on 2022-11-29.
...
FossilOrigin-Name: 0ce51bed65d5e430364f74bf959fb76c42ac5eec0769490231d8c8110a1f388c
2022-12-06 09:49:04 +00:00
stephan
75435f8b2d
Rename wasm.cstringToJs() to wasm.cstrToJs() for consistency with other wasm.cstr... APIs.
...
FossilOrigin-Name: cbf483ea0ba3e6dc08ad7ed654380f818544b4c3cedfdb8aa848a83298268ceb
2022-12-06 08:46:39 +00:00
stephan
671386c637
Add wasm.cArgvToJs() to support sqlite3_module::xConnect().
...
FossilOrigin-Name: c3ebdccf94d5e63c229bf91056c08052d78732e663334070ef3b0ef6fb4bfb8f
2022-12-06 08:39:17 +00:00
stephan
b849832a79
Minor internal JS code/docs cleanups.
...
FossilOrigin-Name: 21331bdd36a91b07a687ffadce392dcf2ccd0fd824b35d9dd027d4289a40fc96
2022-12-06 08:21:23 +00:00
stephan
2a665edbd4
Minor test tweaks.
...
FossilOrigin-Name: f902f3b2c79d6c699ead1efeb1426e1e0f4ac709afdff88be1de62f34f3d5ccc
2022-12-06 06:16:11 +00:00
stephan
6b271abc98
Add a demonstration sqlite3_vtab/module implemented in JS, based on ext/misc/templatevtab.c. Add oo1.selectArrays() and selectObjects().
...
FossilOrigin-Name: 60482c97e02bc4cafefef281be0cf0bc8c5c53232162829c137f3f7a80cdc534
2022-12-06 06:09:03 +00:00
stephan
2582d418d3
Remove two features of jaccwabyt which were fundamentally flawed, along with approx. 250 lines of unit tests which heavily relied on them. Thankfully, none of the sqlite3.js-level code used those bits.
...
FossilOrigin-Name: a190abc307847174f36421eaa3f47ef349c6f84a2bb35857fa64f64bbe722708
2022-12-05 15:05:46 +00:00
stephan
cfb66014bc
Jaccwabyt (JS) doc updates.
...
FossilOrigin-Name: a329a809b5da135a9c251e4d5f637d45d01d0248110ac05f2ad8f01d9df38c64
2022-12-05 14:32:35 +00:00
stephan
e1d25177c2
Expose sqlite3_get/set_auxdata() to wasm. Minor test app CSS tweaks.
...
FossilOrigin-Name: 44659ad32a9fe6363badfc5dbb0bd51d6fb2ee1c8aa47b71e9cf3dbd631fde9e
2022-12-05 14:13:55 +00:00
stephan
e0818715b7
Export collation-related APIs and strncmp()/strnicmp() to wasm.
...
FossilOrigin-Name: c3c56d9b944fd0d806d8dad9f0c7be3d7a5441765310908872cc525d82ab6a33
2022-12-05 13:33:42 +00:00
stephan
9a49a97487
Export sqlite3_vtab_collation() to wasm. Rename 'flexible-string' JS argument adapter to 'string:flexible' for consistency.
...
FossilOrigin-Name: 15f8042fddaeabab43dd187c463d3ccc56758cbf19bf2ca4837d9087a4850c1a
2022-12-05 13:12:48 +00:00
stephan
cf8f0d2046
Rename 'static-string' argument adapter to 'string:static'. Replace JS unit tests which were lost via editing a generated copy of tester1.js instead of the original tester1.c-pp.js input file.
...
FossilOrigin-Name: 9d81d51d5a255b42f8416da850c992a9e4c8eebc940e0702a9262cfcaa6d7b2f
2022-12-05 11:54:13 +00:00
stephan
0adef09374
Export sqlite3_bind/value/result_pointer() to wasm. Add 'static-string' argument converter to support the lifetime requirements of bind/result_pointer()'s string argument. Correct an endless loop in wasm.cstrlen() when passed a non-C-string argument.
...
FossilOrigin-Name: a94552434a657376d5ce1831de05c1b15fb153020848cd825fb0df413c3baa70
2022-12-05 11:30:39 +00:00
stephan
08fc64ea04
More work on the JS side of the virtual table APIs.
...
FossilOrigin-Name: cb9881ec001b0e2faf047e57acfd1722d2b546255a54e0f850f568edfe2df1cd
2022-12-05 07:51:25 +00:00
stephan
864c3c029b
Remove some dead code. Improve some error checks and comments.
...
FossilOrigin-Name: 6712fbe46a97867cea309f78a274edbb6bd166a505b41e18a580306da0e063db
2022-12-05 05:45:00 +00:00
stephan
e177447972
Initial infrastructure for adding virtual table/table-valued function support to WASM.
...
FossilOrigin-Name: c202d7a0398b9aabc2babba5c4c91a313f32bbf37549d419775642bb4aa3936a
2022-12-05 05:30:03 +00:00
stephan
a81c5b3a88
Export sqlite3_result_zeroblob/zeroblob64() to wasm.
...
FossilOrigin-Name: a60e56627fc0ef8831429941d429ee02c6ee51ce5a2c1af581dc5bc5a00d911e
2022-12-04 08:16:33 +00:00
stephan
9baafdabf7
Correct a memory leak in tester1.js.
...
FossilOrigin-Name: e42b052dd754e577b8429e2430821c5f88096170ffa58b4e5e3cb7ee19b6c37d
2022-12-03 15:41:29 +00:00
stephan
cbcc08ddc4
sqlite3.wasm.allocFromTypedArray() now optionally accepts an ArrayBuffer as its argument.
...
FossilOrigin-Name: 75a1a796f86d289c7275666fab19013934775dcccaed44a1a61d1749a6cb99c9
2022-12-03 14:58:45 +00:00
stephan
09c27a59db
Rename wasm.xWrap.resultAdapter() X:free entries to X:dealloc for consistency with wasm.dealloc(). Add an undocumented feature to replace wasm.alloc/dealloc/realloc() with the C-standard allocators (after an allocator misuse led down a several-hour rabbit hole trying to discover a mis-free() violation). Related test updates.
...
FossilOrigin-Name: d9807656f8a7c2a893d3f68ee5592f44826b8e999ae66f7d9000674b5c1b0207
2022-12-03 13:10:58 +00:00
stephan
85ef4e4344
JavaScript: add sqlite3.wasm.realloc(), sqlite3.capi.SQLITE_MAX_ALLOCATION_SIZE, and related tests.
...
FossilOrigin-Name: eeb84ba5de1152ef0f42105b8b285fdee9f5ad58281e60a4e0c8b1d6de1dead8
2022-12-03 11:16:55 +00:00
stephan
2564ca7d15
wasm build: rename the path to the wasm docs checkout, for clarity and consistency.
...
FossilOrigin-Name: b820db32365b2ca8e2397fd6ea85883e4555ffd82948e248a0f98415b7328349
2022-12-03 03:06:16 +00:00
stephan
1369d6be02
wasm snapshot and doc-related build automation tweaks.
...
FossilOrigin-Name: 13eb1abd06f55fb88fc7f7be6149fd94b12057d9c38cc6b97bec3940e7e01f04
2022-12-03 02:42:21 +00:00
stephan
a37fed0f62
Rework the oo1.DB's distinct-per-VFS post-open() step to accept either a batch of SQL or a callback function. Increase OPFS's busy timeout to 10s.
...
FossilOrigin-Name: 9feefe253ac487cb52be6bdf91bdd305963266716baa08f2bf9505954ee76321
2022-12-03 01:59:03 +00:00
stephan
bb4e4a4840
Minor internal tweaks to the OPFS VFS. Resolve a missing result code which lead to a null deref in xFileSize().
...
FossilOrigin-Name: 57dd593ef0efa17dfb3a9f4eac36d5b8b879e271de817d8cd94a8c8b56d31870
2022-12-02 18:56:37 +00:00