Commit Graph

25154 Commits

Author SHA1 Message Date
drh
9c17ee4f93 Do not accept a NULL pointer for the filename in KVVFS.
FossilOrigin-Name: fdecbd3b5bcdeb358015f461ac6c863f12ab180ab4624ed50734e41e557d8186
2022-10-27 14:00:21 +00:00
drh
f7b58da831 The kvvfs VFS should remember the page size when writing to the database.
FossilOrigin-Name: fc5503c8acb085042e877c9de43256a4fee27f63ab35e2ddad18e40734ed00d4
2022-10-27 12:46:17 +00:00
stephan
bb5136e5cb Re-enable the .recovery and .dbinfo commands in shell.c.in in the fiddle build, as those were fixed by [3d20d77a3511] and [cd0aa27d1732].
FossilOrigin-Name: ba3a7a4a9997f62b78467d78d95fa5b58a03ecb2e2ccb68f4d316fc08fd02f86
2022-10-27 11:32:20 +00:00
dan
340b1d1a71 Do not use sqlite3_result_text16() in the recover extension if SQLITE_OMIT_UTF16 is defined.
FossilOrigin-Name: 3d20d77a3511bb223474da8491e1da8aec098c41c1b81ab78ff80fbd37d5b568
2022-10-27 11:25:08 +00:00
dan
48a4a4b73d Fix a problem with running ".recover" on an in-memory database.
FossilOrigin-Name: 87b4cca2b84845cee603d40fbf16c9635d6dc2d19d2f37ae86abfeff716c9a85
2022-10-27 11:12:54 +00:00
dan
21fd7ce098 Do not use sqlite3_mutex_xxx() functions in sqlite3recover.c when built with SQLITE_THREADSAFE=0.
FossilOrigin-Name: cd0aa27d1732abc61c8a8440118ff629f7dca185d2f515ce1f6090c49d8dc890
2022-10-27 10:51:49 +00:00
stephan
4f975c3379 Minor doc typo fixes.
FossilOrigin-Name: ed8d3f25a4d6ac04d9f7918c791d8d2c6f23ce846278ca63f8fbadb7ea27369f
2022-10-27 03:57:48 +00:00
stephan
3d420836fd Restructure and simplify the feature-detection #defines of the recovery support in shell.c.in and disable it when building fiddle because it uses features we elide from the wasm build (e.g. utf16), leading to link errors.
FossilOrigin-Name: ddd10c05c5d16d7205c347c5c1e73a75faecb2b7ec88a4a15875856765e1b143
2022-10-27 03:56:01 +00:00
stephan
de868175c3 Expose sqlite3_randomness() to WASM and add a custom binding for it which can populate a JS byte array. Add WhWasmUtil.isPtr().
FossilOrigin-Name: 333e67076b4bc967bb543ef8e265c63f6e3498c38ac121a7d1eff4a1d7a71c63
2022-10-27 03:03:16 +00:00
dan
195687f1bf Disable the push-down optimization for sub-queries that are INTERSECT, UNION or EXCEPT compounds. dbsqlfuzz a34f455c91ad75a0cf8cd9476841903f42930a7a.
FossilOrigin-Name: 346a3b12b861ce7ba369e98cd336f79a1d4f7a7bb9acd7a4f63f37b391755bf5
2022-10-26 21:14:21 +00:00
drh
07dd481010 Remove an unused variable from the recovery extension.
FossilOrigin-Name: a029dddff4f4ed7275538610cbd9cea658b905b72924860ec9cda9e76dabcfac
2022-10-26 20:12:46 +00:00
dan
387f468591 Add the "recover" extension in ext/recover/, for salvaging data from corrupt databases.
FossilOrigin-Name: a820792548da596ed0f8ab3fd1c04ec16647abbe51a2a5aac9e17c4f58be6d97
2022-10-26 18:41:12 +00:00
dan
50632afa6e Remove an undefined left-shift operation from the recover extension.
FossilOrigin-Name: a67082357a2cc348faf8236aafa7f39eb5cb673b1d114a594c6d5bb257f85b73
2022-10-26 18:29:19 +00:00
dan
5ad03a486e Merge further changes from trunk, including fix to dbdata.c.
FossilOrigin-Name: bcf6b48d52c1ce656899f50bd508c0920cae8cf2ef3c0758a7633981f0f0f484
2022-10-26 18:22:22 +00:00
dan
8364ce2aa2 Make the shell .recover command and the dbdata.c module more robust in the face of corrupted databases.
FossilOrigin-Name: 4eef562a00ae988f2426c9af51f4165c0e4cbccd601061664a0c54c19b9cc70f
2022-10-26 18:04:34 +00:00
stephan
8c3e234ad5 Correct misuse of localhost-mode-only symbol S in fiddle-worker.js, which should fix the outage reported in [forum:67d985ac0bbe407f|forum post 67d985ac0bbe407f].
FossilOrigin-Name: 3b5aa50c223ac35c7d73e4629420a01408cd74d19ae5b887f91b7a657d91e026
2022-10-26 15:40:17 +00:00
stephan
7731dfca49 Corrected link to fiddle in ext/wasm/index.html (broken by [3d7b4f36b7dd]).
FossilOrigin-Name: 6efa0bae1678bf719a0693feeceb4c1e252fc86502bee9ee2a6d8af9a91d9b20
2022-10-26 15:34:51 +00:00
stephan
34b92b19f3 Replace the newly-removed oo1.DB.getFilename() with DB.dbFilename() with the hope that the distinction from the dbInstance.filename property is clearer.
FossilOrigin-Name: 0b80543d75504c733b73b32f73b96074a4b0cebad64e47032926a3fefee41726
2022-10-26 11:27:33 +00:00
stephan
14ae1a5331 Remove oo1.DB.hasFilename() and getFilename(), as they are unnecessary.
FossilOrigin-Name: 75c546b982024bf2b527c85271111d54158cb010867f6e29fc89e86cc8457cc5
2022-10-26 11:12:14 +00:00
drh
705d7be62d Remove the sqlite3StdTypeMap global constant that was made
obsolete by [aa6e908619624867].

FossilOrigin-Name: 3dfdfb3f12edb3f4267942598efd05d573e13b7c5d6cdbc3404373f41b8993dd
2022-10-26 11:11:31 +00:00
stephan
419e0d3e09 Add --download-version flag to ext/wasm/version-info.c and correct dist target's output version format to match.
FossilOrigin-Name: 6f2a40d06dd9a56491d27928ed3785e08308c7dcea2b3f768097fc98ba91a910
2022-10-26 06:05:44 +00:00
stephan
e896ba94e3 Add doc page link to the wasm dist README.txt.
FossilOrigin-Name: c2380668d9a2ad04f6f27ef052190bda17cdb112895e93b94ae1da70db6983c8
2022-10-25 16:57:42 +00:00
stephan
4831f4e0f1 Correct -O level for fiddle build when built from the top-most directory (-Os instead of -O0).
FossilOrigin-Name: ff4fc29c38b78dfd471e25942304cba352469d6018f1c09158172795dbdd438c
2022-10-25 16:04:44 +00:00
stephan
ce2d4ae6a6 Rename fiddle.html to index.html and move fiddle push-to-server rules from GNUmakefile into fiddle.make.
FossilOrigin-Name: 3d7b4f36b7dd01058d57fc8ef7689d9bbf1a219166796ed427180cd59d2c189d
2022-10-25 15:59:27 +00:00
stephan
16603ecfcb speedtest1: use the current (or default) vfs->xDelete method to unlink the db. This is specifically necessary when running the opfs vfs in a wasm build of speedtest1. This worked without this fix until recently because the affected test code was performing similar acrobatics in its stead.
FossilOrigin-Name: d3c830bd37a402161b486d3631feceae5d00f89c2522aed65fcd2e666bd64238
2022-10-25 15:38:38 +00:00
drh
42dddb97de Enhance the sqlite3_strglob() and sqlite3_strlike() interfaces so that they
will do sensible things with NULL string pointers.  This is an extra layer
of defense against bugs such as reported by
[forum:/forumpost/730b554179|forum post 730b554179].

FossilOrigin-Name: 8ba9c884bded52e3e044ff39c826c04838e7c31f05d802f4a14d9ce5a01ab721
2022-10-25 13:44:18 +00:00
drh
d5ca2c4b3d Make the ".dump" command of the CLI more robust against malformed databases.
See [forum:/forumpost/730b554179|forum post 730b554179].

FossilOrigin-Name: 0573edfb9e0b1fd51e8da20592c71b02040968c33fdec41c31a6b1b7d3e83262
2022-10-25 13:42:10 +00:00
dan
5f726694eb Merge latest trunk changes with this branch.
FossilOrigin-Name: 757e3f585959f4f113fee48fe3d504f037604c53a95c8d47ce5c2bccfb2af8ff
2022-10-25 11:05:31 +00:00
stephan
89954fe7ce Minor doc tweaks in the JS GNUmakefile.
FossilOrigin-Name: 9c8df130b8137cb4705f805907d1ff754d7f4b07bf181e1d05f1798b7aa5f4f6
2022-10-25 08:41:00 +00:00
stephan
d3c8f2ac33 Remove persistence from the 'reverse log order?' checkbox in tester1.js to eliminate an inconsistency between the main-thread and worker-thread modes (the latter having no option for persistence of that setting).
FossilOrigin-Name: ecf906b07f50b4fcc551d20326a1bb1189bd6c2274627fd293f9460658ebea07
2022-10-25 08:15:57 +00:00
stephan
f861b36bf4 Minor cleanups and doc improvements in the OPFS sqlite3_vfs proxy.
FossilOrigin-Name: 48645f7bcacf81c4149f26d20ee1752fbe93a02f96b85bd7e28bfa49322137e5
2022-10-25 08:06:17 +00:00
drh
7704a535d0 Fix typo in comment.
FossilOrigin-Name: f65c95658fe4d30817da8de7eb88e823ea1cd8be40e347d626870bad3cc13359
2022-10-24 18:42:45 +00:00
drh
99a37ca779 Add a comment to a previously undescribed member of the Walker union.
FossilOrigin-Name: 69d704224e9ed022fcec591beff2ffcc4daf3e7fc586debfdcf00b25c1fddd87
2022-10-24 18:33:50 +00:00
dan
80b30f995e Use the same "PRAGMA synchronous" setting for the output of a "VACUUM INTO" as are configured for the database being vacuumed.
FossilOrigin-Name: 86cb21ca12581cae9a29f42ba707bd9d789e667e5ddc0f64b24940d5d5c9a118
2022-10-24 15:51:24 +00:00
drh
4073706a47 Improve the ability of the query planner to recognize covering indexes even
on tables with more than 63 columns and where the index is over columns
beyond the 63rd column.

