Commit Graph

3749 Commits

Author SHA1 Message Date
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