Commit Graph

24632 Commits

Author SHA1 Message Date
drh
59ece7e106 Non-working code towards a VFS for text key/value storage.
FossilOrigin-Name: f9c89ee8d5ef46342bea78fa8d4da058d9ea628183ec985642bbda1cdfeacd5f
2022-09-07 17:29:22 +00:00
stephan
3a59dd12d2 Add a note about Emscripten's -sSINGLE_FILE flag, why it would be nice, and why we can't use it.
FossilOrigin-Name: 5ea0623630d769a8f3f07a40cd119be86b631192cdb5178131876b01b40ee5e0
2022-09-06 23:04:51 +00:00
stephan
8fc8b5b35f Get speedtest1.js working with WASMFS/OPFS.
FossilOrigin-Name: 40e60f570d4f489d58d12e27c1c067b41d6c5a5e374c5fce0baa8881ef183216
2022-09-06 20:17:15 +00:00
stephan
100b496dd2 Initial build of speedtest1.wasm and speedtest1.html with which to run it.
FossilOrigin-Name: 4441535e3e54dc1881f700fa3878964eb8554a6790fd6aa32945f7cc104a8467
2022-09-06 16:47:43 +00:00
stephan
09aa80d109 Minor internal doc clarifications.
FossilOrigin-Name: 09796cc2bfce7bc4ce11db9673d20737259e9928f0484660cba3a9751f7d01c5
2022-09-06 16:35:54 +00:00
stephan
ae1ed83831 Merge trunk into fiddle-opfs branch.
FossilOrigin-Name: 7f76eaec793720db87415a476ddf539bc4dea3e74c8e5406d6739206aebdacc2
2022-09-06 09:59:06 +00:00
drh
2e440a0801 Add the tool/omittest-msvc.tcl script that will try to build using MSVC
using various compile-time options, to ensure that the compile-time options
all build without errors.

FossilOrigin-Name: 6b00ecb59fd303f7985902c35a46db9e729201d4beaedea46596b728d9e4b1c8
2022-09-05 22:54:36 +00:00
drh
0c4517a61a Get the tool/omittest-msvc.tcl script working.
FossilOrigin-Name: 82b89f8a074858a81d841dfc26436e8d39ce4907b8f989eba4d848db16758303
2022-09-05 22:53:24 +00:00
drh
4c8404e555 Add a prototype for a script, similar to tool/omittest.tcl, that is designed
to test builds using MSVC to ensure they work with various OMIT options.

FossilOrigin-Name: b1e37a0bd31fa9f8e58c2859a80c23a682b4702eefab2c55b243f1e21d475d6c
2022-09-05 20:42:01 +00:00
drh
6e440ab3de Fix the windows build so that it works with -DSQLITE_OMIT_AUTOINIT.
FossilOrigin-Name: f74a5ea8c986dc33d3afcda169c38abbe55728c56716cf9991a5e2ef7fc4917a
2022-09-05 18:17:03 +00:00
stephan
49cb8d7314 Minor cleanups in OO API #1. Add Sudoku SQL to batch-runner.js's list.
FossilOrigin-Name: 4488cb5798f34cbba14eb8e2aa5da8420c14a85d37d278d357406aedd5c3a9e5
2022-09-05 13:24:08 +00:00
stephan
cdefd5d046 wasm: minor text and build cleanups.
FossilOrigin-Name: 36ceef94e1935f5e85f79e489cd0ed265a77820fb68329c190794df5e076bf84
2022-09-03 11:41:44 +00:00
dan
ad617b4d6d Ensure the Pager.journalOff variable is zeroed if an error occurs while writing the initial header to the journal file.
FossilOrigin-Name: da7af290960ab8a04a1f55cdc5eeac36b47fa194edf67f0a05daa4b7f2a4071c
2022-09-02 21:19:24 +00:00
drh
173b418e60 Fix an assert() associated with the dbsqlfuzz error at [8372468bb5d8922c].
FossilOrigin-Name: 54251f81ebc43839cc97f91d2df4c320c1b96b5690cc11ce45b60c087c9becd6
2022-09-02 17:25:25 +00:00
drh
5fc3a8a32f If sqlite3PcacheMove() really performs a swap, then be sure to renumber the
second page.

