Commit Graph

24498 Commits

Author SHA1 Message Date
stephan ab7de45084 wasm: disable shared cache mode by default. Experimentally move wasm-build generated files up one dir to rule the extra dir out as a problem for Emscripten-related worker-loading failures.
FossilOrigin-Name: e38d00c2b82d7e51ec04cd739514f255edde679b8ddab31fa944b3517d45c3ea
2022-08-16 16:06:12 +00:00
stephan 0761780bc4 Add worker-style variant of the tests added in [ae24ac0f7dd9], but building this with wasmfs causes them to throw inexplicable exceptions from the Emscripten glue (without wasmfs it builds and runs fine, but storage is not persistent).
FossilOrigin-Name: 6401595e59179c5c0f6e51c5362cf4391787e7a55b9c6ca655746e30d3251f2b
2022-08-13 17:13:16 +00:00
stephan a7234901b2 wasmfs: use unix-none VFS by default to avoid locking errors in non-OPFS mode.
FossilOrigin-Name: 75561dea1a1afe9cb0a7d58dd82fa519e51cf42e330922cfd8e9ccdf6db4dc0f
2022-08-13 16:36:06 +00:00
stephan 1025227272 Add scratchpad/test app for WASMFS/OPFS running in the main window thread. Enable WASMFS by default in the library build.
FossilOrigin-Name: ae24ac0f7dd9e12a40de0f6ccd61a16f010804da454085f886c217cc600cdba4
2022-08-13 16:11:38 +00:00
stephan 9a4c63b0fc Cleanups in the wasmfs/opfs integration but disable it in order to get the build into a known-working state before continuing with experimentation.
FossilOrigin-Name: 41045be752a5bd7966849638f3ca56f4905308df70f79f2cb6196ca7dce9d525
2022-08-13 13:56:00 +00:00
stephan 90218aec7a Remove OPFS from the fiddle build for the time being - will re-enable once the breakage is figured out via testing with the core API.
FossilOrigin-Name: 3bc510a614973eafa60960a99bedb063594a693bdbfd80d7eb480b293b4ab811
2022-08-13 13:51:56 +00:00
stephan f79451eea7 wasm OO API #1: added DB.callInTransaction() and Stmt.stepFinalize().
FossilOrigin-Name: e37dddc1dd9c0530e4b1c6cb0ca7cba7451caa37734d383c9b47f378d7222242
2022-08-13 13:46:19 +00:00
stephan 2cf599cff8 Corrected TextDecoder.decode() usage to run when its input references a SharedArrayBuffer.
FossilOrigin-Name: d4d773405c579e7efd95be8d81fe14d71218e62e44c523d38e02f89424ba6ce8
2022-08-13 13:42:07 +00:00
stephan 587f9a0a99 Use new -DSQLITE_DEFAULT_UNIX_VFS="unix-none" for fiddle build to bypass OPFS locking errors.
FossilOrigin-Name: b3a93ec75acb38535691d6eaceb5a1a218a5ee3f755a1e12c9255b90567fc795
2022-08-12 18:54:08 +00:00
drh 087f143f87 Add the (undocumented) SQLITE_DEFAULT_UNIX_VFS compile-time option.
FossilOrigin-Name: 49828bdec5f926cd18a069d39a5db0b1e1f3528a2affcfbaa1cf7b98aca51b3b
2022-08-12 18:46:01 +00:00
stephan 24ddbca8d3 Updated fiddle deps to ensure that sqlite3.c is built first.
FossilOrigin-Name: f0ca02611484f5031076d7fae88845e9931715e9108ec0572629200d4f6636ef
2022-08-12 18:07:22 +00:00
stephan a579f4400d Build fiddle with WASMFS OPFS support and attempt to use it if available. It does not work because of an inexplicable exception in Emscripten-generated code and perpetually-locked db, but it's not yet clear why.
FossilOrigin-Name: a16f0a46ec88c560f73d5664e4bf53fb5dd1a22e99a92c11b5c8d784816c3282
2022-08-12 17:57:09 +00:00
stephan 5b0e63eb4c Minor wasm-related doc clarification and remove an obsolete code comment.
FossilOrigin-Name: 1b1f650a08da93da97ed3a96b9a3e4eac567472c266188c02a9bffe1cf620e53
2022-08-12 17:55:18 +00:00
stephan e1c3462484 wasm: document the role of sqlite3-wasm.c. Other minor doc updates.
FossilOrigin-Name: 4c10b9b18feca82440273f8192fef951ad051bbfd8aad4d3c840cf6375130afd
2022-08-12 13:07:21 +00:00
stephan e6d1650c5b wasm: corrected (in as-yet unused code) a flags check.
FossilOrigin-Name: 06b6113783dd81252a5dd125e1cddb52a9d4e387c74cfb3ba88475e47a31060a
2022-08-12 09:32:51 +00:00
stephan fbfe5af903 Wasm-related doc additions and tweaks.
FossilOrigin-Name: ec55a3aa44a80f661dd451b9ea567449ea4c7353901cfd44a4b50ca10f00ddbd
2022-08-11 15:45:32 +00:00
stephan 9289c47df7 Merge in wasm-cleanups branch, reorganizing and updating the wasm-related components.
FossilOrigin-Name: c072594d3de3d6893c5d4a9d68439b84d043325f105b0d065575765a6e66c196
2022-08-11 09:18:09 +00:00
drh f0d12d87fa Fix another harmless comment typo that causes a typo in the documentation.
FossilOrigin-Name: bb084adb53386d8e52ca1e818a8322d2ec641b73fd8568cee01cc74c0ee9f265
2022-08-10 18:40:43 +00:00
drh 778d334085 Remove (harmless) duplicate words in comments used to generate parts of the
documentation.  [forum:/forumpost/54abbe9ccd|forum post 54abbe9ccd]

