Commit Graph

24965 Commits

Author SHA1 Message Date
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
drh
4c5c941b6e New test cases for query flattening when there are ON clauses and outer joins.
FossilOrigin-Name: db55387b1972bc7bc6855bd3497af744a111e7d28d09893cd985fbb01be41bcc
2022-09-20 19:45:04 +00:00
drh
8b9a3d1fc8 Modify the OP_IfNotOpen opcode so that the jump is taken if the cursor is open
but was previously set to a NULL row using OP_NullRow.

FossilOrigin-Name: 1292d68caa7086610ddda343f3852e63de8da1eb66536ee4716b6529f5a31bc6
2022-09-20 19:22:17 +00:00
drh
5a0771a1f4 Remove code that has been previously commented out.
FossilOrigin-Name: 852b385a5de622aa32026824210d4bd23db52a4a8a697b83d22d6000edeba487
2022-09-20 18:18:00 +00:00
drh
a5f8c42c98 Merge the fuzzcheck fix from trunk into the flattener improvement branch.
FossilOrigin-Name: 930a8c1561d0d5dc70dc5378edac77f79ac59ab6569b561de3dfb02f160c38c5
2022-09-20 17:43:40 +00:00
drh
703c208d30 Update the fuzz invariant checker to conform to the latest changes in
dbsqlfuzz.

FossilOrigin-Name: 8d8c124349d2a25200ace9a60d76751594b722468ad0c39d927a5d2c6e2464e0
2022-09-20 17:21:54 +00:00
drh
40c9becc81 Is the query flattener restriction 29 (do not allow both EP_InnerON and
EP_OuterON constraints on the same FROM clause term) really necessary?   This
branch explores what happens if we omit that restriction.  This is an effort
to address the performance regression reported by
[forum:/forumpost/96b9e5709cf47cda|forum post 96b9e5709cf47cda] that is caused
by flattener restriction 29.

FossilOrigin-Name: 19270577ad1d08c9e6e5f0600396b8a1ccda9df1e67a0df845aee6b60437f379
2022-09-20 16:57:49 +00:00
stephan
4cffb644c7 Correct a too-strict is-opfs-available check.
FossilOrigin-Name: 1b5f1b4a6c1457f98c258459e23e321fc59793de298fecb84031b87f02156cd5
2022-09-20 16:20:35 +00:00
stephan
fa5aac7475 Merge kv-vfs-magic-names branch into fiddle-opfs branch and make some kvvfs-relevant tweaks.
FossilOrigin-Name: e3d36dcdd37e59f17a07d3611d08744eb86f439fab82a648490dd608bcaa3185
2022-09-20 16:10:39 +00:00
stephan
89071030db Export the sqlite3_uri_...() family of functions to wasm.
FossilOrigin-Name: 72bebc848fce5c3b4766017d016ccb2360de2bd0cb3e47e710c80dbcb6b8b707
2022-09-20 14:52:26 +00:00
stephan
fea03bc0ca Merge opfs-proxy-atomics branch into the fiddle-opfs branch.
FossilOrigin-Name: 25a36920d44544547a84161681cd41e292b4a70df60ac3630791873a79237d98
2022-09-20 14:39:54 +00:00
drh
c3b6fdaead When compiled with SQLITE_OS_KV_OPTIONAL, the magic names ":localStorage:"
and ":sessionStorage:" are recognized and converted to use the kv-vfs.