FossilOrigin-Name: 81cff9f1955874aade55daa94263f58f06d966bd51ad558755f92777069a7347
2022-09-02 15:09:55 +00:00
drh
4e9bf5ace3 Enhance the pcache1 implementation so that during an xRekey operation if
another page already exists at the destination, that other page gets moved
to the source key.

FossilOrigin-Name: aadd38f99a3e5abcf9bef49f4367752f163cc79500a28f812bb71969d7de419c
2022-09-02 14:29:54 +00:00
drh
e04c9f4b33 Mutex protect access to the sqlite3_test_directory and sqlite3_data_directory
global variables.  See
[forum:/forumpost/719a11e1314d1c70|forum thread 719a11e1314d1c70].

FossilOrigin-Name: 8e6ad3a3e942a326cf16432e16d6596c7206c05b6f45cd0ff3a9b836bcfc9deb
2022-09-02 11:45:26 +00:00
drh
fee6431392 Improved mutex protection of the sqlite3_temp_directory and
sqlite3_data_directory global variables.

FossilOrigin-Name: ebbe9634d6dde9e097f61fb98a79111e46de422b7bbbd9ed3af7b6f22aacf5ec
2022-09-02 11:12:16 +00:00
drh
18a3a48db1 Experimental changes to put sqlite3_temp_directory behind a mutex.
FossilOrigin-Name: 5ee3515fbb88bf1ae5f8b507844f82dcc429380b6ebeab9b09b52b25ee60a60d
2022-09-02 00:36:16 +00:00
drh
44132244fa Defer deleting a transient SELECT statement associated with a flattening
of one arm of a compound SELECT until after the parse has completed.

FossilOrigin-Name: 1c4157c71cd1e062a9c2c79787d17e34e340f28ce1e40573851dfe174f5da7d7
2022-09-01 13:51:09 +00:00
drh
a3fc683c80 In the query planner, add a heuristic that will reduce the cost of a full
table scan for a materialized view or subquery if the full scan is the
outer-most loop.  This is shown to speed up some queries.

FossilOrigin-Name: 609fbb94b8f01d6792e5941ab23ce041313d359f6788c4dde6b1ca749ab49137
2022-09-01 10:29:02 +00:00
drh
9c3a114ca0 Enhance the b-tree page sorting code to ensure that sqlite3PagerRekey() never
overloads a page number and uses only the PENDING_BYTE page for temporary
storage.

FossilOrigin-Name: 5007742886bd20de20be3973737cf46b010359911615eb3da69cd262bd9a2435
2022-08-31 15:04:42 +00:00
stephan
53f635df55 batch-runner.js: add rudimentary metrics export to CSV. Add a toggle to reverse the log output mode (in normal order or most recent first).
FossilOrigin-Name: b26e2bc05537a1f451db1bdd36a824d71c3ea25a130b6285f31ff9799d65fa7a
2022-08-30 17:57:50 +00:00
drh
78d15f097a Improved comments in pcache1.c. No changes to code.
FossilOrigin-Name: dd017bb1b3e31c7692d29dc4865d6bda871e429978c8738a39160d0114e5bf9b
2022-08-30 16:54:41 +00:00
stephan
ffc0cbb024 batch-runner.js: re-enable unlink-before-run so that OPFS speedtest1 batch can work.
FossilOrigin-Name: ba08f7a7f12601aa580a8dc493b43cdd5ab65c87d5e4b3fd2f549343e45c2d2a
2022-08-30 10:26:33 +00:00
stephan
fbf0f488cf batch-runner.js: move generated SQL files into ./sql and start adding hand-written ones (like the Mandelbrot) to that set.
FossilOrigin-Name: 06c106a7d23e4486dbed092757b7588688226ad35539ecc31378a8497f59d1ec
2022-08-30 10:04:08 +00:00
stephan
429899ddad Remove the .timer script entry from fiddle app because emscripten has removed getrusage(), which breaks the timer.
FossilOrigin-Name: 9034f19ae50f196cc2b94478edfcc8d765b08bcf383166f6212b3522dea63c01
2022-08-30 09:51:24 +00:00
stephan
5bb5965710 wasm util: remove superfluous function.bind() calls to eliminate a level of call() indirection.
FossilOrigin-Name: 1aab9627983ef0f016b01f78564e79cf815ed14d4b1b6dc04ec627b96f1b2f70
2022-08-30 09:49:30 +00:00
drh
4d28830861 Any function call can abort. Take this into account when deciding if a DML
statement needs a statement journal.  See
[forum:/forumpost/9b9e4716c0d7bbd1|forum thread 9b9e4716c0d7bbd1] for more
information.