FossilOrigin-Name: b5e4f0db09ff7790862357df3c6fd38a2dcdfc82ff51b9f0d9470517648c844d
2022-08-10 18:33:57 +00:00
dan 217635f709 Fix handling of columns with names that are SQL keywords in the ".expert" command.
FossilOrigin-Name: 5e1b8221c385deb04a3ff5aafb2e9fc55aecc6ffc68328674e3afe56c4273e29
2022-08-10 15:29:21 +00:00
stephan 2315e83463 wasm opfs: error handling fix for an impossible-to-reach error case. Minor cosmetic tweaks in the wasm JSON enum.
FossilOrigin-Name: 683a3b937e608a5ecaf7f63f054e8a63179d67c8b2348bf843e5e68f27a369f5
2022-08-10 13:22:44 +00:00
stephan 3961b26363 wasm refactoring part 2 of (apparently) 2: moved ext/fiddle/... into ext/wasm and restructured the core API-related parts of the JS/WASM considerably.
FossilOrigin-Name: 27f9da4eaaff39d1d58e9ffef7ddccf1e41b3726914f754b920e3e1fb572cba6
2022-08-10 11:26:08 +00:00
stephan 8c3b7501af wasm/fiddle refactoring part 1 of N: move fiddle app from ext/fiddle to ext/wasm/fiddle, which only contains files intended to be pushed to the live site. Disabled build of the non-fiddle wasm parts, pending a later step of the refactoring.
FossilOrigin-Name: fb4eb93080288b60815be14afd7ddbbca470ce363fa3735352ea9a558fef583e
2022-08-10 09:36:10 +00:00
stephan 3822e8ac47 Merged in trunk for pending tree refactoring.
FossilOrigin-Name: c3a3cb0103126210692bbeb703e7b8793974042e1fc2473be6d0a0d9b07d5770
2022-08-10 07:58:57 +00:00
drh 626bcc88dd Allow the name of an index to collide with a table in a different schema.
FossilOrigin-Name: f963c2523872b59b8a7a14971f703f2eb0d021501b288597a958f6596885d0de
2022-08-09 16:13:21 +00:00
drh c8e9f6818b Omit the (undocumented) SQLITE_PCACHE_SEPARATE_HEADER compile-time option.
FossilOrigin-Name: 60947da687d525e72e62bcddcdf4c5c819818855074cc318c9ee656e83897aef
2022-08-09 14:28:54 +00:00
dan 6aafd74853 Avoid some cases of signed integer overflow in fts5 by casting to unsigned values.
FossilOrigin-Name: 46a78c8c0ed518c4521e6e0bdebeb065bab07076abc444775002e7f4361d2242
2022-08-08 19:29:53 +00:00
drh 26e817f69b Avoid trying to cast an over-sized floating point value into an integer.
FossilOrigin-Name: 3518cd7cb1feeefc3963da72c2d258d81d8914f1e1f427da28a00b6228cf126c
2022-08-08 16:25:13 +00:00
drh 5e10d892d6 Remove an unreachable branch in the numericType() helper routine.
FossilOrigin-Name: a99cc008e46ab1a4fdbe2fa87202d026a10c57be55e3e9fedd935795ed6dc694
2022-08-08 13:04:08 +00:00
drh a3a4da0922 Do not attempt to convert an oversized floating point value into an integer.
FossilOrigin-Name: 6c4fc8385ee22516e0b87fb647327ee7d1a564040ebe2a4d66fc999ef2908df2
2022-08-08 12:19:13 +00:00
dan 8c3cc71a5a Fix a rounding error caused by scalar->logarithm->scalar conversion when using stat4 data to estimate some range scans.
FossilOrigin-Name: 86e30d7c4bb1cebe25b66686d6d1ee170c1a88e5a6c1bed6652ebbb024d62062
2022-08-06 15:28:37 +00:00
dan 8e658f0a13 Avoid having fts3 read uninitialized values when processing deferred tokens.
FossilOrigin-Name: 98729c5fa6c4c418ca9779c35e6874c930e5cee5a90b5eb32b284a0f3762269e
2022-08-05 17:16:00 +00:00
mistachkin e2848932a5 Fix harmless compiler warning seen with MSVC.
FossilOrigin-Name: e36217f2536d89f7a15a879fe3ead32307909c71ced42e1ae7b35f43d4744a80
2022-08-05 05:30:07 +00:00
drh bffd5c1ece Fix a problem with the query optimizer for LIMIT/OFFSET queries when
underlying query is a UNION ALL and both arms of the UNION ALL are
subqueries with an ORDER BY clause.  This bug was reported at
[forum:/forumpost/6b5e9188f0657616|forum post 6b5e9188f0657616].  The
problem was introduced in 2015 (SQLite version 3.9.0) by check-in
[4b631364354068af].  See also ticket [b65cb2c8d91f6685].