FossilOrigin-Name: f058773e41495ddbae698f9e9a4f62b7003112ea8614dfad69471340058735e4
2022-10-24 13:20:48 +00:00
drh
2d75c1aa3d Update the fuzzinvariant logic in fuzzcheck to the latest code from
dbsqlfuzz.

FossilOrigin-Name: 739ad584765f1fc0eb196db870785da1726805cc2d9dd0a831a37a9e55a4afe9
2022-10-24 12:38:32 +00:00
drh
1f41a8c8a7 Fix built-in documentation for the ".mode qbox" command in the CLI.
FossilOrigin-Name: 3d7ea33be1076fd21681bdcff0c489646c017594b42b4a21a74e9e2d3947890b
2022-10-24 11:10:40 +00:00
drh
89b373ab28 Test cases for covering indexes on wide tables.
FossilOrigin-Name: 64c3777eb356b15094a9e9fcc135499ba22f4d847fb117afa6ccf19986e33585
2022-10-24 11:02:02 +00:00
drh
7d913e9aae The wide-table covering index detection must take into account aggregate
queries.

FossilOrigin-Name: 9ac73f83c53b9fba10bb1b8bbfd1a8dc8a2dc4a655e811d5b96335dbf2b6fdac
2022-10-23 20:09:13 +00:00
drh
fb643592fe More frequently send the complete SELECT statement into sqlite3WhereBegin()
so that it can more accurately determine index coverage.

FossilOrigin-Name: f6d09c5a0df940dbaa716df70df28218985b83540b34c468989729a3421ef38c
2022-10-22 23:09:29 +00:00
drh
54cc766b41 Enhance the query planner with the ability to discern when an index is
covering even when it indexes columns well beyond the 63rd column.

FossilOrigin-Name: 1390417be45dd84e9118f6e761f23b8ff7476d26411e165bbaab678881e4eadd
2022-10-22 20:13:46 +00:00
drh
f55a7dad19 This branch attempts to improve the detection of covering indexes. This
first check-in merely improves a parameter name to sqlite3WhereBegin() to
be more descriptive of what it contains, and ensures that a subroutine is
not inlines so that sqlite3WhereBegin() runs slightly faster.

FossilOrigin-Name: cadf5f6bb1ce0492ef858ada476288e8057afd3609caa18b09c818d3845d7244
2022-10-22 14:16:02 +00:00
drh
5723c659fd Clarification on the meaning of SrcList and SrcItem and especially the
SrcItem.colUsed and Index.colNotIdxed fields.  Comment changes only - no
changes to code.

FossilOrigin-Name: d96f6cc8475ae5509b8bff2db75e3c6f69a214d58d8979fbc0162ae488a040dc
2022-10-22 13:49:35 +00:00
stephan
3725af73b9 Add SQLITE_DQS to the compileoptions_used list, per request in [forum post 8b1060122b|forum:8b1060122b]. Force DQS=0 in sqlite3-wasm.c.
FossilOrigin-Name: fcd9e0dbe3226f3f7ccc15b11fc3aa3b8058571bef274c25a33e9753e22f7551
2022-10-21 17:48:49 +00:00
stephan
89ccfac0ac Macro name typo fix in OS_KV builds.
FossilOrigin-Name: 9cf1142b0cdb13347e3f551c862cb4714cadfe5ad637f049cf0a4b8bb6125b32
2022-10-21 17:37:05 +00:00
drh
de033d078b Ensure that the RtreeCell object in rtreeUpdate has all bytes initialized.
FossilOrigin-Name: 1e38742bde09cd879eb370bcf8604ed7ed00759209bcb4ed0374350e4b9e842d
2022-10-21 17:18:58 +00:00
stephan
98147dd526 Add kvvfs tests to tester1.js. Fix a scopedAlloc() misuse in oo1.DB ctor caused by refactoring earlier this morning (and caught by these new tests).
FossilOrigin-Name: 8e0f001ab76de6dbc17295b9085f7f61ce274c43f8c432ea4d2ec3153d248ff3
2022-10-21 06:58:27 +00:00
stephan
848d27ada1 Add timing info and OPFS sanity tests to tester1.js
FossilOrigin-Name: 99915b0076422487cdd181a54e55694404fba13e4a540329b5ede9e2c9e12532
2022-10-21 06:26:17 +00:00
stephan
a6ca996e4a Expose sqlite3_vfs_unregister() to WASM and unregister kvvfs in Worker threads to avoid its unintended use there (in contexts other than local/sessionStorage). Correct registration of window functions, extend oo1.DB.createFunction() to support window functions, and add window function tests to tester1.js. Correct an incorrect 1-arg handling case for DB.exec(). Add per-test assertion counts to tester1.js.
FossilOrigin-Name: f07ce15479b7224b0d1ba9f147a433136e70c1461aa667d2737d4a918f778f55
2022-10-21 05:27:40 +00:00
stephan
6f3286cafd Make semantics for UDF xFinal() result handling and error reporting handling more flexible.
FossilOrigin-Name: 89f3e1982ec32c010af67d15ef780847df20de568669e5c9d02f3cf084f51330
2022-10-20 23:48:38 +00:00
stephan
96b6371d70 Add more JS tests. Flesh out the aggregate UDF tests to use sqlite3_aggregate_context() so that they can each be used multiple times in the same statement. Add sqlite3_js_aggregate_context() convenience helper.
FossilOrigin-Name: 9d034ef5e1bab7c9651c2450dc85765fa6365d3f1414c711550de858ff8b3ece
2022-10-20 21:28:31 +00:00
stephan
875b95d4f5 Apply magic.txt correction and addition reported in [forum post 2d2366a04a0385|forum:2d2366a04a0385].
FossilOrigin-Name: 9bf26e2aa3579f354ed2d314e1bf3e3ef117cbd71500ef5f76caa1de5cce1edc
2022-10-20 18:58:14 +00:00
stephan
8a8244b5c1 Rename sqlite3_web_... to sqlite3_js_... Document the worker1.close.unlink option. Fix unlink usage in speedtest1.html. Minor JS build cleanups.
FossilOrigin-Name: ac9af71b72a749b0a040273a88480d56f49570b569389a4ea20cc055f494d8ff
2022-10-20 18:31:32 +00:00
drh
c046f6d4d9 Add a bit to the optimization disabling mask for the indexed expression
optimization.

FossilOrigin-Name: 56df1482ab45d4d41f937b27c5a877b52fa082bfc6809ea682b62b47a51333de
2022-10-20 16:30:05 +00:00
dan
7e089d0c40 Add test case for previous commit.
FossilOrigin-Name: 535867a9c8719358380f89fd80473c484def9bb72744dd2fd28ada65999ee901
2022-10-20 16:22:39 +00:00
drh
e180564028 Only enable the bMaybeNullRow flag on IndexedExpr for an index on an
expression, not on a virtual column.  But do enable it for the right operand
of a right join.

FossilOrigin-Name: a9657c87c53c19228a42559c82c54b504a5ad729e407e9e2c7dabcc0c949b261
2022-10-20 16:12:02 +00:00
drh
63b3a64ca6 The generalized indexed expression optimization of [2435112867fbd7b6] makes
the prior [a47efb7c8520a011] enhancement from 2017 obsolete.  This check-in
removes the older optimization.

FossilOrigin-Name: 56442c9bdd7844454c79acf83323380ea3509cb2e0b9a3d538a6b51726ae6d07
2022-10-20 13:36:32 +00:00
dan
9b6a28330b Fix minor problems in test1.c test code.
FossilOrigin-Name: 6e545e2b846795fc67f8a90c04de284861a8a429ac686a7476b41c8ed7aabf75
2022-10-20 10:46:17 +00:00
stephan
842c5ee849 Rework sqlite3_wasm_vfs_unlink(), add sqlite3_wasm_db_vfs(), update some docs.
FossilOrigin-Name: cdd46858f0e63bc7bfce8e339b3db9efdec43b6443ee76563a847f53d0176831
2022-10-20 05:14:37 +00:00
stephan
d89a66ec36 Minor internal JS cleanups.
FossilOrigin-Name: 818ef0b5c909e733b643455278f7cc45533178f1cc6617058c00ed64fa44896a
2022-10-20 04:00:05 +00:00
drh
bf70f1bd1a In the CLI, never use strcmp() or strncmp() directly. Instead use
wrapper functions cli_strcmp() and cli_strncmp() that work correctly even
if the input is a NULL pointer.
[forum:/forumpost/142b868da7560d0b|Forum post 142b868da7560d0b].

FossilOrigin-Name: 7450a561f8577c3ee41f84074c6ef39e29e56876cab4fd763e6489c66f603223
2022-10-19 18:04:42 +00:00
dan
361fb98b5d Move file /ext/misc/dbdata.c to the /ext/recover/ directory.
FossilOrigin-Name: f6d5ac807efcf6140016a8b8f0c74566c0bfc98ad92bd8fca03c5cc80ebf3dec
2022-10-19 18:03:39 +00:00
drh
3b88065d35 Fix references to "SrcList_item" in comments as that object has since
[bfd5bf2c73110fcb] (2021-02-21) been called "SrcItem".  Comment changes
only.  No changes to code.