FossilOrigin-Name: 5c95ae6c9b93b9bcf698bb1cad93b2da2e28121b35e7c539b1ddc0ef2de33cfe
2022-08-30 00:11:51 +00:00
stephan
2f06bf2541 Lots of tweaking in batch-runner.js. Minor internal API update in OO #1 API.
FossilOrigin-Name: 24b82b9504db3d8e1335c2300b133f897dc1a541026dc24be5b0ffd8be66d977
2022-08-29 18:58:38 +00:00
stephan
49a785fa34 Add test descriptions to the speedtest1 '-- begin' markers for potential display by the downstream JS code which uses those markers.
FossilOrigin-Name: e5b7006f0f57f10a490d7eaeb7df77251a2f684602fed8ff161d8ce60033e7bc
2022-08-29 17:41:16 +00:00
stephan
2cae138fba Add batch-runner.js for running batch SQL scripts with timing info.
FossilOrigin-Name: 11f3ed61150c5940da6c157e5063e70c3aa0628dfd0023c47bb65b00af74ab1f
2022-08-29 12:39:34 +00:00
stephan
f2e624ea91 Add get/setPtrValue() to the common wasm utils.
FossilOrigin-Name: 24d70fc458c6002d5ff3c9f8ce7c66bde299b32aca6417c2dd1236e1412b036d
2022-08-29 12:31:57 +00:00
stephan
9a2efd8e1f Add begin/end comment markers to the test blocks in speedtest1 --script output to facilitate chopping up the output into chunks for JS-side processing.
FossilOrigin-Name: ef0b7ef2d2e19b1f9437fdd7e24f040f662d9907d1fa17c6a3892fcf091b849e
2022-08-29 09:51:17 +00:00
stephan
d7d1098baa oo #1 api: correct a case where a null callback is called. Rename some vars for clarity. Increase wasm-side memory in order to be able to load the speedtest1 output.
FossilOrigin-Name: b5058f14fadbc8a1886f27cff08593dd2c8e2b2cb6d7bed3b8733a55f031989f
2022-08-29 08:04:55 +00:00
drh
f0f025b340 More assert() statements in the page cache.
FossilOrigin-Name: 7c96a56c0d1de966844da6c5a84c0cd6066130a10724797ce6f228a9182d9b85
2022-08-27 16:11:00 +00:00
drh
f6e3e31625 Ensure that every pcache page always has either the PGHDR_DIRTY or the
PGHDR_CLEAN bit set, even during transient page reshuffling during btree
balancing.

FossilOrigin-Name: e67f03c166277951725c194674c84da61c152a5820aa6df55a726f7dda838e92
2022-08-27 14:43:34 +00:00
stephan
a3825e78bd Merge changes from trunk into the fiddle-opfs branch.
FossilOrigin-Name: 34279797be0922b9df05e0d4f327f8582ab25fb6fb21583f8441ddf5deded891
2022-08-25 19:38:54 +00:00
drh
23593f8e99 Ensure that sqlite3_prepare() inputs always have a semicolon terminator in
speedtest1.

