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
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
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
19d14f9717
Add base64() and base85() to shell sources for the non-configured makefiles, too.
...
FossilOrigin-Name: ac136925a6453d3e53c7a380911dfeac5706d49f936294289f6ea0b74e26e18a
2022-12-23 19:11:57 +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
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
drh
de5f3af2b9
Additional fixes for yet more completely harmless compiler warnings.
...
FossilOrigin-Name: 7d3772f0bd0e2602fe919573b49001da4e2b9f3874cb0183dea675204afa7abd
2022-12-23 11:46:57 +00:00
stephan
dc02d5658b
Squelch a new (and, in this case, harmless) compiler warning.
...
FossilOrigin-Name: a02e19dd6ce00492f3d187e3c3c9bde4d9d1ee9a23616e62ea3590eec95652bd
2022-12-23 11:32:06 +00:00
drh
f26bad66ba
Asserts added to ensure that the iCompare variable in the bytecode engine
...
is correctly initialized before it is used.
FossilOrigin-Name: 7b5900a111b9410f7d60c937e5a56304f2f66b94cd0881e94abcc5eedde52514
2022-12-22 21:32:58 +00:00
drh
cce70d52d0
Avoid having to reinitialize Vdbe.pResultRow upon each call to sqlite3_step()
...
for a small size reduction and performance increase.
FossilOrigin-Name: 6a00d67f5955ab86eea982c27b3a03b680fdf644ec63f49586ade6342a4d64a6
2022-12-22 19:12:48 +00:00
drh
edc2713fdc
Rename the Vdbe.pResultSet field to pResultRow in order to better distinguish
...
it from other variables with similar names.
FossilOrigin-Name: 1fd6211ef7bd26ed625177bfedfd5153ace547de6a71365ecfa076578d043f1a
2022-12-22 18:44:39 +00:00
drh
c2d853e562
Small performance optimization associated with shared cache in the
...
byte-code engine.
FossilOrigin-Name: 3181331c1c0259d5cd274dcb33faba930dae51b1f0fe51e8a0318d9c564b94f9
2022-12-22 18:35:21 +00:00
drh
57366d8cec
Small performance optimization on the OP_Insert opcode.
...
FossilOrigin-Name: 781fdcb9ce85aa2844ef8c00cf908f1a87eeff80dadaf73a71f88b4279260e57
2022-12-22 17:36:02 +00:00
stephan
913dcaf0ca
sessionfuzz.c: use lt/gt brackets instead of double-quotes when #including zlib.h, as reported in [forum:91a104bd65 | forum post 91a104bd65].
...
FossilOrigin-Name: 7d7780c350f3239f9c9feb91924a01a4eba31b88060946c766719c9d50c16bcd
2022-12-22 10:53:08 +00:00
drh
79b9bc4452
More efficient implementation of large precisions on the "%c" format for
...
the built-in printf(). This is an effort to avoid a reported
timeout on a (ridiculous) query generated by OSSFuzz.
FossilOrigin-Name: 371f9b88387a44a5f820279d79733d1deb7eafc72f320ec47a11679bbdbb49ef
2022-12-21 19:11:56 +00:00
drh
fe83892bc1
Ensure that the expression of a virtual column really is an expression and
...
not just a reference to another column, as a real expression is necessary for
the indexed expression coverage optimization to work properly.
[forum:/forumpost/07b36e3899a9ae21|Forum thread 07b36e3899a9ae21].
FossilOrigin-Name: 40549bacb3923e439627b0103bedd7da30258b69a46960040f7176e060f51f2f
2022-12-21 14:13:49 +00:00
drh
4f0c36b327
New WHERETRACE entries for adding and removing objects from the
...
Parse.pIdxEpr list as part of indexed expression coverage. Debug and
testing changes only - no affect on production builds.
FossilOrigin-Name: 4dc438a951bdbe27fbd5ee7cfb907e30ec0efbf8ce02109f18997cc221e0ad3b
2022-12-21 12:18:06 +00:00
drh
87bdc152a1
Add about 150 new fuzzer cases to test/fuzzdata8.db.
...
FossilOrigin-Name: a8d8d9cd65e64e0a492a80c00050f54ab75de82651230049f65c9d2b78a164f2
2022-12-20 15:22:57 +00:00
drh
2656b1b0a0
Add ALWAYS() to always-true branches in the locking logic of the memdb VFS.
...
FossilOrigin-Name: 01fa760212a40cec5b43da99b917ab6389561c96d0567a9f67f516bdfa8f5f3d
2022-12-20 15:02:44 +00:00
drh
1379b9f51a
Improvement to the dbsqlfuzz fix of [f113eebdbe68246f].
...
FossilOrigin-Name: 79d62956f206cb2987891d4ba5985cece21fc8c8c1158f46c2951f65c0dcf4e8
2022-12-20 14:02:35 +00:00
drh
98164c3452
Do not use indexed expressions to replace the expression being indexed on a
...
RIGHT JOIN as that leads to problems, as shown by
dbsqlfuzz a644e70d7683a7ca59c71861a153c1dccf8850b9.
FossilOrigin-Name: f113eebdbe68246fd38d640b0cdf0fd73ab5d2abad9226274dfa2e41fe286bf0
2022-12-20 01:48:43 +00:00
dan
73e460c932
Fix a faulty assert() in fts5.
...
FossilOrigin-Name: 569018170b928cadfa0745db631981084e595d90a8c3d1e236c42adae161018f
2022-12-19 20:14:22 +00:00
drh
b7fe3cb890
Remove an unused variable.
...
FossilOrigin-Name: 5c4d94147d290d4a68ac0d5ae8f9e6bbfe7522ad58b2298e387f8c699048e111
2022-12-19 19:04:32 +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
drh
a4569bd5d0
Fix a minor problem with the printAggInfo() routine (used on during
...
debugging).
FossilOrigin-Name: c8329967f32efedfc8244631a5682f7f7d21c1b3fcd7d5cc67716555716d4926
2022-12-19 12:25:41 +00:00
stephan
ba1e6f8279
JS namespace updates in ext/wasm/api/README.md.
...
FossilOrigin-Name: ca59e736b1839c30a820dd5795b4534e1565387ef701423451ea4c503a9701ea
2022-12-18 12:00:10 +00:00
drh
b7959e3419
Fix an unnecessarily restrictive assert() in the aggregate logic.
...
dbsqlfuzz 699bee2aa26c5dc84afabf6894685c316d936485
FossilOrigin-Name: 8cc0af81ad03ac65f230d78cf97e1448c2d93d556467ea3ef700d5abd4a3890c
2022-12-17 22:10:05 +00:00
larrybr
88fbe16154
Remove slew of inadvertant tabs in favor of spaces.
...
FossilOrigin-Name: 0aa6da69e12e483b5561bb9a054ec27a99f51772340c950783e342e6dd39beb9
2022-12-17 19:56:28 +00:00
drh
1c70429569
Add NEVER/ALWAYS to branches that have become unreachable due to recent
...
enhancements.
FossilOrigin-Name: b4281db4e4762773684d27b809ef911da08b81cb953b3666e535b990d4d5f701
2022-12-17 12:49:04 +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
drh
a9d18d83fc
Disallow some of the query invariant tests on SQL statements that contain
...
a GROUP BY since output terms that are no covered by the GROUP BY are
indeterminant.
FossilOrigin-Name: 28ba1fec4519e7ca9466f1a2f787c905f2cf880d38a004639f99f948e46a51e7
2022-12-16 18:32:07 +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
drh
d980442188
In the fuzzer invariant checker, do not add new WHERE clause terms that
...
make use of an ambiguous column name.
FossilOrigin-Name: d5b46541c30bcbeb7e57b5b5951856d564e81f7f9638d66d205157797964418c
2022-12-16 12:07:48 +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
drh
00d6b2755f
Create a new affinity called FLEXNUM that works like NUMERIC except that it
...
never tries to convert integer to real or real to integer. The affinity is
only used internally - it is not possible to create a table column with this
affinity. This affinity is used on subqueries and views that are built off
of a compound SELECT and where the datatype is controlled by a CAST expression.
dbsqlfuzz c9ee6f9a0a8b8fefb02cf69de2a8b67ca39525c8
FossilOrigin-Name: 44135d6ea84f7ba6b36549954b38a8bc048d5ffea5a9779e35950afa4eb2dfb2
2022-12-15 20:03:08 +00:00
dan
118b53bd21
Fix an incompatibility between the Tcl interface and the "memdb" vfs by allowing memdb to accept filenames that begin with '\' characters.
...
FossilOrigin-Name: bd537f2057a4800bd30e7dd57405c3e57df649471104c80bd32573a89568029e
2022-12-15 18:56:12 +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