FossilOrigin-Name: e3648a07f5607dbd4d6ad5b6e5a62a4a1d0b173d3f22aa36c74b768281fc86d8
2022-10-19 11:58:24 +00:00
drh
805055f734 If a query uses an index where one or more of the columns of the index is
an expression or a virtual column, and if the corresponding expression is
used elsewhere in the query, then strive to read the value of the expression
out of the index, rather than recomputing it.  This is the
"Indexed Expression Optimizations".

FossilOrigin-Name: 2435112867fbd7b6ebb7f2c2b9da57cdf1e23fab6c2869870b66133a9f9faedc
2022-10-19 10:56:05 +00:00
stephan
a817b30f0b Update the wasm/js 'push' rule to account for this morning's changes.
FossilOrigin-Name: c4a0f745fbaf6f950810f92765cbe66dde66e226b78ec5dd9017473bf4c9c268
2022-10-19 07:51:12 +00:00
stephan
fd31ae3bf9 Rename several demo/test files and include more of them in the end-user dist archive.
FossilOrigin-Name: 9c85835f6f50eb3b1a2b89c817816335743f04440c48bfa05aa89ec519cc0d51
2022-10-19 07:34:36 +00:00
stephan
9dc4d5e6b4 Minor wasm/js build tweaks.
FossilOrigin-Name: bcbee1ec010ae74f0749aa7fda008698198a8cd52a7aa12d6458d43d3e739eb0
2022-10-19 06:14:24 +00:00
stephan
3117dc60e3 Update the dist rules for this evening's js/wasm build changes and include an index.html specifically for the subset of apps included in the dist archive.
FossilOrigin-Name: a0ef0f32e96638b502b3951e524d590bdfb09dd39be453686b075102da67b7db
2022-10-19 06:06:42 +00:00
stephan
cd0df83c15 Apply considerable acrobatics to get the JS/WASM deliverables building to and loadable from a directory other than the one which contains the app-level code. Requires an only-slightly-leaky abstraction of passing a URL argument when loading sqlite3.js but provides much greater flexibility in where the JS/WASM files are located.
FossilOrigin-Name: 6d468dab9eb84d4548f68014959f02fe4f66455472ff24fe729382bb2972e3d1
2022-10-19 04:44:58 +00:00
stephan
71de8e0241 Considerable wasm/js build cleanups and reworking. Remove wasmfs builds from the end-user deliverables and disable the wasmfs build by default, per /chat discussion, as it doubles our deliverable count for only marginal gain. Attempt to move the sqlite3.js/wasm files into subdirectories but rediscovered that that breaks loading in Worker mode because URI resolution of the wasm files differs depending on whether the main script is loaded from a script tag or a Worker.
FossilOrigin-Name: 5b23e0675efdd2f1ea7b4f5836a579e8d6aa8a25b3f1a6a950520ad845ff01bb
2022-10-19 01:07:30 +00:00
drh
72ab366192 If a virtual column whose value is constant gets indexed, do not include
that column in the IndexedExpr list.
dbsqlfuzz 59ac17a99b9a5c4930ee71cc153c9428a0c0e794

FossilOrigin-Name: c21eb903f06a16d4fafa5f895be08414fa58e6a91c148030aec8676b40c2d66d
2022-10-18 22:37:07 +00:00
stephan
b5e2e6fcd3 More work on the JS end-user deliverables. Add tool/stripccomments.c to support that.
FossilOrigin-Name: 2156f0744acfe425457430a0f6a7e02de907de85edba81a6d4eef40293e561c8
2022-10-18 20:36:50 +00:00
drh
7a2a8cee5a Improved byte-code comments for the OP_Column opcodes used by the
indexed expression optimization.

FossilOrigin-Name: bf6d837fddbf74d5b3f40ad01ea4564edfac00b651d6f3f0e996cc5dc18bb06c
2022-10-18 20:27:02 +00:00
drh
a331cf7e57 Fix the indexed expression resolver for generated columns so that it picks
the correct table in a self-join.

FossilOrigin-Name: 54c3eb085aca92da2b819f3532ee4750b377265f7e1e914600ea3c3d535efe51
2022-10-18 16:47:41 +00:00
drh
9489e0a5d7 Merge recent trunk fixes into the index-expr-opt branch.
FossilOrigin-Name: 6198ab4b871c464448ae303072bde0a810cac566a516cc29b1bf806fbd0a6c7b
2022-10-18 16:32:22 +00:00
dan
ac79fa1c78 Add new test file windowE.test, to test the window functions modules response to an inconsistent collation sequence.
FossilOrigin-Name: 740a2eb0928d54fdf735a8e573c6a61a34dbd295b46e5b6ef39e957fd2623293
2022-10-18 15:02:08 +00:00
drh
0e522c068a Correct sort order for serial-type 10 entries in the database file. This
is a continuation of [4fb77e96fa89a23a].

FossilOrigin-Name: 904b54625d985e742888e06ba792cab316b9ec9d6669d9cf509bac48030373ca
2022-10-18 13:27:31 +00:00
drh
451393c4f4 Merge trunk fixes into the index-expr-opt branch.
FossilOrigin-Name: c7b9cc645b394a1b638a9a13ca83d321215aaa78d69ca70c6baa0ee692ed21bf
2022-10-18 11:28:33 +00:00
drh
43fce6bb0d Fix sqlite3VdbeRecordCompareWithSkip() so that it sorts the internal-use
serial-type of 10 together with NULLs.
dbsqlfuzz 5ff35e9d49a5fcca5051e23960ff2f483a538bab

FossilOrigin-Name: 4fb77e96fa89a23a9365320c4190834edd6c09cfaf1ca30b34ce19b747ebbec0
2022-10-18 10:27:06 +00:00
stephan
ce152a4369 Add ext/wasm/README-dist.txt, intended to have been in the previous checkin.
FossilOrigin-Name: c9080b6505b839cc0bb5bd25ce7df0daa91a0a303d037ffe6e77888c8584b932
2022-10-17 17:36:11 +00:00
stephan
e79a0943ed Initial draft of archive generation for the wasm/js deliverables.
FossilOrigin-Name: f6cee114c71e11ca1f508c8f60be5753871cbd4fd6c45ce397824bddbf00ffd9
2022-10-17 17:34:41 +00:00
stephan
1b8c246799 Repair version-info.c after a local mishap caused all of the intended edits from [36e197cb3d0c]/[e9b407a4d0a0] to get deleted before checkin. Simplify version-info build (only requires sqlite3.h, not the library).
FossilOrigin-Name: 6e511df500c63e27f932be9d601b641144562614dead99371477eca4594fb3fd
2022-10-17 16:47:59 +00:00
drh
79b99b09fa Merge trunk changes into the index-expr-opt branch.
FossilOrigin-Name: a1485ce6c8374135290eb0a1e4eb4e225497ad7096847a4e2377c9c054946ca7
2022-10-17 16:31:55 +00:00
drh
8be8924901 Fix a potential call to strlen() with a null argument in the command-line shell
following an OOM error. [forum:/forumpost/9c4f2ebe22|forum post 9c4f2ebe22].

FossilOrigin-Name: b6413a6dff8ac9b7088b1381afbbbf799e376455d11786530cc5fc825747ab53
2022-10-17 16:09:33 +00:00
stephan
cdc9ddc6ec Missing file-rename for the previous checkin.
FossilOrigin-Name: e9b407a4d0a0fcd9f26d457beede19d41141327befe84be621681952be5d1e69
2022-10-17 15:53:16 +00:00
stephan
0467b01a1f Rework ext/wasm/version-info.c to make it more useful for the upcoming dist build rules.
FossilOrigin-Name: 36e197cb3d0cbb76e4c1381d77f7d8856e7391f2ef6671c13b9b6b0133315814
2022-10-17 15:52:12 +00:00
drh
e70d458340 Improved comments and function names. No logic changes.
FossilOrigin-Name: 8f460b3b15bf4b88a224907d2f83e4ed6bf84d6b3f480008a1b187ea49c6ce1d
2022-10-17 14:46:39 +00:00
drh
08535840c6 Get the indexed expression optimization working for virtual generated columns.
FossilOrigin-Name: 8a510cb0880349370ad19b0852f270ca072bff7871f0dc272964af31c32a7c37
2022-10-17 14:30:01 +00:00
drh
543c368958 Merge trunk enhancements into index-expr-opt branch.
FossilOrigin-Name: 56ef97e64efb84176df570819474901d492209ff80ce4355ff896dea9d2b8a51
2022-10-17 14:29:04 +00:00
drh
ce4b0fdf8a Make use of alloca() in wherePathSolver() when SQLITE_USE_ALLOCA is defined.
FossilOrigin-Name: 45752471521f8d4a6cad4bce40f907018acd403ffd3b8170020c34e4e0b6b91b
2022-10-17 10:15:41 +00:00
drh
135c9ff6f7 Remove a use of alloca() that does more harm than good.
FossilOrigin-Name: 2ab3cf4d71b23a4c0b69f977828d82df7bbc080c29ae189e0d78d38efee50c96
2022-10-17 09:56:51 +00:00
stephan
e493f8f0cd Typo fix.
FossilOrigin-Name: 650126c92aa191d6361a32ec90ca7def60a2df22ba6bec1d2354692fe3504423
2022-10-16 23:33:24 +00:00
stephan
2676fc58c8 Minor tweak to get bring an edge case of oo1.DB.createFunction() into aggreement with its docs.
FossilOrigin-Name: 8d59ccd9f357fbed0b0790508ca9027194fc4b0131029f9f460c7b4bde806a5f
2022-10-16 18:57:15 +00:00
stephan
824bb5b8db Add aggregate function support to sqlite3.oo1.DB.createFunction(). Change signature of the options object used by that function so that the callback property names match those of the corresponding C APIs.
FossilOrigin-Name: a7db6e4b50beebfb1c97e0c4de49538d8199c166b18a0b1b175736c593128a00
2022-10-16 18:50:55 +00:00
stephan
8ffc98999d JS: add build-time-generated version info to the sqlite3.version object. Remove some stray debug output from tester1.js.
FossilOrigin-Name: b5f462c2d85d503f6492ec20580d57cb4c926712f6306a6be764bd09d1f5e8b8
2022-10-16 16:38:15 +00:00
stephan
956392694a Add a top-level license and build-time version info header to generated sqlite3*.js. Correct a broken link in ext/wasm/index.html.
FossilOrigin-Name: 0f1a06e8e39a1fbc74f1aff9cc59787282dfbf847d6c5c7edb3f7d410db0e4b7
2022-10-16 15:38:03 +00:00
dan
8e62d370cf Exclude slow test recovercorrupt.test from veryquick.test.
FossilOrigin-Name: ff9a733532fe11bb253246b45a94681a174c976aafee5c780af571893e8ce694
2022-10-15 19:18:10 +00:00
dan
f0799fdf6d Add missing comments and fix other code issues.
FossilOrigin-Name: 8ed4e4a80d8104d20b211a0b3e299abdb955cabdd36979bf6aae54266dc9778d
2022-10-15 18:26:30 +00:00
dan
9dffd36c5d Merge latest trunk changes.
FossilOrigin-Name: 42255ead8e44b24a8abc04aca49f170c55f3b52f42366a0d8ef248ee65fcc7ce
2022-10-15 15:39:46 +00:00
drh
f3adb7c430 Enable the index-on-expression optimization even when the expression is
used as an argument to an aggregate function.