FossilOrigin-Name: c72756b0f2db30c622f00f43be9245d50e36049bd7740ee6332164f0c48f9c3d
2022-08-25 19:29:35 +00:00
drh
09cb5eb5ac Add the --script option to speedtest1.
FossilOrigin-Name: 1c87d7c58d5aec83f9e2ae3771a81aa17cfae0cf06169025a5db085e2d5749f9
2022-08-25 19:19:25 +00:00
dan
aa07b36dd5 Remove a NEVER() macro for a condition that is actually reachable following an OOM. dbsqlfuzz crash-6ef3cd3b18ccc5de86120950a0498641acd90a33.txt.
FossilOrigin-Name: b573e2cffa5fedc893ed30e76e47022b3617ac5583e1eb486afa810b2514c419
2022-08-25 13:32:55 +00:00
stephan
335ad5264f Consolidate oo1.DB.exec() and oo1.DB.execMulti() into oo1.DB.exec(). This is a bit less efficient but certainly easier for a client to deal with and lightens the maintenance burden.
FossilOrigin-Name: 7eff7213dff553b76d7ce45063e3c4a19544716611a0b609593d704076b38d0b
2022-08-25 13:27:52 +00:00
stephan
9afff9f3c5 Refactor and expand the worker1 docs, consolidating them into the top of their file instead of scattered around the internals. Accommodate an API change from yesterday in demo-oo1.js.
FossilOrigin-Name: 0a65747047322b7b585e281ac275e437ce3f46e1d06105c19117213929a906ad
2022-08-25 11:39:12 +00:00
stephan
407f75378e Change DB.exec() rowMode default from 'stmt' to 'array', per /chat discussion. Add DB.exec() rowMode option for fetching a specific column by name. Add result column names to worker1 exec() callback interface, as there's otherwise no way to get that info from a worker.
FossilOrigin-Name: 1bb37e5c477b9eb098362f74a45a55be23d450fe45cdff58c1cbff08b5b3998f
2022-08-24 20:57:37 +00:00
stephan
3734401a95 Expand the worker1 'exec' op handling for per-row callbacks for API-level consistency and smooth some edges between worker1 core and worker1-promiser. Add worker1 'config-get' message to fetch the serializable parts of the sqlite3.config state. Improve the 'open' op's handling of the 'persistent' option (noting that we cannot yet test that case from a worker).
FossilOrigin-Name: 509f8839201ec1ea4863bd31493e6c29a0721ca6340755bb96656b828758fea7
2022-08-24 18:39:46 +00:00
drh
7383f5a7d9 Add a mutex to the sqlite3_db_config() interface so that it is threadsafe
when two or more threads call it on the same database connection at the same
time.