FossilOrigin-Name: 6c806f64bbc9e98891bad0868575ee2ec5d0951ceb0c71d3ed417b45d5f27561
2022-08-04 17:15:00 +00:00
drh e24a6f58ae Fix a typo on a comment used to generate bytecode documentation.
FossilOrigin-Name: 64348d0b665f61c3a89f51341f23ca87f939dd9e306dc58c2004e46ab04e696e
2022-08-04 14:02:35 +00:00
drh 3cf46ee508 Performance optimization to the math opcodes of the bytecode engine.
FossilOrigin-Name: 597347d9c39f6ed068ac942a8c9853b1b745fce1eb5e9dd30f6c1cb312b36f53
2022-08-03 19:53:54 +00:00
drh 403f00219b Small performance increase on the binding interfaces.
FossilOrigin-Name: aab24c37fb444804fb91177b4b522909ef1bb85383444d97d82a758f919047d2
2022-08-03 19:37:25 +00:00
drh 3a17e2e5cf Improvement on the previous check-in.
FossilOrigin-Name: c1ab0ea2959259cbd29f624bfd5e7366035f2dbcaab72c0bf55723c0919b7a79
2022-08-03 17:26:32 +00:00
drh b5a6f33e50 For an IN operator used with a RIGHT JOIN, use the number of terms in the
vector, not the number of equality terms, to size the column map.
dbsqlfuzz 14cfdad6ca45e607163f54049ddf5065183dc657.

