1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00
Commit Graph

9916 Commits

Author SHA1 Message Date
drh
5b0592a36f Merge the 3.50.3 changes into the reuse-schema-3.50 branch
FossilOrigin-Name: 5a70ffd63cb493fcb111bf21db51025d0596e25c879db0ed9ff1d4d721e8b1f6
2025-07-17 14:02:44 +00:00
drh
65ffbcd7c0 Rework the fix to the problem described by
forum post b9647a113b so that it
provides a more complete fix that covers cases that were not resolved by
the original fix, and so that it does not cause performance regressions.

FossilOrigin-Name: 4084ac20f425bb992e567cff9cc6e304504c5198a41a9ce1304920c6411b7989
2025-07-07 16:28:59 +00:00
drh
993c1b4872 When attempting to optimize "expr AND false" to "false" and
"expr IN ()" to "false", take care not to delete aggregate functions
in the "expr" as doing so can change the meaning of the query.

FossilOrigin-Name: 355c7902de8da79f35f6d729d0fc5bdd74cdc1a1b249cf440ef74839ec025850
2025-07-01 12:49:32 +00:00
drh
dd7f0c0ef7 Merge the 3.50.2 changes into the reuse-schema-3.50 branch.
FossilOrigin-Name: b66f853a242c33e270ab744adbd277c4343ef1fd6b88e5f72b43deda94590d7a
2025-06-28 14:35:51 +00:00
drh
af3f9228a9 Avoid writing frames with no checksums into the wal file if a
savepoint is rolled back after dirty pages have already been
spilled into the wal file.  Also fix a corner case in the previous
check-in on this branch.

FossilOrigin-Name: c232fa2bfc1a3f2c659a1d3bb26f98f2b39f20777eebd4d08e53c21d018d3b59
2025-06-17 19:32:23 +00:00
drh
6460f4d474 Fix an issue going back to version 3.39.0 with transitive IS constraints
in queries that make use of RIGHT JOIN.

FossilOrigin-Name: 6c5f4c8af90cfe2f1b06485f8cf61d7e6d4ad92f5209e84aa1c6d1a938780a64
2025-06-16 18:04:21 +00:00
drh
591d201df5 Have sqlite3_setlk_timeout() take the database handle mutex. This fixes an assert() failure that could occur if sqlite3_setlk_timeout() were called on a threadsafe handle.
FossilOrigin-Name: 954efdd30da169e508f27ddf2f94bc2c3b6cc3f4fd13ffa650ab53d3e35df566
2025-06-12 13:27:10 +00:00
drh
b586004cc8 Fix the concat_ws() SQL function so that it includes empty strings in the
concatenation.

FossilOrigin-Name: e0ce6dab46ba965e28413fee62f32589c4da29a789f93745b6055bf62ebf129e
2025-06-11 00:05:27 +00:00
drh
e7785c3b7d Update the reuse-schema branch to the 3.50.1 patch release.
FossilOrigin-Name: b5463d75604c6be244f47061e64cdb14b27417521bcba1fd3fe230f2948cbd91
2025-06-06 15:43:39 +00:00
drh
d7cb1ea7ba Fixes to ensure SQLITE_ENABLE_SETLK_TIMEOUT builds use a blocking lock
and do not call xSleep() when (a) opening a snapshot transaction, and
(b) when blocked by another process running recovery.

FossilOrigin-Name: 8ac4525a2e3100bb5b9460cc49bb64f007911180d5f51461282b1de0201328b6
2025-06-05 11:57:20 +00:00
drh
d95ba2fb03 Relax query flattener constraint (3b) and thereby allow flattening the RHS of
a LEFT JOIN even if the RHS contains a virtual table.  This is a performance
optimization that would not normally be found on a patch branch, but
downstream needs it and does not want to wait on the next full release.

FossilOrigin-Name: 916dde1f409d5cb9300da464daa1e06e6fcee3d8a6a68d469fa9580ae8700bfa
2025-06-03 17:46:24 +00:00
drh
13efb2f676 Improve the accuracy of affinity and collating sequence analysis for
NATURAL JOINs to the left of RIGHT JOINs where source tables are views
or subqueries.