FossilOrigin-Name: 459ad8846ee1ee2d3b277a291c47121692bdf477e779b06e77be8338f62237a6
2022-08-24 17:59:00 +00:00
stephan
9c765e7945 js: resolve the mysterious "extra" unhandled exception notification, caused by inadvertently forking one promise into two separate ones (failing to properly reassign a then() result). Fix a typo in new Worker 1 code which caused the DB(filename) name to be incorrect.
FossilOrigin-Name: 7467ac88801224089b51c6ba7924f93283dd87beca602a186c83632df26cfc85
2022-08-24 14:50:10 +00:00
dan
2ce2b779bb Fix an inefficiency in the ".dump" command when outputing large blob literals.
FossilOrigin-Name: c055d05dbdfd4643d5052c6e6a736c78651fdfcd78f15f791af903df3814832d
2022-08-24 11:51:31 +00:00
stephan
9a34509a06 More work on how to configure the sqlite3 JS API bootstrapping process from higher-level code. Initial version of sqlite3-worker1-promiser, a Promise-based proxy for the Worker API #1.
FossilOrigin-Name: b030f321bd5a38cdd5d6f6735f201afa62d30d2b0ba02e67f055b4895553a878
2022-08-24 05:59:23 +00:00
stephan
efeee19a95 The very basics of a Promise-based proxy for the Worker #1 API. Still requires considerable cleanup, testing, and a solution for the exec-callback-via-event-type-name problem.
FossilOrigin-Name: 1e447849fb65887e806e3348a8a68f70ea6802bc0a1e56c385a279f27cc0cdda
2022-08-24 00:51:39 +00:00
stephan
a9ac2ed069 Significant restructuring of the Worker #1 request/response object structures to improve readability and clarity.
FossilOrigin-Name: 03b9db9b98cb36faa7de5a8a64d2e13c4aeaadfefb33ac92bb41056f6be3f121
2022-08-24 00:10:45 +00:00
drh
e5928b17ca Change the names of the Vdbe.pVNext and Vdbe.ppVPrev fields to make them
unique.  Change to ppVPrev to save a few bytes and a few CPU cycles.

FossilOrigin-Name: 34b8ea31877ae8b40729d37b3f51ae7e15f38be841881ea4a37c9c8f0a52896d
2022-08-23 20:11:01 +00:00
drh
35908b167f Enhance assert() statements to enforce tighter bounds on the P5 operand of
the OP_Next and OP_Prev opcodes.