FossilOrigin-Name: c5db9262d0388ccb0e84c6a4b4e2e786dd634f13874e4034ba7b175befa4ce90
2022-09-20 14:36:53 +00:00
stephan
0e0aafc698 Remove an obsolete file.
FossilOrigin-Name: 1e43855498b4329f733bd6e0731841dc884e885de7d2d338d402d05d54309427
2022-09-20 14:21:58 +00:00
stephan
b8c8d4e4a0 Speed up de/serialization of func args and return values in the OPFS VFS proxy.
FossilOrigin-Name: 5bf235bbe035e4ace7a54851e190742528af6b4266328a1b8bbb9fb3dd7f2118
2022-09-20 13:25:39 +00:00
stephan
c2ccd67689 OPFS proxy: remove one sanity-checking-only level of proxy function to shave off a few microseconds.
FossilOrigin-Name: b534831f3efb8910a17e29956e3e87cc80055ea66e15dbef992b6a556ff042f8
2022-09-20 10:47:36 +00:00
stephan
c9e2602e8f Remove extraneous result-code SAB slots. Doc additions.
FossilOrigin-Name: 88de20712bbe3e11ea74af95edc34e9ab9f346f9aa0a30931e5a9e1f96ce57b0
2022-09-20 10:11:52 +00:00
stephan
5e8bb0aa13 An alternative messaging strategy for the OPFS VFS proxy which uses only SharedArrayBuffer and Atomics, instead of worker messages, for communication (only the initial one-time handshake during initialization uses worker messages). It runs speedtest1 approx. 15-20% faster but still 20-ish% slower than WASMFS.
FossilOrigin-Name: a83ee3082d89439ea3ad5737e63e25bebb0f91895aca006ce5fecf5b93a2651a
2022-09-20 08:27:57 +00:00
stephan
138647a552 OPFS VFS: further internal refactoring towards experimenting with a new comms model.
FossilOrigin-Name: 5ca412ced24b4e3af5f467e710a597ed440badf7b8335346aade11d3cad3d1a1
2022-09-20 03:31:02 +00:00
stephan
c4b87be3e8 OPFS VFS: moved i/o buffer from per-file to the VFS, and related refactoring, in prep for experimentation with a new inter-worker comms model.
FossilOrigin-Name: d4d63e4580ad8d497310608175308c03c517e051d7865cb66aa0b10356612d7d
2022-09-20 01:28:47 +00:00
drh
b22b493338 Clarify comments that describe query flattener restrictions associated with
outer joins.  No code changes.

FossilOrigin-Name: 2647d73bb1876d01851f52cb3fd6af08a962ab336b6d51c160d27b1baf94f75f
2022-09-19 19:25:15 +00:00
stephan
aec046a264 Further metrics and buffer-copy optimizations in the OPFS proxy, but with little effect.
FossilOrigin-Name: d1f1fe6f1c60640f7770dfb9245c459a09b8d24ec2ddf664dff77c810bd51f96
2022-09-19 18:22:29 +00:00
drh
316cd40122 Fix a minor comment typo. No changes to code or documentation.
FossilOrigin-Name: 8032db4ade66f70a102abb9d3a49e20620e204c45ad7a954a49d20403985bf07
2022-09-19 17:41:59 +00:00
stephan
f815011a08 Cut the speedtest1 runtime of the OPFS VFS proxy by approximately 3/4ths via xRead/xWrite buffer-copying optimizations. Still slower than the WASMFS impl by approx. 1/5th.
FossilOrigin-Name: fb7f287310d74a3e236125ae9c49b859f9263c29ae85161c1bcf9dd0778d8a51
2022-09-19 17:09:09 +00:00
stephan
61418d5a67 Remove an obsolete file. Update wasmfs build for today's changes. Fix the case that OPFS.xTruncate() is passed a BigInt instead of a Number.
FossilOrigin-Name: 976053925013bf1975f5f9222e28ba648af28e305bb6bdae600eb24d0e136bec
2022-09-19 14:56:13 +00:00
stephan
0e0687ccfc Add sqlite3_web_vfs_list() to JS API. Corrected OPFS VFS's registering itself as the default VFS. speedtest1-worker now uses the xDelete() of both the default VFS and OPFS, to avoid that it starts up with a persistent OPFS test db (the native app calls unlink(), but that unlink call operates on a different virtual filesystem than the OPFS VFS).
FossilOrigin-Name: 2ec7e09139a510b9fd29e4c97283b20740a00f369193c6fecbb734f187e81b48
2022-09-19 13:44:23 +00:00
stephan
b5ae85eca2 Merge kv-vfs branch into fiddle-opfs. Adjust various JS APIs and apps to deal with the new method of handling kvvfs. Adjust speedtest1 JS build to include sqlite3-api.js so that it can use kvvfs and opfs VFSes. Permit passing of the vfs as a URL parameter to certain demo/test apps. Milestone: speedtest-worker.html?vfs=opfs runs with the standalone OPFS impl.
FossilOrigin-Name: ec09f32f7ae2249aaf27388ad2062982afa8bbbb5f88d236d6d9068bf33ad93d
2022-09-19 13:16:35 +00:00
stephan
5ef7f04775 speedtest1: add --vfs NAME flag and eliminate code duplication in argc size verification for all flags which take a value.
FossilOrigin-Name: 281d09867134e0a057cfadd9bfcbf0e21b8ac9737a278c41973d33a3101be7bc
2022-09-19 11:47:38 +00:00
stephan
ba0b157583 Minor doc improvements in demo-123.js.
FossilOrigin-Name: 9370ce94780e974da03d5c74cf9a5983eed333e7b3bc54e605c5f30b3fa99287
2022-09-19 10:13:01 +00:00
stephan
509f40526e Generic cleanups in the OPFS VFS proxies.
FossilOrigin-Name: 7d5f6adc3b964413fc96ad8d2735312c3e58348024cabdd2099682cbf696eaf7
2022-09-19 09:58:01 +00:00
stephan
862281fc47 Correct OPFS VFS xRead() to copy the result buffer if the result code is SQLITE_IOERR_SHORT_READ.
FossilOrigin-Name: 56668f9902c6e896b6c63621a444444c6f58ee20f88a5feae97f1699be35892d
2022-09-19 09:25:25 +00:00
stephan
8766fd20d1 Replace OPFS VFS xSleep() impl with a more efficient one (no Worker round-trip needed).
FossilOrigin-Name: b9773f164878b0a1b7c88cc7a6d1374ea95f64920065e8b2b178a1afffd82fe5
2022-09-19 05:19:04 +00:00
stephan
ac51eb7754 Rename demo-oo1.* to demo-123.* and add demo-123-worker.html, which runs the same demo via a Worker. Doc typo fixes.
FossilOrigin-Name: 2e4a005bd35424caeaa99ace23162cf79e2ebdb159475ffad92b85dc864ad764
2022-09-19 03:57:31 +00:00
stephan
ed85333977 Disable build of wasmfs-using components on aarch64 (ARM), as wasmfs won't build there.
FossilOrigin-Name: 9a9eeebc2c27b734041089131b4952d7c0440df48ef32f355641aca61d4b30a0
2022-09-19 00:40:53 +00:00
drh
bcdb4cc71b Remove a NEVER macro in defragmentPage() that dbsqlfuzz discovered can be
true.  crash-32d9312f145cdce41613573f6431d9a3e439e3d7