FossilOrigin-Name: d6a8b1ea5ca7e0d4e640144a4b3ada516486564bb5922af688328399c4cc4427
2025-06-02 18:42:49 +00:00
drh
ce3887bde4 Cherrypick obscure (fuzzer-generated) RIGHT JOIN bug fixes from trunk.
FossilOrigin-Name: a61da8169b4ac64c20b3f1dfe3bb2a57c5e6517828b0224bcde3ee93949733e1
2025-05-31 18:46:44 +00:00
drh
4cb03d18a4 Extend the fix for ticket 623eff57e76d45f6]so that it covers RIGHT JOIN
in addition to LEFT JOIN.

FossilOrigin-Name: cbd9aabaa5f54434c7b744cc9bb439cc702e35d74397d7157f7f06bdf67d8b14
2025-05-30 11:00:57 +00:00
drh
f766ca9ae3 Update the reuse-schema branch to version 3.50.0
FossilOrigin-Name: 4b1a38ff6bba84d54667a4a12cad1dcecc05f1c466ab55231725ecf01a99bdf8
2025-05-29 14:59:57 +00:00
drh
f96d44e5de Fix a bug in the speedtest.tcl testing script that was introduced by
[7e9845433ff26bdc]

FossilOrigin-Name: e4ffa86aa6ca82a42933281f6cbfca7bad702797eb8d6e684a1992e68dc1cfb7
2025-05-26 17:29:13 +00:00
dan
93394ebc27 On OpenBSD, do not test fuzzcheck with ubsan as part of "make devtest".
FossilOrigin-Name: a3dabd599c3d3143b67258b307d352968e5f5d4ea0456940d16ae678de8c95eb
2025-05-26 16:17:06 +00:00
drh
a01b7adb13 Change json_group_object() so that it ignores entries where the label
is NULL.  [forum:/forumpost/e5bd251fb5|Forum post e5bd251fb5].

FossilOrigin-Name: 28215d131cd970a2756338579fb6b6091ab155be8f419505cae8ac918956165c
2025-05-24 20:20:20 +00:00
drh
c1ea1a6d4d Add the --osmalloc option to the test/speedtest.tcl testing script.
Adjust ./configure so that it does not check for malloc_usable_size().

FossilOrigin-Name: 7e9845433ff26bdc5fe8654281d584394b77e3b206d09669b4468e0271c6eb37
2025-05-23 14:52:23 +00:00
drh
b43090b981 Merge the latest trunk changes into the reuse-schema branch.
FossilOrigin-Name: fc5edd557e4398c87f920d85492eb8a22c27976b1a0a97039bb151c2ddb1d04f
2025-05-19 17:06:55 +00:00
186fd30436 Adjust the strftime() test in test/date4.test to remove flags not supported in musl libc if that environment is detected.
FossilOrigin-Name: fc254c1eb784c79a371bf961945a18a680982cdcd3fdcd7e6bb481712fe21cf8
2025-05-13 18:58:56 +00:00
drh
75e4cbebb3 Merge the latest trunk enhancements into the reuse-schema branch.
FossilOrigin-Name: f98aa940b439c6e4419be9af988c72a8f97eb5713ad684808afea34f3a1415a4
2025-05-06 23:01:40 +00:00
dan
f67058367b Add test cases for the NOT NULL/IS NULL optimization in CHECK constraints fix.
FossilOrigin-Name: 6eb2939a6093c0796910645172d80c53055559dd57c012f1dc815d89fbf84447
2025-05-06 17:56:32 +00:00
drh
88ed1806a4 Fix an issue in Bloom filters on RHS subsqueries to IN operators.
See [forum:/forumpost/792a09cb3df9e69f|forum post 792a09cb3d] for
a description of the problem.  Also improve comments related
to [baa83b460c677c21] which was origin of the problem.

FossilOrigin-Name: cdef486e212fe4b26605065d9cff08f608cb80df48ee64e4be63637769bdfacc
2025-04-30 12:48:20 +00:00
drh
2ba946b341 Add the "--fuzzdb FILENAME" to testrunner.tcl as an alternative to setting
the FUZZDB environment variable (as that can be awkward to do on Windows).
Further improvements to the testrunner.tcl documentation.