FossilOrigin-Name: 462b3c7f39724dc814f55e7a225e7d0c48f81c524cdda797a66e9e198c35ce58
2022-10-15 12:01:40 +00:00
drh
7a98937db2 Only extract an expression from an index when the index is not a null row
in an outer join.

FossilOrigin-Name: 08b033c737d1a84859291f50e2985c9dad8d660a50185d55d3171165a8e08d4c
2022-10-15 11:27:01 +00:00
drh
260ac72722 Merge fixes from trunk.
FossilOrigin-Name: 1cb65f36c3539302767f551ed53082f054666a7cb2696cef0990ab6747edbc52
2022-10-14 19:56:58 +00:00
dan
879164ed74 Fix a problem with using the push-down optimization on compound SELECTs where component SELECTs use different collation sequences. dbsqlfuzz 11516f050100243e5a845f5a2b48a90ed2efaf2e.
FossilOrigin-Name: ed14863dd72e35fa3a23320c3d5a8166515faea39a555c28a27b2d35e701eac4
2022-10-14 19:30:34 +00:00
drh
0388f17988 Add missing initializer from the extension loader. Fix for
check-in [d6d449978245b4fa].

FossilOrigin-Name: 565d74c36f2dd4612860c7ee561682c50db28cfa5384346528292019dbfdf86c
2022-10-14 19:21:12 +00:00
stephan
e72ddfd89b Generic minor cleanups and docs in the OPFS async proxy.
FossilOrigin-Name: a4423ca234453c14eb40db7fe5943f63b30fd9dc2207388e8a2966733a004e9d
2022-10-14 15:52:29 +00:00
dan
3fa10f82f4 Handle recovering databases with reserved bytes at the end of each page.
FossilOrigin-Name: 52d0235ef3f21683daadf2343514f7b95a67c3589266f75c1e00e04f11dc6214
2022-10-14 15:46:19 +00:00
dan
2bc4a6cad0 Fix a problem in the LIKE and GLOB operators that may occur when the character immediately following a "%" or "*" wildcard is U+80. Reported by [forum:61bf7ccbdf].
FossilOrigin-Name: 2da677c45b643482eec39e4db7079c772760bc966dc71bf6c01658cc468f5823
2022-10-14 15:10:36 +00:00
stephan
3e771c0f07 Remove a resolved TODO comment.
FossilOrigin-Name: 32fd4ac382f774189ac34f6fff80e55e6e56dd2aa67b0db88d5a88324f17f6ff
2022-10-14 13:26:18 +00:00
drh
859434d049 Cancel IndexExpr objects when they go out of scope.
FossilOrigin-Name: 0963519371bb7ac02adb323430855760fb9b82a23745e47c504aaf393d22ac34
2022-10-14 02:00:54 +00:00
drh
4bc1cc1847 This experimental branch attempts to use columns for an index-on-expression
in place of the expression that is being indexed.  This particular check-in
mostly works, but there are still issues.

FossilOrigin-Name: 2e8d4fd4cfd9e82f33c707ba246fe2bb3ca01762cf5ac5905058fbc7adf0abe7
2022-10-13 21:08:34 +00:00
dan
249efd04d7 Add tests for detecting page size of databases.
FossilOrigin-Name: 31f9e2369fcf59032b7c4c9f5bfc85e7ef7c174003b0b9e2757dad5a4c79b370
2022-10-13 20:06:17 +00:00
stephan
d92c652ac1 Move the rest of testing1.js into tester1.js and eliminate the dependency on jaccwabyt_test.c. Extend the list of default config-related #defines in sqlite3-wasm.c and reorganize them for maintainability.
FossilOrigin-Name: 4e2a8aff2dd4b6e148f45184e2523ebe47815257eca97fa3d32bcbf9625f0def
2022-10-13 16:48:35 +00:00
drh
921acff927 Optimize the IS NULL and IS NOT NULL operators so that they avoid loading
large strings or blobs off of disk if all it needs to know is whether or
not the string or blob is NULL.

FossilOrigin-Name: cb94350185f555c333b628ee846c47bcc9df5f76bb82de569b8322f30dbbe1bc
2022-10-13 15:09:44 +00:00
drh
eddfa9840e Improvements to the description of the OPFLAG_TYPEOFARG option to OP_Column.
FossilOrigin-Name: 5e9c67ba18b701aabbb0546acdfc532c9e8f0d27fb0a2c899415a5c47096c90b
2022-10-13 14:54:32 +00:00
drh
bd1c634546 Adjust the implementation of sqlite3VdbeTypeofColumn() to make it easier
to test (and slightly smaller).

FossilOrigin-Name: 79fdd021df256c6a2b9973fd6bf8e52ffaaf4d369d40489b8395ac97880b1325
2022-10-13 14:35:20 +00:00
drh
7ca4af6a9f Fix a typo in the documentation of the OP_Column opcode.
[forum:/forumpost/a2b5bd6d43|Forum post a2b5bd6d43].

FossilOrigin-Name: 043e76e6166da5cf8e213cce46aaccb1f910e1fdbdb5556576eafb81b3bc5faa
2022-10-13 14:01:11 +00:00
drh
e995d2c226 Proposed optimization to the IS NULL and NOT NULL operators that avoids
loading the entire content of larges strings and BLOBs.  Response to
[forum:/info/3c08d4715dc05b00|forum post 3c08d4715dc05b00].

FossilOrigin-Name: 45f171565442f9fd6574fb93ae7abe83c168b20be68af42531bc55571450d3ab
2022-10-13 12:47:33 +00:00
stephan
d85d08398d Port the first 180-odd unit tests from testing1.* into the new tester1.*. Fix a stray-keystroke-induced typo which broke pstack.allocChunks().
FossilOrigin-Name: ef689e33e464829f5cbe4ca24a53d9dba59abe74d3d80a37a91b93a4eccccf2d
2022-10-13 08:03:31 +00:00
drh
1ffb6be119 Updates to the fuzzer query invariant checker - tracking changes made
over in dbsqlfuzz.

FossilOrigin-Name: 4ca16a304ad10fbb48f78b4384b347fe883e1a4f222f113ac981e89845c3e113
2022-10-12 18:40:25 +00:00
drh
131aa13a2a Changes to Makefile.msc to fix the build on Windows following the previous
merge.

FossilOrigin-Name: 368fa6b25bc803ded7c1a0184615980902657879370caec22ceea42496ec0566
2022-10-12 18:30:08 +00:00
stephan
c9e992a197 Merge fiddle-opfs branch into trunk.
FossilOrigin-Name: 98f954942a8d4824b5c4bd1d27cfeff7a71a029dc5a54220b76d59e367996581
2022-10-12 18:13:52 +00:00
stephan
7be51f5897 Merge trunk into fiddle-opfs as a preliminary step for a clean merge in the other direction.
FossilOrigin-Name: 5e1848ce384a78fe5dfa1b5c1b2acb9c2fac34a8f0ba6c652e0541dcf24e9027
2022-10-12 16:35:22 +00:00
stephan
402da26c16 Add initial infrastructure for setting up function/regression tests for the JS/WASM APIs.
FossilOrigin-Name: 7f5db9829b6e60fadb756fea5442da1f4368c8428bb5cdaf14f97f0c3c8451d9
2022-10-12 15:54:28 +00:00
stephan
b75971e6e9 Minor doc cleanups and corrections in sqlite3-wasm.c
FossilOrigin-Name: 5144c122a921e4240901cf4eb46347b92213273eec7cf0977952ab2b60722c27
2022-10-12 15:40:16 +00:00
stephan
181f7e869d Correct mismatched H1 tags in test code. Minor CSS tweaks.
FossilOrigin-Name: 4d8eb90a370054d4482c20637ab56f5e01f4d10215f2af4e35fb9a1f85ecb700
2022-10-12 14:39:15 +00:00
drh
47996ea7c4 Add the sqlite3_value_encoding() interface.
FossilOrigin-Name: d6d449978245b4fa66c152132da468eea7977eab4d1fe53bb2fe3ef543d8030f
2022-10-12 12:49:29 +00:00
drh
c2777abc2d Enhance the OP_IsType opcode so that it is slightly smaller and faster and
so that it works correctly with invalid serial-type codes 10 and 11.