FossilOrigin-Name: 4e0a07fc6f96e6e7726506b7a5ee942461c1381501f253893fa94d76023b634f
2022-08-23 17:51:39 +00:00
stephan
8c45a9f952 Wasm build flag tweaks and documentation.
FossilOrigin-Name: c8eb3aa8e0f487f14791214caf70d1aa03866e01345c7fa1d5607c24c39dde1d
2022-08-23 17:02:46 +00:00
stephan
f7415736d1 Add mksourceid binary to the clean rules and $(TESTPROGS) to distclean.
FossilOrigin-Name: ae3e82f5a3332bea261aca6a0dd02063cf7056c023204cc10f1ae18d75249f91
2022-08-23 16:55:19 +00:00
stephan
ae708b2b01 More experimentation with how client-side config state can be passed on to initialize the JS-side sqlite3 API.
FossilOrigin-Name: ea2acc454c012a62556f6d0623d6eff60736d24aa214a64462b423623ef44d47
2022-08-22 21:37:17 +00:00
drh
376860ba88 Performance enhancement for sqlite3DbFree().
FossilOrigin-Name: c296a9d958ec360fc8d217363348b4918d665bccb3c4f27503a2dcef7db49052
2022-08-22 15:18:37 +00:00
stephan
7a8a0fceec Merge in trunk.
FossilOrigin-Name: e215d55a97e1ccbca3101621374444d2381d87ef8e8fde5271e31c8b714e43e9
2022-08-22 14:03:11 +00:00
stephan
e3cd67603d Refactor JS API amalgamation such that the bootstrapping/configuration is deferred until the whole amalgamation is available, to facilitate providing clients with a way to initialize the API with their own config (noting that we're still one small level of refactoring away from being able to actually do that).
FossilOrigin-Name: 9dbe9a6aecec43b51057375ef1d2d632db0d17eac8b7552c20cc91fc2f1a55d1
2022-08-22 13:34:13 +00:00
stephan
64d04a8d9f wasm: accommodated a JS API rename.
FossilOrigin-Name: 00991335c4dae56232e999398e5e82d8161903ba7d084b16a73a150e83f1f782
2022-08-22 08:55:10 +00:00
drh
41ce47c4f4 Add the new internal interface sqlite3DbNNFreeNN(db,ptr) where both the
db and ptr parameters are guaranteed to be non-NULL.  Use this where
appropriate to save more than 2 million CPU cycles on the standard
performance test.

FossilOrigin-Name: e5eaa80e81fdf86f2875a912b880272b8d099b82b08e945a7988c5dd0fe9d6b5
2022-08-22 02:00:26 +00:00
drh
05cb948bf7 Merge the test case for dbsqlfuzz 18fe4e257be7fa3ecfb0424ab7427e41e97ef9e3
assertion fault, which is fixed with the previous check-in.

FossilOrigin-Name: 2d13ec086e96a5446462ce0f689c40c8196e740cd693f5967bfe9eb961f03463
2022-08-20 19:45:41 +00:00
drh
00378fde23 Enhance the enforcement of SQLITE_VTAB_DIRECTONLY so that it applies to
DML statements within triggers.  Do not allow DML stratements against
virtual tables within triggers unless either the virtual table is
SQLITE_VTAB_INNOCUOUS or PRAGMA trusted_schema is ON.

FossilOrigin-Name: 9433ea4070f52135be64569057f439e7bdb4b3f425d87167c9ebda50011210c1
2022-08-20 19:33:04 +00:00
dan
f56291ed02 Add test case for fuzzer case crash-18fe4e.
FossilOrigin-Name: 8372468bb5d8922cf20b8bbee34cfd6044ceb09c26a4efa79a5e6df2c7c4b730
2022-08-19 20:10:51 +00:00
drh
4ff42a82f7 Add notes to ext/wasm/README.md explaining how to run tests on a remote
machine.

FossilOrigin-Name: 7a3c444fb515413254b426908e4d3528ccc664a629628c23b7b85bd21c060d0e
2022-08-18 15:53:27 +00:00
stephan
d869a21d13 javascript: rename and simplify DB.callInTransaction() as DB.transaction(). Add DB.savepoint(), which works the same as transaction() but uses savepoints. Correct concatenation of arguments to SQLite3Error to use spaces instead of commas. Test that demo-oo1.js works with persistent OPFS storage (output differs due to persistent rows, but the demo works).
FossilOrigin-Name: e8c323f12b6223bc9dcbbec40698969c7917128aa50cf599c247df23f607ae61
2022-08-18 12:21:58 +00:00
stephan
fed91737f5 Improve an exception check in demo-oo1.js.
FossilOrigin-Name: 55e1b775fa7ec492817cc847036df7794c3c22b78558e9e9c513f24c775dedab
2022-08-18 11:16:27 +00:00
drh
78ed74ef8e In the ".dump" command of the CLI, if a schema statement ends with an
unterminated comment, try to terminate that comment prior to appending
the ";" at the end.  [forum:/forumpost/d7be961c5c|Forum post d7be961c5c].

FossilOrigin-Name: 96e112da1ac56767cf49f26132833745b6020d2c60f5c36f86ca84f87ad30c81
2022-08-17 20:18:34 +00:00
drh
16b03c0196 Enhance the "PRAGMA integrity_check" statement so that it verifies the rows of
a WITHOUT ROWID table are in the correct order.

FossilOrigin-Name: 62f934bff495850d0763e07ffa44a557f066ecba9d039363f32287213cba819f
2022-08-17 18:07:52 +00:00
drh
0348fc722f Minor code simplification in the code generator for PRAGMA integrity check.
FossilOrigin-Name: a3b9c7a6c9be5c78a93e5125f16237d2d84b977eca81f527af0198e96435a995
2022-08-17 17:14:36 +00:00
stephan
453af2f6cc Minor cleanups, reorgs, and doc updates for the JS APIs. Renamed sqlite3(-api)-worker.js to sqlite3(-api)-worker1.js, for symmetry with sqlite3-api-oo1.js.
FossilOrigin-Name: f5059ee6f9fc55a381cbf08a30dfb9a5636c0b44341e42f4e9f12a3b109b5507
2022-08-17 16:44:05 +00:00
stephan
6e901b07a3 wasm: minor cleanups in the OO API #1 demo.
FossilOrigin-Name: b9cdcc06a8f70694d10ee5b1a0fd9f08f4c705ce576e5103bbafb36fc9cc2122
2022-08-16 17:29:59 +00:00
drh
a8771a1736 Change the legacy RC4-based PRNG to use the RFC-7539 chacha20 algorithm.
FossilOrigin-Name: a0f801151925e882e120f6ab685dcacb9d3268d25b52bc665c5b927bcc7dda1e
2022-08-16 17:18:00 +00:00
drh
cd05aafa56 Fix obsolete comments. Add new comments. Fix non-standard spacing.
FossilOrigin-Name: a0d224c6a69941dad1f2b35edcc7ddee343b99eae2aeed74043461f3e97ef5b4
2022-08-16 16:57:33 +00:00
drh
534945ad07 Fix an off-by-one error in the ChaCha20 initialization code.
FossilOrigin-Name: 72e220eed446ea9a02a6ef03e09a01bcb8bbca1f3b32d2e0bf52a17d9722e2f0
2022-08-16 16:40:54 +00:00
stephan
e0c582850e wasm: add a small demo/presentation app for JS OO API #1 and make a few minor additions to that API.
FossilOrigin-Name: d6d79b661a1c6137d4693393e02416da4858d58dc84d144081a48d523655b483
2022-08-16 16:36:19 +00:00
stephan
ba851ae72e wasm: move another file and update testing1/testing2 to account for [e38d00c2b82d]. Disable wasmfs by default as it breaks the worker-based module loader (reason as yet unknown).
FossilOrigin-Name: 6dad5e0573ee866657ee10b43e55b86fc9caac7a66c13bdbd35c3625a4783f14
2022-08-16 16:16:25 +00:00
stephan
8ac2d8510e wasm: accommodate moving generated sqlite3.js in the previous checkin.
FossilOrigin-Name: 41762f9518bb51b8b23ae6507628d6d3256044e1f2aca6e7251dc57722062c42
2022-08-16 16:11:20 +00:00
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
drh
0f201fccc0 Omit an unnecessary test case from corruptN.test that does not work with the
new RFC-7539 PRNG.

FossilOrigin-Name: d9e8c65ed25c4f6222c737f4244d5362dbe433d357f7d133765157446cf4e925
2022-08-16 14:09:51 +00:00
dan
2756f806f2 Add assert() statements to verify that the SQLITE_OPEN_EXCLUSIVE flag is always passed to the VFS when opening a temporary file.
FossilOrigin-Name: e123da49ccae61d591abded52f4721aa10f20d75935c9a3e3fe826a9b8df2317
2022-08-16 10:52:35 +00:00
drh
9113c87ef3 Replace the RC4-based PRNG with one based on ChaCha20. 3x faster.
FossilOrigin-Name: 084d8776fa95c75440530028171c56547a341c9a952ba2f29bb533b538603c78
2022-08-16 00:04:40 +00:00
dan
207cb6f670 Extra test for SQLITE_MAX_COMPOUND_SELECT.
FossilOrigin-Name: c271096736889530f392ff37e631a77f3bc9c46b290dbda245fa05249f4410fc
2022-08-15 19:23:15 +00:00
drh
5187c955f6 The new --script option to dbtotxt.c looks for an SQL script at the head of
the file and generates a CLI script that will construct the database then run
the SQL.

FossilOrigin-Name: 6170e638ebeb12cc40c3247324237978401f701afc270de88ad03e183e82cefc
2022-08-15 18:36:08 +00:00
drh
9c5e1e40e3 In the documentation emphasize that the use of shared cache is discouraged.
Fix test cases so that they all work with shared cache disabled.

FossilOrigin-Name: 52c3ae063e133c5f88cad2c3084cf46218f865ac817ab937e3529d2c6a7af300
2022-08-15 12:26:26 +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