FossilOrigin-Name: 6fb84156a262ff89d1a2d1df6fbfac4c1a43fb55b9d15205508662e2c9b0894f
2025-04-29 14:23:21 +00:00
drh
873fc5dff2 Update testrunner.tcl documentation. Fix typo in testrunner.tcl output.
FossilOrigin-Name: ba8800b4ba0a690c89d9fb96bb9a0d8789d04160ff9c47ea9afb2b403bec7f0b
2025-04-29 11:35:51 +00:00
drh
c171d7624e Improved --explain display of FUZZDB test plans in testrunner.tcl.
FossilOrigin-Name: 42bdd7262ec4f8163263e0535c2cc35b526754d77e1f3ccf5b73b0f44d470d9c
2025-04-29 10:41:16 +00:00
drh
ece7709f18 Do not run FUZZDB on either Windows-Memdebug or Windows-Win32Heap.
FossilOrigin-Name: 10d8401d59136dda7051af0da398b06a18031560f2734f4fa347d339765d2089
2025-04-29 10:29:35 +00:00
drh
8a68ab963e Make testrunner.tcl more restrictive about which configurations run
fuzzcheck-asan and fuzzcheck-ubsan.

FossilOrigin-Name: 785599394dde0fb36ae2e07d611f9523a05a0817dbd8c416582b3b682dbfa4ff
2025-04-29 01:37:31 +00:00
drh
246dc92354 Testrunner.tcl now runs fuzzcheck-asan and fuzzcheck-ubsan tests.
FossilOrigin-Name: 3d8f3a255843c063157265702b76d40c38c774d29d658eea2d77efac92ac8789
2025-04-28 19:15:46 +00:00
drh
d4cc3a42e2 If the FUZZDB environment variable is set when running testrunner.tcl and
that env-var points to a fuzzcheck database, then suppliment the fuzzcheck
tests with that extra database.

FossilOrigin-Name: c08530dd6a71cb547d164e2313657c917f280e7988211bf199c8776e78a4e2a6
2025-04-28 17:56:23 +00:00
drh
1365bcffbf Enhance testrunner.tcl so that it does not build testfixture unnecessarily -
if the pattern does not match any TCL test.

FossilOrigin-Name: 896d767f1cba64bda7b91b0daebd60ebe4457a58d762da443bf61cf5b39ad2d9
2025-04-28 16:28:00 +00:00
drh
7fec7c96c4 Fix testrunner.tcl so that it honors pattern matches in non-testfixture
tests, such as fuzzcheck and sessionfuzz.

FossilOrigin-Name: 81857474fe90f50b760c22d61a6ad477642dabe1052390cd1614dcec8adb1376
2025-04-28 16:17:17 +00:00
drh
738443c523 Remove a stray blank line from the test/testrunner.tcl script.
FossilOrigin-Name: 7d6005b0d17d86d72757f3578872e82fd12f61ac9160a0277e397df09f6338a9
2025-04-28 15:00:28 +00:00
drh
9133179e12 Merge all the latest trunk enhancements into the reuse-schema branch.
FossilOrigin-Name: b3a526a887fd0d45635c76dbd990f32e76933a9d729edeb1fb502085a3608541
2025-04-21 13:08:19 +00:00
drh
0243ca8245 Correctly handle the case of a multi-column UNIQUE constraint that contains
the ROWID as one of it columns, and then the columns of that UNIQUE are
used in a row-value IN operator as a WHERE clause constraint.  Reported by
[forum:/forumpost/b9647a113b465950|forum post b9647a113b].  Problem
introduced by [723f1be3d4a905a6], part of ticket [da78413751863].

FossilOrigin-Name: d22475b81c4e26ccc50f3b5626d43b32f7a2de34e5a764539554665bdda735d5
2025-04-15 21:59:38 +00:00
drh
483e1181c5 Improved estimate on the number of output rows in a recursive common table expression
that uses the UNION operator.  Follow-up to [f911f1c4977fbcae] and it's output row
estimate changes associated with DISTINCT queries.

