]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Mon, 12 Jun 2023 14:26:29 +0000 (14:26 +0000)]
Merge the latest trunk enhancements into the newbie-safe-aggregates branch.
FossilOrigin-Name:
c8ef3b787419ccb70bceccc8c851ba357f85299c3fc0f972d6b73d4c4cb23c42
dan [Mon, 12 Jun 2023 13:49:37 +0000 (13:49 +0000)]
Fix a problem causing bloom filters to be used less efficiently than they might be. Problem reported by forum post [forum:/info/
06c3f01da6 |
06c3f01da6 ].
FossilOrigin-Name:
56d9bb7aa63043f5db4a1e5e8eefe46762dba433145807c6e27a8316f1d03d7a
drh [Mon, 12 Jun 2023 13:31:20 +0000 (13:31 +0000)]
Check-in [
70e12efd1b189560 ] left a path through lockBtree() that failed to
set the BTS_PAGESIZE_FIXED flag. That omission is fixed by this check-in.
dbsqlfuzz
02c9ab74eb0619c9ae3b894ce157fae1d7f94645
FossilOrigin-Name:
30dcc872eb1c9549708009c86357826c4f15ffa17e379dab5cd4aec596643728
dan [Mon, 12 Jun 2023 11:06:57 +0000 (11:06 +0000)]
Fix a buffer over-read that could occur as part of an fts5 secure-delete operation on a database containing corrupt fts5 records.
FossilOrigin-Name:
a35c50eca907d0cf373b7962c359aebfce8ac7c34ce81edeb99122d4fb5804f7
drh [Sun, 11 Jun 2023 22:05:55 +0000 (22:05 +0000)]
Merge the latest trunk enhancements into the newbie-safe-aggregates branch.
FossilOrigin-Name:
75a877a9239ef004e4249ab9379a7af8cbe7655e3cdf50b7349c14721cc6eca4
drh [Sun, 11 Jun 2023 21:58:20 +0000 (21:58 +0000)]
Make sure temporary sqlite3_value objects used by STAT4 are reset to NULL prior
to being reused, to prevent a memory leak associated with
the custom xDel string value destructor.
dbsqlfuzz
65209ab5d5730e4fd14fff9d024325a77239036e .
FossilOrigin-Name:
88be7075cdc7000d3a1e84e49064cf8c28fc7caca9c464f44a83265223961b51
drh [Sat, 10 Jun 2023 19:33:02 +0000 (19:33 +0000)]
Defer setting the BTS_PAGESIZE_FIXED flag until after we are certain there
are no errors and the page size has been set.
FossilOrigin-Name:
70e12efd1b189560e07f59db03a20b8c1ab19224aae4fc3d7c0bdfd2568064ea
drh [Sat, 10 Jun 2023 18:40:20 +0000 (18:40 +0000)]
Fix an assert that can go bad if STAT4 content is corrupt. This is a
follow-up to the previous check-in.
FossilOrigin-Name:
ac1d3860af4eb30e4a7444b01d7b5afc91a4b1f5e3fe5414a491c6edc7ff1631
drh [Sat, 10 Jun 2023 17:27:59 +0000 (17:27 +0000)]
Add documentation for SQLITE_DBCONFIG_STRICT_AGGREGATE.
FossilOrigin-Name:
76fb9151386d8c4557ea75b26af5b9a2c83b04f7bd5e635a2218ca30a48b5849
drh [Sat, 10 Jun 2023 17:15:59 +0000 (17:15 +0000)]
Merge the latest trunk enhancements into the newbie-safe-aggregates branch.
FossilOrigin-Name:
e19e20fbaf6dedc5bf062120f3440eda86befb72a080d3ed70dbc45329ddf06d
drh [Sat, 10 Jun 2023 17:05:05 +0000 (17:05 +0000)]
drh [Sat, 10 Jun 2023 10:37:49 +0000 (10:37 +0000)]
Enhance fuzzcheck so that it understand the sqlite3_db_config() and
optimization settings from unused bits in the database header, which
dbsqlfuzz is now using.
FossilOrigin-Name:
918708c6dea5bffab4bb1c15d655ac7356bae97b84def905479dfcf491db6c5f
drh [Sat, 10 Jun 2023 09:24:29 +0000 (09:24 +0000)]
Fix a potential UAF in the parser caused by the changes on this branch.
FossilOrigin-Name:
c29ec76944e2ee62e3f3383047a92c05e97f59387874985381e74a47ffe69d28
stephan [Sat, 10 Jun 2023 08:19:10 +0000 (08:19 +0000)]
Add CFLAGS_FIDDLE to ext/wasm/fiddle.make as a way to pass on additional compilation flags to the fiddle build from the CLI, e.g. CFLAGS_FIDDLE=-DSQLITE_STRICT_AGGREGATE. Expose SQLITE_DBCONFIG_STRICT_AGGREGATE to JS.
FossilOrigin-Name:
0b0172087954d62fec532afce4532beb6a3882736e089bdd46aa5954bca2dbcd
drh [Fri, 9 Jun 2023 19:24:07 +0000 (19:24 +0000)]
Naming consistency: Always use the singular "STRICT AGGREGATE", not the plural.
FossilOrigin-Name:
275d056e461fa7f42a3df872cc9027799e8009a7296ea3546058e2c434886f68
drh [Fri, 9 Jun 2023 18:58:15 +0000 (18:58 +0000)]
Improved sqlite3_error_offset() values for bare column errors on
'*' and 'table.*' expressions in SELECT statements.
FossilOrigin-Name:
446ad162f76f2a32f3bfc5b5c1dadc8a139d4f338abb91fd912141ed8a768e8e
drh [Fri, 9 Jun 2023 18:30:36 +0000 (18:30 +0000)]
The -DSQLITE_STRICT_AGGREGATES compile-time option enables
SQLITE_DBCONFIG_STRICT_AGGREGATE by default.
FossilOrigin-Name:
cd1f6b27d99272a2550fedf22fa1bf6fde0b2f29e51fe7c113a2441f210aa492
drh [Fri, 9 Jun 2023 15:54:18 +0000 (15:54 +0000)]
Simplify a memcpy() in defragmentPage(). It now might copy more content than
is strictly necessary, but runs faster and uses less code space. Possible
reasons for the improved performance:
(1) the copy is now always 8-byte aligned,
(2) fewer intermediate results are required which means less register
pressure which helps the compiler to optimize the subroutine.
FossilOrigin-Name:
6e5607ae4d872954483a8d7a5c866aa41e4af70fae9652fb7eb211b316ab724d
drh [Fri, 9 Jun 2023 13:08:36 +0000 (13:08 +0000)]
Experimental change to add a per-connection option that raises an error if
a bare column appears in an aggregate query.
FossilOrigin-Name:
f587891134158fa4c48b3a31b6e1b9d7688823953a8b434752199160f3a95ffd
dan [Thu, 8 Jun 2023 20:49:25 +0000 (20:49 +0000)]
Remove SQLITE_EXTENSION_INIT macros from dbdata.c.
FossilOrigin-Name:
106ec745766ac59131f975d5ab5487c8a24b9c3be1766411c018b42c6ae4672a
drh [Thu, 8 Jun 2023 16:19:21 +0000 (16:19 +0000)]
Improvements to the src-verify.c utility program so that it continues to
muddle through a corrupt manifest file, making the most sense of it that it
can and reporting "manifest" has having changed at the end.
FossilOrigin-Name:
157b5d25e0c99eabfa3c32cb867fe7e3c05031c12354f734d2cd8a4062b9439c
drh [Thu, 8 Jun 2023 15:30:10 +0000 (15:30 +0000)]
Fix the amagamation generator so that it works one a clean source tree.
FossilOrigin-Name:
f502610d03a1362eea936129abd03390835b7e47ba25e6799b2e7880de540640
drh [Thu, 8 Jun 2023 15:27:35 +0000 (15:27 +0000)]
Include source provenance in the header comment of the amalgamation.
FossilOrigin-Name:
e3eb5af9050aae1db6887d17a560a24e4ca58f232ad7ac7c283c861ea4944f0b
drh [Thu, 8 Jun 2023 12:52:28 +0000 (12:52 +0000)]
Enhance Lemon so that it remembers which -D command-line options are actually
used in the grammar and includes a list of all such options in the header
of the generated output file.
FossilOrigin-Name:
c47a4dbd24b8277c57b7a83a8c0aeac2bc8f6ab75d1b65ba5e1fa83d1868d95f
larrybr [Wed, 7 Jun 2023 23:10:40 +0000 (23:10 +0000)]
Add spell-checking for all comments in main sources. (./src/ .c .h .in) make target "misspell" tells of misspelled words for which no exceptions have been put into tool/custom.txt .
FossilOrigin-Name:
5332abf0ad8ef42c44e9dd7045d017bb8fc9a0262a89ababa3e2c41788a6cdb8
larrybr [Wed, 7 Jun 2023 17:03:22 +0000 (17:03 +0000)]
Fix straggler misspellings and tidy the custom dictionary. Also include pickups from [forum:/info/
c61fb09afd |forum post
c61fb09afd ].
FossilOrigin-Name:
8c291d99946eb32b20b743921202f9c7cfb716268ff526817b27adbb7942e40b
drh [Wed, 7 Jun 2023 15:00:54 +0000 (15:00 +0000)]
Remove additional traces of FTS1 and FTS2 that were missed by [
2bb50d5aedef0fd2 ]
FossilOrigin-Name:
9a12bac5d24c7a8364d2127fd12c3409a53ef83e408d10f344ddd311cdba98af
drh [Wed, 7 Jun 2023 14:47:29 +0000 (14:47 +0000)]
Remove unused, legacy shell script "mkso.sh" from the root of the repo.
FossilOrigin-Name:
57f75e48690bdeb9b6bb3f46eee39021e3eb8cc0c488d2584177baa11ac984e5
larrybr [Wed, 7 Jun 2023 08:40:31 +0000 (08:40 +0000)]
Add a C-source spell-checking facility. make misspell (on Nix)
FossilOrigin-Name:
26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
drh [Mon, 5 Jun 2023 17:12:33 +0000 (17:12 +0000)]
drh [Mon, 5 Jun 2023 13:57:37 +0000 (13:57 +0000)]
Update the README.md file to talk about the verify-source makefile target.
FossilOrigin-Name:
aa8e79e16abf028d50370ae13b6c952a7b7f42985125bc8e7f51b20a10bfc336
stephan [Mon, 5 Jun 2023 11:30:50 +0000 (11:30 +0000)]
Remove extraneous console trace output from previous check-in.
FossilOrigin-Name:
c9f6e36d59fc8bf2bcef6fc14ff2e9ad3dfd972de94d4a71ff3f56134810a8ef
stephan [Mon, 5 Jun 2023 11:26:59 +0000 (11:26 +0000)]
Add a JS test confirming that binding of statement parameters in a subquery works.
FossilOrigin-Name:
5dfaf0bce83c3e15ad605e3f07291ce219f1a2726ce77be27779897088ee13d5
drh [Mon, 5 Jun 2023 01:05:46 +0000 (01:05 +0000)]
Generalize the src-verify.c utility program and provide additional documentation
in the header comment.
FossilOrigin-Name:
7ed84046ef0c2c64031cac3a3a6b43aac3ac40aeb36838d8d046493f2d5ed122
mistachkin [Mon, 5 Jun 2023 00:57:38 +0000 (00:57 +0000)]
Minor cosmetic normalizations for the MSVC makefile.
FossilOrigin-Name:
c9fda8d6dba36841415d0f445b4081b051bfaa70428b605ac0b9ca4ae98f7d49
drh [Sun, 4 Jun 2023 22:59:20 +0000 (22:59 +0000)]
Fix harmless compiler warnings in tool/src-verify.c
FossilOrigin-Name:
0e79ee97b18792dba9213bd9961f53e2bae765ac92df7963703d08857da74fd1
drh [Sun, 4 Jun 2023 22:56:31 +0000 (22:56 +0000)]
Enhancement to tool/src-verify.c to also check the manifest.uuid file.
FossilOrigin-Name:
a39a569482a35610fdaa2fdfc88491d8b456dfedb4786c817e0502eb3e3a5563
drh [Sun, 4 Jun 2023 22:41:52 +0000 (22:41 +0000)]
Add a prototype implementation for the "verify-source" Makefile target.
FossilOrigin-Name:
ed876ff6a1a6a2d555f32b96eb78d95eaf8428ee189f968c43f0829a3065bfa7
larrybr [Fri, 2 Jun 2023 21:31:15 +0000 (21:31 +0000)]
Clarify sqlite3_is_interrupted() return. No code change.
FossilOrigin-Name:
b6c2d3d203100a34335aeba23a8fb82a13297b65eed494d5044ade3bed683bc3
drh [Fri, 2 Jun 2023 18:05:54 +0000 (18:05 +0000)]
Restore the LEFT JOIN strength reduction that was partially lost in
[
d747afda5683ca5f ] when strength reduction was generalized to all OUTER JOINs.
FossilOrigin-Name:
2d962b84dd8ac2d0968f0283f8f082c1c2a7a1f99b59053b2ad8f58745396447
larrybr [Fri, 2 Jun 2023 13:31:12 +0000 (13:31 +0000)]
Do that last CLI fix more simply, using established means.
FossilOrigin-Name:
a1823b297616bc2bd64eda9df4850fb460d8da8959ae3728195db896d1f89e7b
larrybr [Fri, 2 Jun 2023 12:56:32 +0000 (12:56 +0000)]
Fix CLI fault on missing -nonce reported by [forum:/info/
f8c14a1134 |forum post
f8c14a1134 ].
FossilOrigin-Name:
cd24178bbaad4a1dafc3848e7d74240f90030160b5c43c93e1e0e11b073c2df5
drh [Fri, 2 Jun 2023 00:03:28 +0000 (00:03 +0000)]
Fix the OUTER JOIN strength reduction theorem prover's handling of the CASE
operator.
FossilOrigin-Name:
73d7b14b1713d93c4ae07995e9aa6485cbad90bd6125584dbaeccb0cc9410ea3
drh [Thu, 1 Jun 2023 20:38:22 +0000 (20:38 +0000)]
Generalize the LEFT JOIN strength reduction optimization so that it works for
RIGHT and FULL JOIN as well. Rename it to the "OUTER JOIN strength reduction"
optimization.
FossilOrigin-Name:
d747afda5683ca5feb92866a14ccc4c5127d3378ece5cad2c3da819f2477b457
drh [Thu, 1 Jun 2023 16:40:28 +0000 (16:40 +0000)]
If the filename argument to sqlite3_load_extension() is an empty string, then
raise an error. It turns out that if dlopen() is called with an empty
filename, it tries to load the current executable. And then if the caller
requests some other function from the current executable, mischief can result.
FossilOrigin-Name:
d01688554715eb4aaa1b1fd1a6b660b84e930edb0e062156ecf5228ee81ca754
drh [Thu, 1 Jun 2023 00:28:11 +0000 (00:28 +0000)]
drh [Thu, 1 Jun 2023 00:01:20 +0000 (00:01 +0000)]
Fix the LEFT JOIN strength reduction for IN operators in the WHERE clause.
Further simplifications and refinement of the algorithm.
FossilOrigin-Name:
96c72dde79d4069f6c2f81467a35b617633f86f7a7dcafbda991affdaa1f8537
drh [Wed, 31 May 2023 18:52:46 +0000 (18:52 +0000)]
Add a comment to explain why both sides of an AND must be non-null-row in order
for the overall expression to be non-null-row. No code changes.
FossilOrigin-Name:
8396032ce14a75f408f0a75bcb36a6504d5188f20886e275746a2c336a74296f
drh [Wed, 31 May 2023 18:35:12 +0000 (18:35 +0000)]
Improved detection of when the LEFT JOIN strength reduction optimization
can be applied.
FossilOrigin-Name:
f544a8e47cdd5ad7233887a558489983f4f305a39391ff463c43e2e4157da087
drh [Wed, 31 May 2023 12:42:09 +0000 (12:42 +0000)]
Minor enhancement to the sqlite3_trace_v2() documentation. No code
changes.
FossilOrigin-Name:
fba97230e38276f2a02fc24353c3d911dfa24f3a4f75f691de9461d4daf3ae54
dan [Wed, 31 May 2023 11:03:17 +0000 (11:03 +0000)]
Fix a problem causing an infinite loop in the recovery extension when processing a corrupt free-block list.
FossilOrigin-Name:
5a516c6c7a25cec4d0a0cca530017a3299f7a332319f3e1f7cf12f53c32b88ca
drh [Tue, 30 May 2023 16:40:42 +0000 (16:40 +0000)]
Enhancements to date/time functions:
(1) Add support for time-shift modifiers of the form (+|-)YYYY-MM-DD HH:MM:SS.SSS
(2) Add the timediff(A,B) SQL function that returns the time-shift modifier
sufficient to move B to A.
FossilOrigin-Name:
574bf370b0b9a72eb0468e0e121d4d6171fc533883b66d335f6794ef5ee1f051
drh [Tue, 30 May 2023 14:46:30 +0000 (14:46 +0000)]
Simplifications to the new timediff() logic.
FossilOrigin-Name:
d6954259bd3f8475f3804fd02a1591d037efa9df54da45776863c024ff90e596
stephan [Tue, 30 May 2023 14:10:28 +0000 (14:10 +0000)]
Minor tweak to the OPFS async proxy to attempt to account for a spurious high-load console error message which was reported via the sqlite-wasm npm project.
FossilOrigin-Name:
a61467d1fbb7a2804bfdc685a38e0b738747b9afd42c25a78a938b114a822f61
stephan [Tue, 30 May 2023 13:27:57 +0000 (13:27 +0000)]
drh [Tue, 30 May 2023 11:51:45 +0000 (11:51 +0000)]
New test cases for the timediff enhancements.
FossilOrigin-Name:
f14633ce6ddf28a14b03e2da623d96e439966aa3fc30c26cb0be59c0e15b3e9c
drh [Tue, 30 May 2023 11:13:56 +0000 (11:13 +0000)]
All date/time modifiers of the form (+/-)YYYY-MM-DD without the following
HH:MM:SS.SSS.
FossilOrigin-Name:
fa9237a8ab803ca3f67fe753516b7bdb98be3d625e8e241ddf9b02509210e225
drh [Tue, 30 May 2023 02:50:32 +0000 (02:50 +0000)]
drh [Tue, 30 May 2023 02:16:33 +0000 (02:16 +0000)]
Improvements to the timediff() function. Test cases added. Not all test
cases are passing.
FossilOrigin-Name:
2cf6518140d61e2123dc20f39d7e97e7bce17e7641405df7fd63e1cdda444ae0
drh [Mon, 29 May 2023 20:33:33 +0000 (20:33 +0000)]
New date/time modifier: (+|-)YYYY-MM-DD HH:MM(:SS.SSS)?
FossilOrigin-Name:
3832b8a9ef84d9b53b48dfce9c1e724897cd7b3e05711e01675419655f894eac
drh [Mon, 29 May 2023 18:01:42 +0000 (18:01 +0000)]
Prototype implementation of a proposed "timediff(X,Y)" SQL function.
FossilOrigin-Name:
054a195125a273bab026ada5f07cc7c32818007027a1fd028ca59d2f179276d4
drh [Sat, 27 May 2023 20:08:23 +0000 (20:08 +0000)]
dan [Sat, 27 May 2023 19:34:46 +0000 (19:34 +0000)]
Add extra tests for fts5, large rowids and "ORDER BY rowid DESC". No changes to code.
FossilOrigin-Name:
b5b5eaeed3ef55415e27aa04561ab446f3be881b56b7cbf9b8ba3307f0b2bf69
stephan [Thu, 25 May 2023 16:49:06 +0000 (16:49 +0000)]
Add ability for the JS Worker1.exec() API to report the number of changes made to the caller, per request in [forum:
d0b19483642e20dd | forum post
d0b19483642e20dd ].
FossilOrigin-Name:
6e79505df915612b60696e4eec5c9973175fe6ecf273eb3152b996e63ae54a07
stephan [Tue, 23 May 2023 19:11:42 +0000 (19:11 +0000)]
Minor cleanups in demo JS code, per forum feedback.
FossilOrigin-Name:
80c7c0360c08bea0733deccb8071920c60558b75df76b6afad093c82adf30ea6
dan [Tue, 23 May 2023 17:35:18 +0000 (17:35 +0000)]
Avoid performing aggregate processing more than once for a single expression. [forum:/info/
36ff78b2a3 |Forum post
36ff78b2a3 ].
FossilOrigin-Name:
367b4cc549a14222d54530538e692e9d1a365002c1b8c4ef80ddc0523bfdb3a2
drh [Tue, 23 May 2023 15:16:20 +0000 (15:16 +0000)]
When converting an aggregate expression to AGG_COLUMN, be sure to remove
the EP_Unlikely flag if it is present.
[forum:/info/
fbfe330a2009d036 |Forum post
fbfe330a2009d036 ].
FossilOrigin-Name:
48e65f18b2ebbe786e84e208f2c6c68de6067ba86912fea5a120fd41d0af2184
dan [Tue, 23 May 2023 14:05:02 +0000 (14:05 +0000)]
Fix a buffer overread in the recovery extension that might occur on 32-bit platforms.
FossilOrigin-Name:
ff4a9a2b59657116da99c748ada19dbc64b7d0fd4c920e1c517d8bda3466f06b
dan [Tue, 23 May 2023 11:47:56 +0000 (11:47 +0000)]
Add test cases for the recovery extension. No changes to code.
FossilOrigin-Name:
cec49c7d93362f527f0b4744cd1ae95d44a79671d49d69baa77fda70be29f7e8
larrybr [Mon, 22 May 2023 20:36:55 +0000 (20:36 +0000)]
Avoid duplicate WIN32_LEAN_AND_MEAN #define. Fix a trivial nit likely never observed.
FossilOrigin-Name:
81ffcf41d69ae73ee8c037f675e18e2b46a15bee34062914640456381262d6fc
drh [Mon, 22 May 2023 16:35:21 +0000 (16:35 +0000)]
When a floating-point RTREE is presented with large integer constraints -
integers that are too big to be represented exactly by a float - then take
extra steps to ensure that all possibly relevant entries in the RTREE are
returned, even in boundary cases. Fix for the problem identified by
[forum:/forumpost/
da70ee0d0d |forum post
da70ee0d0d ].
FossilOrigin-Name:
bfd8d9100015f3e3fb011698963d670bd89b64ec8a8ab931e0c6c3076b029377
dan [Mon, 22 May 2023 11:02:15 +0000 (11:02 +0000)]
Fix a buffer overrun that could occur in fts5 when processing corrupt records.
FossilOrigin-Name:
4891dbd938f4bfd345eaef01f2addea9512eaa98f860844c73abb907b6a8e0e8
stephan [Fri, 19 May 2023 18:23:53 +0000 (18:23 +0000)]
Extend detection of the INSERT...RETURNING locking case to the DB.selectValue(s)/selectArray/selectObject() family of functions. Add tests for INSERT/UPDATE...RETURNING with those functions.
FossilOrigin-Name:
3181c50540df0eff6cb5db79bb477c469bb7b73b0692260ba600db200fcef4ac
stephan [Fri, 19 May 2023 17:59:21 +0000 (17:59 +0000)]
stephan [Fri, 19 May 2023 17:50:16 +0000 (17:50 +0000)]
oo1.Stmt.finalize() no longer throws, but instead returns the same as the C API. oo1.DB.exec() now triggers the INSERT...RETURNING locking failure as an exception via reset() instead of finalize(). Some code-adjacent internal API renaming for clarity's sake.
FossilOrigin-Name:
4ee6b3aa531b980acea4c4b58ee256e765c5105100468928def3d4c9825fa9bc
drh [Fri, 19 May 2023 16:42:49 +0000 (16:42 +0000)]
Improved documentation for sqlite3_reset(), in response to
[forum:/forumpost/
a72bab3dea |forum post
a72bab3dea ].
FossilOrigin-Name:
1dfeb3dceee8f30daf5462683f264b9de23e7068e036e70b11ee1b608ac2f7fa
stephan [Fri, 19 May 2023 16:34:56 +0000 (16:34 +0000)]
sqlite3.oo1.Stmt.reset() now throws if sqlite3_reset() returns non-zero, analog to [
f23eb5c6d365 ].
FossilOrigin-Name:
487ae12c9a21e5862bd590bbb1030c39734657d52136cf67b98c7545e6ecbe1c
stephan [Fri, 19 May 2023 16:12:06 +0000 (16:12 +0000)]
Add a basic INSERT RETURNING test for the oo1.DB.exec() API.
FossilOrigin-Name:
d29d62cf7658aeb49f3c8a5d0b0809d945ebc9b79379a255eb88f771d2a2c430
stephan [Fri, 19 May 2023 15:54:41 +0000 (15:54 +0000)]
sqlite3.oo1.Stmt.finalize() now throws if sqlite3_finalize() returns non-zero. This is intended to address the INSERT RETURNING case covered in [forum:
36f7a2e7494897df |forum post
36f7a2e7494897df ].
FossilOrigin-Name:
f23eb5c6d36546ee1e181a03660e0b2dc8005bba24bee8bae594b0c78bd152cd
stephan [Fri, 19 May 2023 12:41:14 +0000 (12:41 +0000)]
drh [Fri, 19 May 2023 11:48:05 +0000 (11:48 +0000)]
Change the RTREE engine so that equality comparisons of floating point
values are duplicated in the byte-code so that the comparisons are done
using 64-bit floats and consistent results are always obtained.
[forum:/forumpost/
da61c4a1b5b4af19 |Forum post
da61c4a1b5b4af19 ].
FossilOrigin-Name:
4ec0f0a31b0df93ad15545fe1db117c933e28c75ad3cbc8475b56fecdb084905
drh [Thu, 18 May 2023 23:25:48 +0000 (23:25 +0000)]
Fix incorrect b-tree root page reports from the enhanced PRAGMA integrity_check
output introduced in version 3.42.0.
FossilOrigin-Name:
9b538f62539bcde7d7d7ad06eccdc558ecbd3f9160db35197568f4d3b4247c76
drh [Wed, 17 May 2023 19:23:24 +0000 (19:23 +0000)]
Fast-path the btree transaction start for the common case where a
transaction is already active.
FossilOrigin-Name:
798c3ff20c606b5f9fde16dc67781f238370a7c450bc239c3a98d0f4ca370399
drh [Wed, 17 May 2023 16:13:48 +0000 (16:13 +0000)]
Simplification, performance improvement, and size reduction in the
codeAllEqualityTerms() function of the code generator.
FossilOrigin-Name:
4fbe02651e877e442d62308d7f607e503695104cd71c5565132fcd1398c120df
drh [Wed, 17 May 2023 15:46:46 +0000 (15:46 +0000)]
New assert() statements to verify that Expr.iColumn is never used as an
array index when its value is negative.
FossilOrigin-Name:
6084c5fb6d3fcedf35cd6c597a44ec7bf8b4a2576c7b277e5342d2a7905318e7
drh [Wed, 17 May 2023 13:21:45 +0000 (13:21 +0000)]
dan [Wed, 17 May 2023 11:31:51 +0000 (11:31 +0000)]
Avoid an assert() failure that could occur in SQLITE_ENABLE_UPDATE_DELETE_LIMIT builds when a WITH clause attached to an UPDATE or DELETE statement created a CTE of the same name as the table being modified.
FossilOrigin-Name:
8edf56d1698c3db38250db3b25864f658488414efb3a6b3e1443283b6affd26d
drh [Wed, 17 May 2023 00:26:50 +0000 (00:26 +0000)]
Fix two assert() statements that failed to take into account
the likely() built-in function. This does not impact production code.
FossilOrigin-Name:
8504fe812c5b4956c8acad515d537add54cb591bc81747113f9b24526d7685b8
drh [Tue, 16 May 2023 14:20:04 +0000 (14:20 +0000)]
Increase the version number to 3.43.0 in order to begin the next
development cycle.
FossilOrigin-Name:
7874023cd460cbe05401433b8e695a77955e2c055c360a93b92d4ce6937bd136
stephan [Tue, 16 May 2023 14:18:48 +0000 (14:18 +0000)]
Resolve the JS-side corner case reported in [forum:
7774b773937cbe0a | forum post
7774b773937cbe0a ] by not caching oo1.Stmt.columnCount.
FossilOrigin-Name:
37d44e8c447626738a8a7f915a9bc3f35fbb95581236dd152fc119b0c3a24c2a
drh [Tue, 16 May 2023 12:36:15 +0000 (12:36 +0000)]
drh [Tue, 16 May 2023 12:34:26 +0000 (12:34 +0000)]
Update the tool/mkmsvcmin.tcl script so that it prints a one-line message
to explain what it has done.
FossilOrigin-Name:
4254f086419892634c80b0b915e14edea365adc6a45bcc75eecba889da274ac3
drh [Mon, 15 May 2023 19:17:31 +0000 (19:17 +0000)]
Fix a C++-style variable declaration in the generate_series() extension.
FossilOrigin-Name:
1d3e008905461ebbd3ea0a862672f740fa72914d4d59fcf800e1ce56f1edfc9d
dan [Mon, 15 May 2023 17:24:48 +0000 (17:24 +0000)]
Limit the number of nested NOT nodes in an fts5 expression to 256.
FossilOrigin-Name:
01219e69b430c8f5fea5ab6ce511ba8c9b4c9b32b6d2d36623dde99c3d3812c9
drh [Mon, 15 May 2023 17:20:21 +0000 (17:20 +0000)]
Increase the stack size available to fuzzcheck to 8MB on Windows.
FossilOrigin-Name:
2290dc6876041bcc982f162f59fdc9fd98b0983e1058c0a33fd46937ecc4bd84
dan [Mon, 15 May 2023 17:14:16 +0000 (17:14 +0000)]
Limit the number of nested NOT nodes in an fts5 expression to 256.
FossilOrigin-Name:
0e5c1ee40a146ef8b2b3c5f53d0a45e092bc8d8e933f3819805c995819d31bae
drh [Mon, 15 May 2023 10:55:04 +0000 (10:55 +0000)]
Add the --wait command-line option to fuzzcheck.
FossilOrigin-Name:
5a479a2c7637a018d1828d9d37973bf3d36a2fc4cd5b752bca61a41cd0920d39
larrybr [Mon, 15 May 2023 03:48:48 +0000 (03:48 +0000)]
Make generate_series() correct on ones complement ALUs and acceptable to UBSAN.
FossilOrigin-Name:
4c5cd3e6968c44749b7663beee790969b41d247b9201b771ef90cbb03d09108f
drh [Mon, 15 May 2023 02:06:35 +0000 (02:06 +0000)]
As evidenced by [forum:/forumpost/
f3f546025a |forum post
f3f546025a ], the
new RIGHT JOIN related restriction on the push-down optimization implemented
by [
da3fba18742b6e0b ] also needs to apply to the automatic index
(a.k.a. hash-join) optimization and to the Bloom filter optimization.
Computation of the restriction is now
moved into the sqlite3ExprIsSingleTableConstraint() routine.
FossilOrigin-Name:
4902015dcf3869f08d9986e422faa231d9218a5e0fc59ba8df0f407e4eb3d605
drh [Mon, 15 May 2023 01:02:50 +0000 (01:02 +0000)]
Simplify the interface to constructAutomaticIndex().
FossilOrigin-Name:
c5da16551619718bf649c517515261706843e11e131f0b99e1fd6927d0f7e238