FossilOrigin-Name: 846f863e0d55eb7e78c8d355bbbcd73e1946d0ba566c2cb31683cde5f4353d1b
2022-10-11 13:57:55 +00:00
drh
7d23d157bb Improved the ability of the CLI to handle very long input lines.
Potentially a fix for the bug reported by
[forum:/forumpost/fa4bb2941a|forum post fa4bb2941a].

FossilOrigin-Name: d0e107ee00101f42b4c9bf372625311d04b83c96a4a9caacac866ea03d8e7fa4
2022-10-11 12:02:42 +00:00
drh
7747ffba47 Enhance the "PRAGMA integrity_check" statement so that it verifies datatype
constraints on non-STRICT tables:  (1) Columns with TEXT affinity should not
contain numeric values, and (2) columns with NUMERIC affinity should not
contain TEXT values that could be converted into numbers.

FossilOrigin-Name: aa6e9086196248675b9e33dbfaad9ef67097432535896790f80d2470002978b1
2022-10-10 23:54:17 +00:00
drh
c9ef12f62b Code clean-up for the integrity_check enhancement.
FossilOrigin-Name: a140173102febe9ef8064ee9b95bee489db54caba149e577d69e4d75161bf390
2022-10-10 21:21:04 +00:00
drh
db6940ab45 Fix corner-case bugs in the new integrity_check logic. All tests pass now.
FossilOrigin-Name: dbab9d52a842085da67f5d0b8e96c665adc16331accf380b4c234e9b05bdb7fb
2022-10-10 19:38:01 +00:00
drh
49d77ee642 An attempt to enhance PRAGMA integrity check so that it does data type
checking on non-STRICT tables.  Specifically:  (1) Columns with TEXT affinity
should not contain numeric values, and (2) columns with numeric affinity should
not contain text values that can be converted to numeric.

FossilOrigin-Name: 8b1e7f0524637728cebe81c7d3ff8ad8a5a55782eac6409b425dad538024f596
2022-10-10 18:25:05 +00:00
drh
005c9d8295 Improved detection of database corrupting when moving pages on an
autovacuumed database when creating a new btree.
dbsqlfuzz 9a55397eae13cec64aebf1fd35489c3a90bdaac5

FossilOrigin-Name: 327965bc71023d9380a9d6805062659108dab4bfcd386b7aba813754f270d33a
2022-10-10 12:02:53 +00:00
stephan
50661c5e31 Remove some extraneous debug output.
FossilOrigin-Name: 56ff42053f7b73b380c103a84f29e285cfbfb6e18a25b3a50a6d78e32610914e
2022-10-09 17:08:36 +00:00
stephan
d8897d971b Remove a now-unnecessary --cachesize flag for the OPFS sqlite3_vfs speedtest1-worker.html invocation.
FossilOrigin-Name: 08b516d6953256cfb8792cfee9e6ed7450fd55d84196b66b77409cfaee3c8729
2022-10-09 17:03:48 +00:00
stephan
ff891b4e1c Minor cleaups in the post-init async phase of sqlite3 module initialization.
FossilOrigin-Name: 2e024a6b533524b7732cea8aa27b16363e17b4c32731ddf31085e91fc728c1af
2022-10-09 15:12:37 +00:00
stephan
392fd3ce37 Remove ext/wasm/kvvfs.make which was inadvertently resurrected in [92b500da70a3].
FossilOrigin-Name: 2e7fa085fc0b1202c6502d89e2603ae76a93451754b07b32ab4f0211f213f980
2022-10-09 13:35:14 +00:00
stephan
4fbf90ee11 Refactor kvvfs JS bits to make use of [ea370b9b05f7ed7eaa]. At main-thread startup, if kvvfs is available, replace the kvvfs I/O methods with JS impls. Checkin part 2 of 2, to account for cherrypicking [ea370b9b05f7ed7eaa] into the kv-vfs branch.
FossilOrigin-Name: a9047e020a097b2259bc9935b63ca1c538a3a7f1d050e15f0d0a08cfb84acc7c
2022-10-09 13:26:15 +00:00
stephan
d35b5587df Refactor os_kv.c so that the kvvfs read/write/delete methods can be swapped out at runtime by JS implementations. This eliminates the kvvfs dependency on Emscripten. Checkin part 1 of 2, to account for cherrypicking.
FossilOrigin-Name: ea370b9b05f7ed7eaa154ba58019f6642217eabc18517e721567adf948d93980
2022-10-09 13:19:27 +00:00
stephan
d6555726ed Add -DSQLITE_OS_KV_OPTIONAL to speedtest1 flags for kvvfs testing purposes.
FossilOrigin-Name: 92b500da70a3dc64e910c232a2cac7620b6609162c2a5058b269d3b83d763c02
2022-10-09 11:42:12 +00:00
drh
211a1a7281 When casting an odd-length BLOB into a TEXT with encoding UTF16, omit the
last byte.  dbsqlfuzz c5df68b5bbdf6c9f3c1851e41e88f49ac05c9969

FossilOrigin-Name: 1e2796b3741a4c0b966e6c01a7d62dea8de9d1f4bededea3d7ba7004dabc2ffe
2022-10-08 17:27:05 +00:00
dan
73c586bcbf Fix a problem causing the seek-scan optimization to skip over valid rows that could occur when it is used with expressions of the form (a IN (?,?..) AND b >= ?). dbsqlfuzz ab1db6dc0efb04cba1cd3431ee6da4894fdc4520.
FossilOrigin-Name: 63d9efe277759d4daa29794846b60c6f55491496618f423f61468df72d0a4633
2022-10-07 18:57:15 +00:00
drh
8a2254fa1f Improved tracing output for showing all registers used by the
OP_SeekGE opcode.  This applies to debugging builds only.

FossilOrigin-Name: 0aa6dee7f72279114a47cbb69fdbda0b916a2c365f7a147946869f167bd018b7
2022-10-07 15:55:35 +00:00
dan
88a0637f57 Ensure the page-size, auto-vacuum and other settings are copied into the recovered database.
FossilOrigin-Name: 078520f2825bcb82d01b30209409e9bf8b6c99084c192345df41c9f531d08f51
2022-10-06 21:00:23 +00:00
dan
4df12ce5a8 Add code to determine the database page-size by searching for well-formed pages.
FossilOrigin-Name: 0dbd0ccef532e076fa82c9fad4dc9fe632c0ef43e3483cc288cbb7eca336a9b9
2022-10-06 17:20:12 +00:00
dan
73ac958c74 Fix a problem that occurred when using a bloom filter to optimize an (ipk = ?) lookup in the case where the RHS of the expression is a TEXT value. First reported by [forum:/forumpost/f61a8b7053|forum post f61a8b7053].
FossilOrigin-Name: 8e14c351b29bb434ac4e2510681e95716424a73e340d39feff4919f0431c2e00
2022-10-06 14:10:11 +00:00
dan
adc686043e Improve handling of corruption in the sqlite_schema table b-tree structure.
FossilOrigin-Name: 2be0dba12fb9b98cd9632f1ff3f30aeb29661a2e121b68c2f3335617b027797b
2022-10-05 16:58:28 +00:00
dan
461fa44be0 Merge latest trunk changes.
FossilOrigin-Name: b0feecaa84b88f534edb49056cf7e92256f4a687c8b4c44e1d1186709a304378
2022-10-04 19:47:17 +00:00
dan
041cc06139 Better handling for databases with corrupt headers.
FossilOrigin-Name: 17f68d803685405d880025134c71bac01077962d677f2902a608952d0b9cdb5a
2022-10-04 19:43:12 +00:00
stephan
9a55773b2f Replace time-based auto-unlock of opfs sync handles with lock acquisition/release via sqlite3_io_methods::xLock/xUnlock().
FossilOrigin-Name: 2625b7cfe1640c1d7e779ec1f37db970541598c0dc3e22e5eecf3c772d95ad40
2022-10-04 17:06:51 +00:00
drh
2eca06141f Attempt to clarify the operation of the xLock and xUnlock VFS I/O methods.
Assert() statements added to prove that they behave as the documentation says.