FossilOrigin-Name: 92513f6bce7ecc778e78af3a77bc66ff65585fffa2e3138f8acb9e617121eeb0
2025-04-14 19:43:30 +00:00
drh
a863bafba7 Improved detection of run-time errors (ex: OOM errors) in speedtest1.
FossilOrigin-Name: 0e5e0e2f558a417d57c01a2d62cb2117d2adf6ddbc62e6a0208ae23f19b05347
2025-04-10 19:54:56 +00:00
drh
f95e964b6b Provide new command-line options --hard-heap-limit and --soft-heap-limit
for speedtest1.

FossilOrigin-Name: 578e9fedeaaacd152ae1988920e6c9a0c43f664e2f9461c0994ba427ae1688e7
2025-04-10 19:39:34 +00:00
drh
e4856e86cd Be sure that speedtest1 reports any errors that it encounters while
running the speed tests.

FossilOrigin-Name: 8c8b1a99bc888a5db637900aa3c8ef1b8c748c527580c825a25df1008afcf9e0
2025-04-10 19:03:42 +00:00
dan
2d1c71abeb Fix an obscure problem allowing the propagate-constants optimization to improperly substitute a column of a sub-query with NONE affinity.
FossilOrigin-Name: d82725dcaec7437f37fc15dfb492b51a4f9dbbbcaea04e387d9471b7d291cde2
2025-04-10 14:53:32 +00:00
drh
8a6f89c845 Remove unnecessary "www." prefixes on domain names in URLs.
FossilOrigin-Name: 20acd630b91609725794ce84f9eda01d5f3c898407f0948264830851d25ccaa6
2025-04-10 10:18:07 +00:00
82d05b7b54 The win32lock and win32longpath tests don't work on Cygwin
FossilOrigin-Name: 32ef3f26e7fb34dfdb23617a19bb9baa2e4c3dca564a88850b58a0fbe6446cf8
2025-04-04 13:23:03 +00:00
2d49219b1c Correct two tests in shell1.test which were broken by the addition of new output in [0f11087b8475].
FossilOrigin-Name: 909dd0a02a967baef46c3efdca42a0ab4e15003e34ce7e9af82fce5f17213d7b
2025-03-28 16:31:54 +00:00
d07045119d shell1.test: == => eq
FossilOrigin-Name: 99fdd19193056259d84768f46519328c300976b102f1b1e0b815720df01b28d0
2025-03-27 17:25:38 +00:00
1588d3de37 More ==/!= => eq/ne fixes
FossilOrigin-Name: 2aa6c4fa6c9c47c7a8548ac3493bfb9ed4e4dec1b6dc4f3599a0373086b3e917
2025-03-27 14:37:07 +00:00
87b90921b6 In Tcl, always use eq/ne for comparing strings, not ==/!=
FossilOrigin-Name: f96a5346e3e890adfdc94a682688c2c15893e50fbaf2a26e5ef39cda8b331ee4
2025-03-27 14:32:57 +00:00
eb2644024a Merge trunk. Some additional test-fixes for Cygwin
FossilOrigin-Name: b36adadfa202fb8951149561471c3e01085d31e1837c99806f308f234cd24a8e
2025-03-27 14:13:12 +00:00
22d502e33a Merge trunk into cygwin-fixes branch. Add .fossil-settings/binary-glob to squelch warnings about *.db files on Cygwin.
FossilOrigin-Name: a8328b921c5504eceacade417e16e713999eff63978caf3418fd79501590b1cb
2025-03-26 00:02:15 +00:00
drh
75484481c7 Fix the generate_series() enhancement from check-in [d50b784807333c54]
so that it works even if the number that "value" is being compared against
is a non-integer floating point number.  Bug reported by
[forum:/forumpost/0d5d63257e3ff4f6|forum post 0d5d63257].

FossilOrigin-Name: c113e31b818d16770bec1edc980f6833dfb27c4d74178e66a778fbb5671c3a13
2025-03-22 22:55:33 +00:00