FossilOrigin-Name: 90403759e1cf30f7c11fa8170d6df59a0dd138e1de59d2b60bec7ba15d74f67c
2022-09-18 17:59:28 +00:00
stephan
f386012069 Numerous cleanups in the JS bits. Removed some now-defunct wasm test files. Expose sqlite3.opfs object containing various OPFS-specific utilities.
FossilOrigin-Name: 26e625d05d9820033b23536f18ad3ddc59ed712ad507d4b0c7fe88abd15d2be8
2022-09-18 17:32:35 +00:00
stephan
0db3089576 Move the OPFS VFS bits back into api/sqlite3-api-opfs.js. Refactor the OPFS VFS init process to use a Promise-returning function which the client must call, as that eliminates any uncertainty about when the VFS (necessarily activated asynchronously) actually becomes available to the client. Rename x-sync-async.* to test-opfs-vfs.* Milestone: first successful test of OPFS without WASMFS.
FossilOrigin-Name: b2abf60dbfa6648f671a3932cb65feb28d05a0d5b7f792351d14f9c13d9798c5
2022-09-18 03:05:55 +00:00
stephan
c5313afea7 Move the OPFS VFS bits back into api/sqlite3-api-opfs.js. Refactor the OPFS VFS init process to use a Promise-returning function which the client must call, as that eliminates any uncertainty about when the VFS (necessarily activated asynchronously) actually becomes available to the client.
FossilOrigin-Name: 1c660970d0f62bcfd6e698a72b050d99972a1e39f45a5ac24194a190f8f78ab3
2022-09-18 02:35:30 +00:00
stephan
3e2823cbb6 Plug OPFS methods in to their sqlite3_vfs/io_methods counterparts. Add URL args to control debug output and running of sanity-checks in the OPFS init code.
FossilOrigin-Name: a0e93ed20b2463606a63b03ce8ca41ec1fb22886db5c5c898ace86ba24636f70
2022-09-18 00:16:12 +00:00
stephan
5f4ad92681 Correct OPFS xRead() and xWrite() impls and add a very basic sanity test for them.
FossilOrigin-Name: cd06cc670029763955cf60ffcf944b36d41cb005b859d9b9fd0eea1b6741d0e9
2022-09-17 23:47:20 +00:00
stephan
8200a6d8d7 Implement OPFS xAccess(), albeit with more limited semantics than the VFS API calls for. Add a way for OPFS xDelete() to optionally recursively remove empty dirs left over after deleting a file.
FossilOrigin-Name: c342b5d745f301104c59851c753287ebbbe95a69a56cb522d376d0f3e352c30f
2022-09-17 23:29:27 +00:00