FossilOrigin-Name: 3efa811251d4510a074231a1e0b667783cc5f90777466b9dcae675cd9892b423
2022-10-04 14:50:46 +00:00
stephan
ed3182f233 Tweaks to the opfs async wait/relinquish times.
FossilOrigin-Name: 35f33c23e5849de1c43c4499ee0a7fa11d26ae34949c1e820c3fa8e8873f9c2b
2022-10-04 11:14:23 +00:00
drh
a4b2f41938 Change the name of the autoconf-generated configuration file from "config.h"
to "sqlite_cfg.h" to work around a bug in a dependency checker, reported
in [https://twitter.com/josecastillo/status/1577136108097314816|a tweet from Jose Castillo].

FossilOrigin-Name: 897e187cad981126fc5f6ea8e382e937825af10b0c9589b0a23b9fbaa4ca58b8
2022-10-04 10:35:10 +00:00
stephan
98e120fca0 Update ext/wasm/api/README.md to account for recent changes.
FossilOrigin-Name: 9d488081fc82a9abe3e81c7897fe6b29b6b337f62d0c62cb9cec7517bd54b53f
2022-10-04 09:12:43 +00:00
stephan
c7fb48d4b6 OPFS async proxy: add a wait-and-retry policy to the get-sync-handle step to help account for cross-tab locking.
FossilOrigin-Name: 45c48c63d311052105d102189208495b2b53fa3c4174884ecf63b757aa4016e5
2022-10-04 09:12:05 +00:00
stephan
f6b6188bdd Update the 'start in speedtest kvvfs' link in speedtest1-worker to account for recent changes.
FossilOrigin-Name: f4d5ba412e0c1a031430a32c9ed1e11a09af33f9883150e660cc05e49fe56e6a
2022-10-04 08:58:22 +00:00
stephan
2716cd2528 Minor pstack doc update.
FossilOrigin-Name: 6b4fb7c4e399ecc948ad41f5fa3139a9293cc822cd7efa2b83dc5fb1660b3ec6
2022-10-04 01:21:34 +00:00
stephan
2b776ee2d6 Minor cleanups and additions in sqlite3.capi.wasm.pstack.
FossilOrigin-Name: 97bd670d3859bd3f2e62c15065b238b85ef614f26479e56a14be42c5784aedf4
2022-10-04 01:11:10 +00:00
stephan
3c272ba380 Add a test/debug mechanism to shut down the OPFS async listener so that it can be inspected (it normally can't be because its tight event-listening loop ties up the thread) and then restarted.
FossilOrigin-Name: 7d0bcff4e9b899cd25b393b9f0a02c5dcee2e229f0a0fa01719c7dcd7dcbe7c1
2022-10-04 00:54:00 +00:00
stephan
88838f6b95 Set default page cache size to 16mb in wasm builds. Fix an off-by-one counter in sqlite3_wasm_enum_json(). Minor coding style conformance tweaks.
FossilOrigin-Name: 72a9e589cc318ec50941739e2edf2c0636284b316c3bf87b71fd363b37619da3
2022-10-03 23:13:05 +00:00
stephan
faf6a07965 Add a --cachesize flag to the speedtest1-worker-opfs link in index.html because opfs is much faster with that.
FossilOrigin-Name: 5b8f8e33afc47c9f0c64dbe34643d7d1c37a0a82afb4656e714a86ef54a9ce6f
2022-10-03 22:51:24 +00:00
stephan
8d9e595513 Minor JS doc updates and typo fixes.
FossilOrigin-Name: 3cfcc14dfd220536141aeffb902fdc8db1cea055b2a0609b88e092fc3df94688
2022-10-03 22:38:00 +00:00
stephan
d234902b7c Add configurable cache_size to batch-runner and speedtest1-worker. Add SQL tracing to demo-123.js just for demonstration's sake.
FossilOrigin-Name: 2ab065133bec19f71a1dc382946fdbd020920b2e38a526f4126a3a1e8df5de87
2022-10-03 18:07:25 +00:00
stephan
4b074692f4 Omit WAL mode from the wasm build.
FossilOrigin-Name: 88efe2a62b81e5ee9119f54204e397fda59666a327158c7b7c972e84a716869e
2022-10-03 18:05:27 +00:00
drh
16292a5e52 Adjust the --help output for speedtest1 to clarify that the argument to
the --cachesize option is in pages, not bytes.

FossilOrigin-Name: d7c2be6bdc3402e5a339d0f7b76d2c25f3a444dcbf54a77c1ccb790d1195a7cf
2022-10-03 15:22:59 +00:00
drh
277c7d3516 Copy all of the fiddle-opfs changes to speedtest1 into trunk.
FossilOrigin-Name: f3d31c9982cab517a3907a28c571225cee614ee78375c70eb2efb9a2b6b4b042
2022-10-03 13:56:52 +00:00
stephan
57956a9c86 Resolve/remove a TODO.
FossilOrigin-Name: 2ea35fea3bac2637e935643edfa7913b792e529de3a8980dbb8678d98ed5bcf9
2022-10-03 13:46:20 +00:00
drh
3044e77b4a Add the --vfs option to speedtest1.
FossilOrigin-Name: aeb884029ac1c68f0d7361dda0a545cff19ed265b608c1e329a1926397c5c8a3
2022-10-03 13:45:03 +00:00
stephan
4f5bbedb3a Export sqlite3_trace_v2() to wasm and use it to ensure that the new per-VFS post-open SQL support in the DB ctor works. Default opfs vfs to journal_mode=truncate, as it's faster in that mode. Add 't' DB open-mode flag to enable SQL tracing to console.log().
FossilOrigin-Name: 508f7f6d63e52f61fae5abe817579a4e130fa7fbd18733d741d521a5bdabb7ce
2022-10-03 13:03:41 +00:00
stephan
a4c357f94c Reimplement fiddle_reset_db() so that it works with all VFSes.
FossilOrigin-Name: 18462052903bfeb037dd9af3a1fe1898d141eff5d6f527721858120553de808d
2022-10-03 11:42:45 +00:00
stephan
5f0b67cb7a Experimentally relinquish the OPFS VFS sync access handle when the db is idle and reacquire it on demand, the goal being to help alleviate cross-tab locking issues.
FossilOrigin-Name: 2703ac9842335962e488e597168d70b1389b95a6ad39edf70a211b95979b4708
2022-10-03 11:33:35 +00:00
stephan
33ded6edaf Add journal=MODE to the list of supported URL flags for speedtest1-worker.html.
FossilOrigin-Name: 5c43e8d2ec23f28fdce63874d9d4c8ccbb4a8f81030b19d65ff5711a7c32697e
2022-10-03 11:23:47 +00:00
stephan
7ff8da876d OPFS VFS now lazily opens its sync access handle, as a step towards experimenting with relinquishing it during idle times to help avoid cross-tab and page-reload locking issues.
FossilOrigin-Name: a984e1ba435731413a541f86c50232bc7d6e33aff6ba4cca90f89188e7b82a2c
2022-10-03 09:21:37 +00:00
stephan
bdfd7ea03a Partial revert of [a82e6faaa642] to remove the 'I' alias for 'j' wasm function signature letter. In hindsight, that change seems premature.
FossilOrigin-Name: dcd46af9141f4edf816010923941a76d0edd3f18cfe429c52f599ad2a0d52651
2022-10-03 08:30:22 +00:00
stephan
ef9cd12ec4 Minor JS API tweaks prompted by documenting them.
FossilOrigin-Name: a82e6faaa642b09d241232c4daa67134d4dfa24bf3ca3725740346ca5269b381
2022-10-03 08:21:06 +00:00
stephan
510a9d1c64 More cleanups in the UDF argument and result handling, in particular int64. Consolidate some duplicate int64/bigint range checking code. Expose the UDF low-level utilities (arg/result conversion) to client code. Add the sqlite3_context pointer to the JS-side UDF wrappers for API consistency.
FossilOrigin-Name: 10ab77af952abf09f93f342a9d07a3b133f2c4c0a3588df3390cd3a923cafae4
2022-10-02 22:50:04 +00:00
stephan
65e6522f8f Minor doc typo fix in sqlite.h.in.
FossilOrigin-Name: 372802aaa22a830bf498bb0d9561ae02b32e5e191c4d7d771ea152140f6685a1
2022-10-02 20:13:46 +00:00
stephan
92ede964e1 JS: clean up create_function() wrapper and add support for create_window_function(). Eliminate an extraneous blob copy when a UDF returns a blob. Make use of newfound JS-fu to clean up how sqlite3ApiBootstrap() config is initialized.
FossilOrigin-Name: d3bad9347c5423fa7f19ae729461636f1043c99a1f01f168efa10bebefb1cdd1
2022-10-02 20:08:53 +00:00
stephan
9892883e9e js: implement a hand-written wrapper for sqlite3_create_function_v2() which converts, if necessary, JS-function-type args to WASM function wrappers. Replace DB.createFunction() impl with the new one.
FossilOrigin-Name: 435ab33384017967e46f52b70bee851a85a28808990a0e58dd5288f606b89c9c
2022-10-02 18:47:39 +00:00
stephan
9fdce595eb Doc typo fixes.
FossilOrigin-Name: e528675da3971907666c7d2d09763975a105ec585dc5122145f65905d535bed8
2022-10-02 03:14:38 +00:00
stephan
63e9ec2f9c More fleshing out of sqlite3.capi.wasm.pstack.
FossilOrigin-Name: eb5726677a727a958df11f1fba078d30c7c0ba2a9bdb158e8641b35b5f971af3
2022-10-02 03:11:13 +00:00
stephan
6479c5a359 Document the roles of the new (this past week) JS files added to the build process.
FossilOrigin-Name: 8b3bc7313aff551e5ee0b7aeb927095cf19b9b96abbdd922066c130656b8aa7d
2022-10-02 01:48:14 +00:00
stephan
193ee11fe1 General internal cleanups in the oo1 API.
FossilOrigin-Name: f9db664f756f3707afcb5dce87f6d946625848f27ea84337af68de72d4ad6c6b
2022-10-02 00:09:40 +00:00
drh
7d34b8d628 Performance optimization in sqlite3_prepare() (discovered while working
on the stmt-cache branch).

FossilOrigin-Name: cd494240cc6184bb028d1f1049086f57c0a71a43d7ed1405fd4205240e1b9e61
2022-10-01 20:27:29 +00:00
stephan
f064a3bbe4 Correct fiddle db export breakage caused by a post-testing API change made in [1fa019c88dea].
FossilOrigin-Name: e73cc44ec36c7585ebb914bdeed5b39480fca7c7a8d3c4426bfe769c87b98d17
2022-10-01 19:21:52 +00:00
stephan
f446af57b5 Pedantic constness tweak.
FossilOrigin-Name: c8a173cf16d2567bf9b13f52904077a2e7209776c76613c7bff59cd66e24bf11
2022-10-01 18:55:10 +00:00
stephan
3afad4d432 wasm: correct a memleak caused by a shadowed var in the previous checkin. Add a stack-like allocator, sqlite3.capi.wasm.pstack, as a faster way of managing short-lived pointers (like the one which got shadowed).
FossilOrigin-Name: 1fa019c88deac6b6e5155b620bdab1d7145846290daafb9adbefcf4f0fe542cf
2022-10-01 18:47:42 +00:00
stephan
32781427d7 Fiddle: fix makefile dependency issue and duplicate inclusion of post-js.js. Reimplement db export using sqlite3_serialize().
FossilOrigin-Name: 29db7de79232c21d19b91bb0fc253114e02e21dd9bf90619453dbe72a4c8bf7f
2022-10-01 16:01:41 +00:00
stephan
be9d203665 Merge trunk into fiddle-opfs branch.
FossilOrigin-Name: 64ebcbe41615a6d7776597564105ea7638e4a9095a764ea558c2620640429cf8
2022-10-01 13:45:14 +00:00
stephan
c9099d2d73 Tweak sqlite3-worker1.js to be able to load either sqlite3.js or sqlite3-wasmfs.js, noting that the latter still does not load in a Worker because of an Emscripten loader bug.
FossilOrigin-Name: 000ef7059bfb54dc4f829b81a8d8c927c0382980218d8a3d60cd2c4d89151c90
2022-10-01 13:38:27 +00:00
drh
7424aeff41 Replace the Parse.disableVtab field with Parse.prepFlags for increased
generality, a small size reduction, and a small performance increase.

FossilOrigin-Name: b7da0bcdf70e53ab1ec00a0694e17c7429e23bc6eb3f39b622d06a930aa2f6a3
2022-10-01 13:17:53 +00:00
stephan
6167d5cf17 Note two wasm-related potential TODOs.
FossilOrigin-Name: 5636e82864457d870754ee7125c307dc5d2195197a5c0266579da9f102938b89
2022-10-01 12:04:49 +00:00
stephan
8c1a4b89af Remove a couple of weird quirks of the Worker1 and Promiser APIs. The Worker1 (now undocumented) unlink capability needs to be reevaluated to work equivalently for all storage backends.
FossilOrigin-Name: 9f2b331a32cbaadfd20d04c9908171355322c1aa1d9d6df3628f3b2fb4391ec1
2022-09-30 23:49:43 +00:00
stephan
ae589b69db Tweaks to the Worker1 and Promiser APIs prompted by documenting them.
FossilOrigin-Name: c68b9aa160e2c1197ae7eb06a634017ac2b281393074afa4582762d5458c6889
2022-09-30 23:02:11 +00:00
drh
7bc6a818f0 Remove one of the NEVER() macros added by [5166acf3f0040459] because it
is reachable after all.

FossilOrigin-Name: bd8ae5febbb8d3122f1e2e09b9fcdd6ac20c075ae1cf60bcdbd36080f3736417
2022-09-30 22:40:57 +00:00
drh
1337a2291d New test cases in fuzzdata8.db
FossilOrigin-Name: aa367a3c974041323edb759855f0b83803439ceef2846da2d73eadd80efeaac4
2022-09-30 20:59:09 +00:00
drh
2d3261fe86 Fix a bug in the demoDelete fix from [d76a301e22e05722].
FossilOrigin-Name: 7e761a02530ffbb055a766eb6c995f11fc2adbabb9a52502124f672fdcff0d10
2022-09-30 20:53:36 +00:00
drh
0a803bd984 Add NEVER() to two error-detection tests that were made unreachable by
the previous check-in.

FossilOrigin-Name: 5166acf3f00404597e77910aee88920ab833af8447766f50bf4f70525606cf95
2022-09-30 20:48:22 +00:00
stephan
e67a0f40e4 Add JS wrapper for sqlite3_exec() which knows how to handle a JS callback. Add some console.error() reporting of module-load failures, as they otherwise often get silently swallowed up by the loader's mechanisms. Add 'flexible-string' JS-to-WASM argument converter which performs more X-to-string conversions than the 'string' arg converter does.
FossilOrigin-Name: 96818aa83f4ccc574f558231249ecbdd39763b4351cf4cf6d33f53774a3ee5e6
2022-09-30 20:35:37 +00:00
dan
ad658b2d82 Better handle a case of database corruption where a b-tree page is one of its own ancestor pages.
FossilOrigin-Name: a24e46804893a7e6e8f3130abca882f9a3aa3b7b2b82aa39a0a20856172766d5
2022-09-30 20:15:21 +00:00
stephan
d18f1bbfe0 Add sqlite3.version object. Add more state to the Worker #1 config-get response, including sqlite3.version.
FossilOrigin-Name: 711f458d188a0dbe6612069c856ade29323ab426dfa4f80e7b82757ccc474cb8
2022-09-30 16:49:03 +00:00
stephan
07c0b72253 Add oo1.JsStorageDb.clearStorage/storageSize() methods, copies of capi.sqlite3_web_kvvfs_clear/size().
FossilOrigin-Name: 1e09efe7fa15b8908f8b8353164a8361de778e27ea6c0b11c402bf4e1c56333d
2022-09-30 15:46:08 +00:00
stephan
359d62395e batch-runner.js: force WebSQL batches to not abort for a failed statement (necessary for apples-to-apples-ish benchmark comparisons).
FossilOrigin-Name: 60f0c5cb04d2baf8431e523434d8753e39377f4b2c6bad225c2e5487a4be419b
2022-09-30 15:24:58 +00:00
drh
cb57716c65 Improvements to the "demoDelete" method in the demovfs, suggested by
[forum:/forumpost/cad18961c2|forum post cad18961c2].

FossilOrigin-Name: d76a301e22e0572262917dfe9557a5051339a65416a473dd2d9989a49975403e
2022-09-30 14:35:18 +00:00
stephan
dc6ae60226 Expose sqlite3_msize() to wasm.
FossilOrigin-Name: aa6ad34f3b693b554be58ee2895f79397162c5b8877c709653c8508fc625e8f4
2022-09-30 12:10:36 +00:00
stephan
f6c686c9f4 Add oo1.JsStorageDb() as a convenience wrapper for oo1.DB(...,'kvvfs'). Minor doc cleanups.
FossilOrigin-Name: 8a7998709f859a562cf6829485cb9921f8823af0efabe003741348ab1169fb89
2022-09-30 11:01:44 +00:00
stephan
53d4e01d06 wasm: expose sqlite3_de/serialize(), sqlite3_malloc/free() and friends, noting that the former explicitly lies on use of the latter for memory management so is not generically safe for use in wasm.
FossilOrigin-Name: fbc0edb5d31aa0dea92460e853f15f08c642451a7878994116b530cf172325cc
2022-09-30 10:55:28 +00:00
stephan
f71c954cbc Add JS infrastructure to ostensibly allow us to customize the wasm imports, which will hypothetically allow us to eliminate the dependency on EM_JS(), but the corresponding Emscripten glue-level feature currently breaks fatally with WASMFS builds so it's disabled.
FossilOrigin-Name: 88d9253b0db5494bf1c9b6d24f22524eeec856b89e64a66ffb30d945f0df21d3
2022-09-29 22:08:22 +00:00
stephan
b0ccf50cbd Ensure that the wasm builds always, even when passing -Ox flags from the CLI, use -g3 to avoid problems caused by symbol minification with optimization levels -O2 and higher.
FossilOrigin-Name: 27d24d5d270e272af07d96cf07bdbe79ba07a9c69ba3c70beb76ebf4f90fc97a
2022-09-29 17:35:25 +00:00
stephan
eb97743cc7 Finish eliminating explicit Emscripten module dependencies in test code and fiddle. The only remnant in public code is the Emscripten-generated module load/init interface.
FossilOrigin-Name: 7be78dd4efc410f13ff1ceda1fad82b309cc24de2d5106c8bd6b2adeaa13b106
2022-09-29 16:54:23 +00:00
stephan
b94a98607a Rework the Emscripten-emitted module loader/init function such that it passes on the sqlite3 module, instead of the Emscripten module, to the first then() of sqlite3InitModule()'s returned Promise. This eliminates any need to mention the Emscripten module object in client-side code unless they want to configure it in advance for loading-status reports.
FossilOrigin-Name: 0dbaa0e2b5abf5c23e2039ec90a3055ebb3c063aaf4e556c42546defe6fbb86d
2022-09-29 13:17:50 +00:00
drh
31474ce57e Fix misuse of the sqlite3_set_auxdata() interface in the ICU extension.
FossilOrigin-Name: f25cf63471cbed1edb27591e57fead62550d4046dbdcb61312288f0f6f24c646
2022-09-28 19:14:01 +00:00
stephan
4b884bb4c7 Wasm: expose sqlite3_exec() and use it to simplify the db-reset logic in batch-runner.js a bit.
FossilOrigin-Name: 2e2821f782511b9d2274a89a5a922582aba18c7e9dc7ce01080e713942a56d7d
2022-09-28 18:10:50 +00:00
stephan
cb22bd80d2 More work on batch-runner.html/js to facilitate speed comparisons between various VFSes and WebSQL.
FossilOrigin-Name: 3bd1bc240676e56da87fc49f3c67a1edc4fafcf2a2416298d19ae4f80b676a72
2022-09-28 17:52:52 +00:00
stephan
5ad3631915 Correct duplicate copies of sqlite3-api.js being embedded in the wasmfs-based builds.
FossilOrigin-Name: bbfcfba260f39a9c91e82d87e06b1c2cb297c03498b4530aa3e7e01ef9916012
2022-09-28 13:01:49 +00:00
stephan
d98011852d Work around broken -Os wasm builds by adding the -g3 flag. Unrelated documentation tweaks.
FossilOrigin-Name: f5d6bf8616341037fa3e229edf820d19acef3e0a6207a652b2b143de0a493214
2022-09-28 07:53:47 +00:00
stephan
489a8a9d3c Minor doc correction.
FossilOrigin-Name: 093f6e4b36db294e8e47df2fc75a4bc4fc101e2b6ff0201c912ccd1dcf394479
2022-09-27 17:03:01 +00:00
drh
5d48e0cdc5 Provide the SQLITE_MAX_ALLOCATION_SIZE compile-time option for limiting the
maximum memory allocation size.

FossilOrigin-Name: 584de6a996c78b8e41bdfcd05a8e2a3844664c6b4efedb5883c8b8af388462b5
2022-09-27 16:35:06 +00:00
stephan
6559e0ab15 Comment the -O2 wasm builds as being broken (mysteriously missing JS bits).
FossilOrigin-Name: f61475ef8244fd1f6553eca9cc2317e5de2cc04443e24afb7b91ebd3fc1bd402
2022-09-27 14:31:34 +00:00
stephan
5b9973d898 WASM API renaming. Reworked JS API bootstrap's async post-init into a generic mechanism, no longer OPFS-specific.
FossilOrigin-Name: c42a8cb090cad1108dfd6be574202d744c59e053b505bc4c17252dc6b65d26bf
2022-09-27 13:40:12 +00:00
stephan
3d64548491 wasm/js: rename /persistent to /opfs to account for potential future persistent storage options. Minor flag-handling cleanups in the speedtest1 pages. Minor API tweaks in oo1.
FossilOrigin-Name: 4dc972a3656b2a9ec915bfb3f653136560c753ce4024c3f0d0d0c28f66db7a0a
2022-09-27 09:17:37 +00:00
drh
6319a8003c Make the legacy FTS3 code more robust against integer overflow during
memory allocation.

FossilOrigin-Name: 5517bc50988b5339c2fd071b29de1b5ca03037b0b635c3b112cf7108fab54d5f
2022-09-27 01:53:05 +00:00
drh
80cf891792 Enhance defensive mode so that it disallows CREATE TRIGGER statements if the
statements within the trigger attempt to write on a shadow table.

FossilOrigin-Name: 3283bbd12a60f472ed03cb7c6209a605a3bf9f3d9083371e17840b56e8b3f559
2022-09-27 00:56:45 +00:00
dan
7e33f8f43b Modify implementation of recovery to break recovery of the lost_and_found table into multiple steps.
FossilOrigin-Name: adedfd040bb2d1c2dcda0b91c6073f12953e45d9b860a8f217d990e861d66dfb
2022-09-26 20:51:16 +00:00
stephan
278d3faf1f Fiddle: replace db export routine with a C-side one which works for both Emscripten FS-hosted and OPFS-hosted db files. Minor code-adjacent cleanups.
FossilOrigin-Name: 3579a8d6f1f6cd3cd8aad9949536870c5fe7bae8c1778f700dd85d763e266b94
2022-09-26 13:55:10 +00:00
stephan
1f095d482d Get fiddle db export working for OPFS VFS. Add root dir handle to the main OPFS VFS worker to enable creation of certain utility functions without delegating to the async worker. Add sqlite3.capi.sqlite3_wasm_rc_str() to map integer result codes back to their SQLITE_xxx counterparts. Minor doc touchups.
FossilOrigin-Name: 9b2244e1c8a40efe6547094a1b57acc8f2173145a8731abb0e36268ce0a8ef41
2022-09-26 11:38:58 +00:00
stephan
6a643e4bcd wasm: change StructBinder signature for sqlite3_file::pMethods from 'P' to 'p' to eliminate an unnecessary and inconsistent level of magic.
FossilOrigin-Name: 85f2e877e53899860af4dc6630044b471a9c7c82faba1f4e1e60ae991460b943
2022-09-26 11:34:31 +00:00
dan
8d8fc58413 Add the SQLITE_RECOVER_SLOWINDEXES option, for specifying that indexes should be created and populated along with tables, instead of separately at the end of the recovery operation.
FossilOrigin-Name: ad9dba9d1eae786575c7f31e34b342b6f5b26e719bbe27b61609cad8cfd0a505
2022-09-24 19:54:49 +00:00
dan
351563efe1 Add sqlite3_recover_step() to header file sqlite3recover.h. Update the API docs in this file.
FossilOrigin-Name: 47f416153035d6bf0ae27587583d2957c87c02caecbd4e7f363bcb2bc27cf159
2022-09-24 19:17:20 +00:00
dan
aee4049128 Update things to use sqlite3_recover_step() internally.
FossilOrigin-Name: f4b15aad3005237b7ac507eed2b9b07e0f5c9407ab28f2656a21c9845f13d35f
2022-09-24 18:05:52 +00:00
stephan
395012e58e Fiddle: move, rather than copy, data buffers between the threads. Fix the case of an uploaded db failing to install because its filename is the same as the opened db.
FossilOrigin-Name: bcec4f964a7b02f59be05286ff715bac654a32b19f05a743e402f4cdb207cab8
2022-09-24 11:32:00 +00:00
stephan
ef11fb915d Resolve "already configured" warnings from shell's main() when starting it up in fiddle mode.
FossilOrigin-Name: 114ef3552af977b272a0baddeb9a2326484b60acfc75284e43c55530f86b413f
2022-09-24 10:15:08 +00:00
stephan
56fae744d4 Reworked out the OPFS async proxy metrics are fetched so that they play more nicely with the tight event-polling loop.
FossilOrigin-Name: ef503ced5c2ca842be9aea9ef13719a378ed3020e884032db09afee1b8eba0a1
2022-09-24 10:12:19 +00:00
stephan
60d9aa7c59 Refactoring towards getting fiddle to support OPFS as a first-class citizen. Certain operations, e.g. import, export, and unlink, are not OPFS-aware.
FossilOrigin-Name: 1b923ed6438d7fef4508936e0c4bc026a368721698b1539961e3fb3140a185cb
2022-09-24 07:36:45 +00:00
dan
9bbd91b39d Internal changes to the recover extension towards a step() style interface.
FossilOrigin-Name: 73926d5c8cd1ecece134b5a73b44ee1dfca74dc200606e3f009b06cdecf8cee9
2022-09-23 21:01:10 +00:00
dan
80b1f6fcde Fix various compiler warnings in new code on this branch.
FossilOrigin-Name: ae49e9efde3012158061def6e0a8d993abbc5933514a21f84bc10f700f61b5e2
2022-09-23 11:40:43 +00:00
dan
bdbd097280 Merge latest trunk changes into this branch.
FossilOrigin-Name: e87fa70ab0f9b95bbcde18567f47906a222a3fd02b4f3c2903d2bb087d361b7c
2022-09-23 11:30:24 +00:00
stephan
f75c0c7036 Reformulate some JS to work around a buggy/broken code transformation in one of the Emscripten-driven code optimizers.
FossilOrigin-Name: e1249369d5ec1c582c280b1f578b35d53637fdf1cbd97c16d5ed95b136b83e56
2022-09-21 20:24:12 +00:00
stephan
6110a5d0ab Put pieces in place for fiddle to support opfs, but more cleanup is required in the sqlite3.js/fiddle connection. bigIntEnabled now defaults to whether the Emscripten's module has bigint enabled. Add wasm-sensible defaults for several SQLITE_ENABLE/OMIT flags in sqlite3-wasm.c.
FossilOrigin-Name: 7c7fb7535e86b3960eea7f29ab7e6d5197c166b4ee64ad4a9bc0749f2869badc
2022-09-21 19:51:25 +00:00
drh
f333370e1f Reduced and improved comments on the constraintCompatibleWithOuterJoin()
function.

FossilOrigin-Name: 38aaf26e082bd95df6b64df43e1772fe6e20c4eb71307dcd97559cac7f11f8f1
2022-09-21 18:21:31 +00:00
stephan
65022716b3 shell.c.in: when building in fiddle mode, define _POSIX_SOURCE (ifndef) so that emcc's string.h reveals strdup().
FossilOrigin-Name: fb85b269c43147f153977606dd8ede7b93744bf955e4c1a2b198907fd8a94620
2022-09-21 16:21:21 +00:00
stephan
e8afca3f16 Correct mistyped --shrink-memory flag in speedtest1-worker. Minor OPFS proxy cleanups.
FossilOrigin-Name: 86e2b55ec9483fa5add51a479c6509d73461f1ac6fca5d49e057b1c66f4314d2
2022-09-21 14:02:47 +00:00
stephan
72ab400d4d Doc cleanups and additions. Add a way for the OPFS async runner to propagate exception text to the calling thread.
FossilOrigin-Name: 5c5e80652825cf883e6c17809cb98f2bf17d5feac2d263f6f492479154730dab
2022-09-21 12:27:35 +00:00
stephan
171b168b3e Added some structure to the wasm demo link list.
FossilOrigin-Name: 777077c4c2249e1ec78390d4f65aaf281c1fbefcef4bcc7609199e995645ceb6
2022-09-21 12:25:40 +00:00
drh
2897b88f9e The RIGHT JOIN logic added to version 3.39.0 added a new restriction on the
query flattener which resulted in a performance regression for some queries,
as documented by [forum:/forumpost/96b9e5709cf47cda|forum post 96b9e5709cf47cda].
This change removes that restriction (thus restoring performance) and fixes the
problem that RIGHT JOIN was having in a different way.

FossilOrigin-Name: 501609eddf2a46d51e8cd56477a22d4df142a166e78fe4322c0db11d1eed6687
2022-09-21 09:54:41 +00:00
stephan
ebe1423098 Add a link to fiddle.html in the wasm test app index.html.
FossilOrigin-Name: 96c734c07acfbea153d9aaf293a28a2d49d78de19fec4fb90c4c08fb1fd0ddbd
2022-09-21 08:41:40 +00:00
stephan
4bc2f6b415 Move fiddle build rules into the wasm-centric build files. Add rule to push wasm bits to the wasm test server.
FossilOrigin-Name: 113f8204dc4ac849d5632d3de1680b6e0da871e107ef484c8d7273799bee3d88
2022-09-21 08:39:03 +00:00
drh
faaacd3fbb Break out the decision of whether or not a constraint term is usable by
an outer join into a subroutine: constraintCompatibleWithOuterJoin().

FossilOrigin-Name: c7fbc9b0453050e2746af27e3a11e0c3701bef8c56da8e19173242c6ea3aff8b
2022-09-21 00:16:59 +00:00
drh
0f51aa3972 Do not allow EP_InnerON terms to be used on a outer join.
FossilOrigin-Name: f47aa745690c018800243bf76930b2499ff4537411c4e27b4b16ba3854cc2bf8
2022-09-20 22:19:13 +00:00
drh
0cc6f78bcf Add new test cases that (current) get an incorrect answer.
FossilOrigin-Name: fe5c37736444e397ace387b761ec2491229785d7a437f3f60232aedf9d1f00ec
2022-09-20 21:07:52 +00:00