FossilOrigin-Name: b184c8d9222da6b420b5d7c439bbe4b737d92ffa27f5e933f4e1a9c8117b0ee5
2022-08-03 15:58:44 +00:00
drh f98109e7cb In the xUpdate method of the GeoPoly virtual table, make sure that the
number of updated columns does not exceed the underlying implementation, even
if the virtual table object records an excess number of column in the nAux
field due to table constraints in the table definition.
Fix for the problem reported by
[forum:/forumpost/a096ab7d96bb057a|forum post a096ab7d96bb057a].

FossilOrigin-Name: a04dd475c2c8afdded0afecfd34c6c4c2f48cce520e09b7fa5172ff30f09209e
2022-08-01 13:14:03 +00:00
drh 3b01dd0f5d Restore a VDBE coverage macro that is mistakenly deleted for
check-in [92ac01d41d46ab73].

FossilOrigin-Name: 01de7ec44fb1e8e6f847eaef433216b3163a44a8789451718e1c419ef840ddfb
2022-07-26 19:10:13 +00:00
dan b4d7f1eb88 Fix another problem related to aggregate query LEFT JOIN flattening.
FossilOrigin-Name: 8e12c6f59bcb67be4ff131feecc5af68f4bb0afbcced2e2f7e73289aaf95d99d
2022-07-26 18:43:45 +00:00
drh 1dd1303600 Omit a unused variable initialization in order to suppress a harmless compiler
warning.

FossilOrigin-Name: 2d703c5e941cac72efc21d58e1e35c446b338b2927a42f587ab788826fd7f3f1
2022-07-26 15:41:34 +00:00
dan 4784a78d1c Add test cases related to fix [e717e029].
FossilOrigin-Name: 2909f36bfba8f34b818e5d9ecd8c759f05bbe25765089e78bb022de2b77a4f0f
2022-07-26 15:39:32 +00:00
drh 4b1b65ca2e Make sure IF_NULL_ROW expressions receive a separate slot in the sorter used
to implement GROUP BY.

FossilOrigin-Name: 2bda4fca06ab6be5ad02377a7d1fd9fb9586e3181f1052e4b4937958bdd45efe
2022-07-26 15:32:02 +00:00
drh f4c291275b Improved AggInfo.aCol debugging output, intended to debug a problem with
LEFT JOIN flattening into an aggregate query with GROUP BY.

FossilOrigin-Name: e717e029bde4ee68b6ea77a68721c02ddb6e296f1d310a368137ea3c4164f68c
2022-07-26 14:37:04 +00:00
drh e6710e83fc Add a OOM term to a single assert() statement.
FossilOrigin-Name: 217fc3ebd423e050508d6af97e0664f301824ef9a997ed2d302c006a41227917
2022-07-26 10:16:25 +00:00
drh 3c8fb6fb84 Performance optimization: avoid unnecessary calls to computeLimitRegisters().
FossilOrigin-Name: f48bd8f85d86fd93329dda7ba57f468854a732b89e4126e9c5beec3495d24b31
2022-07-26 01:20:18 +00:00
drh fe888bcf11 Fix an assert() that was made out-of-date by [b52393ac28debe98].
FossilOrigin-Name: db8230e80ed894fc2801cdbb53c2cd9de00192d7f4d8328c29cc214e2e0adde9
2022-07-25 23:34:14 +00:00
drh 509a6303d1 Performance optimization by only invoking sqlite3FkCheck() when it is actually
needed.

FossilOrigin-Name: 98b0e830bc7effa3c9cbb77aebe7c128afc3b210af336b7516108d6435705ba0
2022-07-25 23:01:41 +00:00