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
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
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
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
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
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
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
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
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
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
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
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
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
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
drh
316cd40122
Fix a minor comment typo. No changes to code or documentation.
...
FossilOrigin-Name: 8032db4ade66f70a102abb9d3a49e20620e204c45ad7a954a49d20403985bf07
2022-09-19 17:41:59 +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
drh
a50d3b7a5d
Fix an uninitialized variable in the decoder kv-vfs.
...
FossilOrigin-Name: 354726aa6c399053785f29104de15091629ce4bc275b9e2205cb3656a9e81cd7
2022-09-17 18:31:31 +00:00
drh
20a9ed1dc6
Include the kv-vfs as an optional VFS on unix builds if the
...
SQLITE_OS_KV_OPTIONAL compile-time option is present.
FossilOrigin-Name: 852812d1e2ec3c53ad7c6c64662b37d861fefcf1baeee3d58eba88bcb3f6d8df
2022-09-17 18:29:49 +00:00
drh
b9fbc558f7
Merge the latest trunk enhancements into the kv-vfs branch.
...
FossilOrigin-Name: 37c7ca25a6e837e7f83b96a32e2b1a455730e48a48012c458ae2e734a3ccdd1f
2022-09-17 17:26:44 +00:00
drh
756440febc
Corrections to the xRead method for databases in the os_kv.c VFS so that it
...
correctly reads the header, and thus avoids unnecessary cache flushes. This
changes also includes an optimization to the header read logic.
FossilOrigin-Name: ef54961ce69fddb4cfeeff0860288de2858a6f7a5aa396691e8e99933eb9af54
2022-09-16 15:19:04 +00:00
drh
84e5076787
Fix os_kv.c so that it uses SQLITE_FCNTL_SYNC and hence
...
works even with PRAGMA synchronous=OFF.
FossilOrigin-Name: 21915af560b111aeeaee751790356151a5f063c2fc703dd4b35b22dc393409fb
2022-09-16 11:37:01 +00:00
stephan
d22cfa8c80
Pull the src/os_kv.c part of [13839759f8f4] into the kv-vfs branch.
...
FossilOrigin-Name: e334449912d5176e355d02024a07ed867741f71c9d10ce6744ca800414bf3eeb
2022-09-16 01:08:06 +00:00
dan
7985e05a97
Add tests. Deal issues surrounding aborting recovery from within the SQL callback, and avoiding the pending-byte page.
...
FossilOrigin-Name: 4e97dd31f5240d9231167ae172a5116426c42177a1ed3c5422b9d51b762d5a87
2022-09-13 18:08:24 +00:00
stephan
5fd8f27bfb
Remove an extraneous key-copy op in the EM_JS impl of kvstorageDelete().
...
FossilOrigin-Name: 1c5aeee45564c14e7e2e7730f3f52106339ea3148fb5aa786fa767a35db46f51
2022-09-12 20:21:34 +00:00
dan
5ca0b38605
Fix some problems with handling corrupt database in the recovery extension.
...
FossilOrigin-Name: ed318be8241981ef96334ba13d3201a717cc812a59aed64e3dc67f7e7e71854b
2022-09-12 20:02:33 +00:00
drh
b126ec18b6
Fix the <sys/time.h> include in os_kv.c.
...
FossilOrigin-Name: 878cc93e779c3857adc711f212520f007256274fcd3f6f3d72c754a937fcd198
2022-09-12 19:33:20 +00:00
drh
d8bb0b5ae6
Add a gettimeofday()-based implementation of xCurrentTimeInt64() to os_kv.c.
...
FossilOrigin-Name: e393ed650ef124143f84e9d787fb996e308dd7af6b8f50df72a6f085b67bf9c3
2022-09-12 19:29:34 +00:00
drh
bb19512438
Fix a debugging/testing edit in the previous check-in.
...
FossilOrigin-Name: 6fc8d34c0ae1f8277544be741f2f0835fad8e475d35bd24573224ccc1699b8bd
2022-09-12 18:10:41 +00:00
drh
6acd7b0a75
Faster text decoder for kv_os.c.
...
FossilOrigin-Name: 3354a2edb762d70ccc31d4d25f81b70e644d76e01cb1e81d2e97b5414d809d30
2022-09-12 17:44:35 +00:00
drh
1ad51ffe21
Fix uninitialized variable in rollback-journal processing in os_kv.c
...
FossilOrigin-Name: e49682c5eac91958f143e639c5656ca54560d14f5805d514bf4aa0c206e63844
2022-09-12 15:59:35 +00:00
drh
6b013afb88
Fix the amalgamation so that it builds with the standard unix backend again.
...
FossilOrigin-Name: 0adf158f4e5791339988185cc29347c75056b062e0db65b5999fdfa1f433c1ed
2022-09-12 12:41:07 +00:00
stephan
ad5125a624
Initial build of kvvfs in wasm. It loads but cannot find the VFS for as-yet-unknown reasons (sqlite3 shell works fine), and most APIs throw "null function or function signature mismatch" from deep within wasm, presumably as a side effect of the "missing" VFS.
...
FossilOrigin-Name: 1a2f24a0bdfc6eaae478916b8f4f9c6b63ead9964534fc2951fb4e995ffe61f1
2022-09-12 12:39:28 +00:00
drh
c6c9c6aad0
Improved comments in os_kv.c. Better names for the key/value name spaces.
...
FossilOrigin-Name: 8e1652a3856765c9146cc2a7e3b598a2dc7dc84c556b35eab9a35184514384b9
2022-09-10 18:38:21 +00:00
drh
7585f49a0a
Move the vfskv.c extension to src/os_kv.c and make it part of the amalgamation,
...
activated if and only if SQLITE_OS_KV is true.
FossilOrigin-Name: f6632e69c2ec1a7ddc4e51f3567e3bc082ee94a6dd51fdafdc0c3bf386a32d4c
2022-09-10 18:20:59 +00:00
mistachkin
bdb6368d72
Fix harmless compiler warning seen with MSVC.
...
FossilOrigin-Name: 73c4c68d3b4c16caf8281dabddd7365d24691e5ee2da89b1783eca66bfbd9280
2022-09-09 17:50:29 +00:00
dan
46d4398440
Update comments in sqlite3recover.h.
...
FossilOrigin-Name: 14164047c43e3ca43aa010c77ea00dfa85400e15645ee0f5b90a677898b6a836
2022-09-08 21:43:18 +00:00
dan
9a27d65044
Update the shell to use the recover extension for the .recover command.
...
FossilOrigin-Name: ae832e77084eddd696c80cb926d070a5db9d45dce34156a02522b3140e8f5e8b
2022-09-08 19:22:29 +00:00
drh
b53e0992b2
Enhance an assert() to impose for tighter constraints on the operation of pcache.
...
FossilOrigin-Name: 42105eb43a916a7cd839fa6c582eaffaef17f50b23c3e05142400c379feb73c7
2022-09-07 20:11:22 +00:00
drh
8c983ddb67
An improved technique for ensuring that the Rekey() operation does not
...
overwrite an existing page number. This approach does not change the
semantics of the underlying pluggable pcache and it is easier to prove
correct. This replaces the changes at
[aadd38f99a3e5abc] and [81cff9f1955874aa].
FossilOrigin-Name: 7dbddde79e3ca1b81e00288616fc27434698ce6dcb47714728fce8602ae91f45
2022-09-07 19:28:18 +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
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