jeffchen
138f51ac68
Remove unused per-index counters from integrity checking.
...
FossilOrigin-Name: d0b5bc53a9d828c425ea29bc418688aa7df20e8cc4b69b81acb0ac1a7c169b6a
2026-10-22 14:03:32 +00:00
jeffchen
fd8be0ca94
Avoid repeated setup when reusing a materialized CTE.
...
FossilOrigin-Name: 18bec552a0da979f32f7a5a024691ab2bbb09454c75a7e99a125a5bd7545584f
2026-10-22 14:03:19 +00:00
drh
bc766d966a
Merge branch-3.54 fixes into trunk
...
FossilOrigin-Name: fdf339d965aba5e35feaf3ef613e2e2ce0795338591f261998141a6d080bb0da
2026-10-22 11:41:16 +00:00
drh
03c3a3edd2
Make the session rebaser more robust the face of column count mismatches.
...
FossilOrigin-Name: 12285a3f4efdf41210fa3020127670b0d1fd8d740a5ac43db0c6641fec3e5142
2026-10-22 11:35:33 +00:00
drh
007df2b477
Add a rootpage number lower bounds check in the "recover" extension.
...
Test case in TH3.
FossilOrigin-Name: 4a1fd244b5ca93c6cfe1e0f8e1d087d5b99482081e4b760d09909959c258e506
2026-10-22 11:19:52 +00:00
drh
de805a8c12
Increased safety margin in sqlite3_preupdate_old(). Test case in TH3.
...
FossilOrigin-Name: 31b84157965fcd3309a1420db71e0beee4ccdd88a2f44e5f9029a05cb04ae9cf
2026-10-22 11:03:08 +00:00
drh
7f91834658
Extra safety margin added to sqlite3VdbeMemFromBtree(). Change
...
suggested by Martin Mirchev. Test cases in TH3.
FossilOrigin-Name: 952ae2c63e0a2007d8213132636e2e99bae113a9c7582b68b2e5a686b0777a99
2026-10-22 10:40:42 +00:00
drh
ac429ff804
Index lookup of an integer column using value -9223372036854775808.0
...
now works.
[bugs:/info/2026-10-21T17:54:28Z|Bug 2026-10-21T17:54:28Z]
FossilOrigin-Name: 03f699544e6b2040eda17e2f4b48813b10513fc05891a3dd4000867316413103
2026-10-21 23:49:46 +00:00
drh
99774ca002
Make the NOT INDEXED key phrase work for WITHOUT ROWID tables.
...
[bugs:/info/2026-10-21T17:47:47Z|Bug 2026-10-21T17:47:47Z]
FossilOrigin-Name: 9eafe6158d1042f27b867a90f0fb96abf639954efe7944aed6c8b5c9f4373dfa
2026-10-21 20:53:42 +00:00
drh
0168a3f32b
Mark the AND optimization as "not-a-real-0-or-1" so as not to confuse
...
ORDER BY and GROUP BY clauses.
[bugs:/info/2026-10-21T15:33:18Z|Bug 2026-10-21T15:33:18Z]
FossilOrigin-Name: 16cf625360a1448741dafa3d67263b5dda112648a05a0df6a766fae95b529f45
2026-10-21 17:36:54 +00:00
dan
4f6dc901fe
Do not synthesize position-lists for UNINDEXED fts5 columns in detail=none mode. Report [bugs:/info/2026-10-20T20:40:52Z | 2026-10-20T20:40:52Z].
...
FossilOrigin-Name: 64e37575ca1531ebea52402e6fa9ee1de399f1767f5baedc12ffde03a995b477
2026-10-21 17:23:01 +00:00
dan
4259cf5264
Avoid orphaning an fts5 %_content table when dropping or renaming an fts5 table that uses contentless_unindexed=1. Report [bugs:/info/2026-10-21T02:51:01Z | 2026-10-21T02:51:01Z].
...
FossilOrigin-Name: fa0247a431bd99a9442c61028dc85ad1ffd2c5ea5b76ab68c394eaeda9af9409
2026-10-21 16:56:58 +00:00
dan
0b73214725
Improve usage of fts5 doclist-indexes in tokendata=1 tables.
...
FossilOrigin-Name: 3e4c42ea20573a02fde30c25f0b11d0d0cace6f4a65849ca817d238d5315a8ee
2026-10-21 16:48:04 +00:00
drh
671911de56
New CLI-based test cases for foreign keys.
...
FossilOrigin-Name: f4f25cd2a8c13a1718a34be8fd36224fba7feab3fa8c44ba85a2aa59d3f1904f
2026-10-21 16:29:13 +00:00
dan
d08513bcbc
When querying an fts5 table in tokendata mode, avoid using the "has-doclist" flag from the previous leaf page when querying for a non-existent term larger than all terms on that page. Report [bugs:/info/2026-10-21T02:52:01Z | 2026-10-21T02:52:01Z].
...
FossilOrigin-Name: 3769f60be38ba67efce022d4cb72a1db89b36641b2f132698d4d85b0f6b30775
2026-10-21 16:05:34 +00:00
dan
0269dadc3d
Avoid returning extra rows when the RHS of a "rowid = " constraint on an fts5 table is not an integer value. Report [bugs:/info/2026-10-20T20:31:49Z | 2026-10-20T20:31:49Z].
...
FossilOrigin-Name: 5a09fc807377b4cfa37b06d69101530611df143bd64f3384db480797d8795fea
2026-10-21 15:25:33 +00:00
drh
f1196b59b4
Improve RTREE to be more robust against abuses of the "rowid" column.
...
[bugs:/info/2026-10-21T05:31:28Z|Bug 2026-10-21T05:31:28Z]
FossilOrigin-Name: 8d5a59d56e2ed1355033966c99455d4e4cad5aec13db536a938b4b2fccfba058
2026-10-21 15:15:32 +00:00
dan
dd8f6a7422
Allow the foreign key code to use child indexes even when there are affinity mismatches between child and parent columns.
...
FossilOrigin-Name: ee1424130e37c23c8b4db54252b6badef5bd548bfa8ffd3d88c8f70b4662e5af
2026-10-21 14:41:53 +00:00
dan
0fa90d6621
Allow composite FKs to use indexes with mismatched affinities as well.
...
FossilOrigin-Name: 2e0883964e8d14bd5337a3aaa838b72522ee7a54ea151db5e29cff1f9ee6981e
2026-10-21 14:37:51 +00:00
drh
1113952d2a
Allow the origin counter in FTS5 to grow beyond 32 bits.
...
[bugs:/info/2026-10-21T10:56:15Z|Bug 2026-10-21T10:56:15Z]
FossilOrigin-Name: a0fed3f26e969ae47834ab9f34deaee42c6b51da3151af836ca5b299ed79a5f3
2026-10-21 14:35:08 +00:00
drh
77207b3d94
Fix the fsdir() table-valued function to better cope with
...
unreasonable LEVEL constraints.
[bugs:/info/2026-10-21T10:49:41Z|Bug 2026-10-21T10:49:41Z]
FossilOrigin-Name: 3e8932ebf2cec334b4867e0192d22b6de8102eda48f9f6e168fe5d2d24a8db0c
2026-10-21 14:28:22 +00:00
drh
61a8c1579d
The IN pre-filter is now only added when the child key can actually use an
...
index lookup.
FossilOrigin-Name: a3d46e1f8f02f64c888d26038d83a065bcf56ec5df80d924e3b074152aab18dd
2026-10-21 12:57:50 +00:00
drh
e8eff0e979
An attempt to get the new foreign key code to use indexes on type mismatch
...
between parent and child.
FossilOrigin-Name: c0523245e2ba3339d8b21cf26e164d05ec252f3d882eadacd4c510a224ccbdba
2026-10-21 12:24:59 +00:00
dan
4242856e53
Ensure that all (parent_key = child_key) comparisons performed as part of foreign key processing are done using the affinity of the parent key. Report [bugs:/info/2026-10-20T02:56:10Z | 2026-10-20T02:56:10Z].
...
FossilOrigin-Name: feb6d3a3016d890fb1a8ca2a1752949b8adc0c06debb6ca305cacafc6b6edd10
2026-10-21 11:52:56 +00:00
drh
5b61b78f12
Cap the number of entires in a ZIP archive processed by the zipfile
...
extension at 65535.
[bugs:/info/2026-10-21T10:52:39Z|Bug 2026-10-21T10:52:39Z]
FossilOrigin-Name: decd49e6565bd5105e3b5cbe1067c8992582076a7c4e12cb6f3d089f38aba524
2026-10-21 11:51:52 +00:00
drh
23b355fb6e
If a reprepare fails in sqlite3_stmt_explain(), do not leave the prepared
...
statement in an invalid state.
[Bugs:/info/2026-10-21T09:18:32Z|Bug 2026-10-21T09:18:32Z].
Test cases in TH3.
FossilOrigin-Name: 0ffda38c5f7f506cd14c9aedc756f2fc025fe49f0822a4ecf28451a4d2b840e0
2026-10-21 11:25:55 +00:00
drh
b6b600ac29
Improvements to vtab handling of SAVEPOINT.
...
FossilOrigin-Name: 1d886c6abf1ed0be934d93cd7fe8d200b626a40b534e493ac15370819211bc72
2026-10-21 10:31:35 +00:00
drh
078f7c4c45
Test cases added
...
FossilOrigin-Name: 2ec6c0ff491454f25103f368a5885a6bcd0177fa1eb0bfb2060cd5a6f8c60a72
2026-10-21 10:27:51 +00:00
drh
049891534d
If a virtual table is created within a SAVEPOINT, it needs to be undo by
...
the corresponding ROLLBACK TO. This resolves an issue going back to
before version 3.7.8 circa 2011.
[bugs:/info/2026-10-20T20:37:14Z|Bug 2026-10-20T20:37:14Z]
FossilOrigin-Name: 33aeb419d594cd131124cd228dbbb4da246a531edea40009d95d6b2b376bd76b
2026-10-21 00:34:39 +00:00
drh
3e97799009
Change the sqlite3_serialize() interface to return a NULL pointer if
...
the database is file-based and an I/O error occurs while reading.
[bugs:/info/2026-10-18T10:04:32Z|Enhancement request 2026-10-18T10:04:32Z].
FossilOrigin-Name: aa36cfe5b0f944752ace7986b2bff5dcb597fc0d456da781ed5b55e47ecb3d3c
2026-10-20 20:17:15 +00:00
drh
99f724be20
Simplify the ".clone" command so that it just makes a copy of the main
...
database. Move the implementation into a separate dotCmdClone() function
and provide better help text explaining its history.
FossilOrigin-Name: 8b5c87a5f4dc6dccf2130d41df958ea59f0892836b574388539ee7d905cd014d
2026-10-20 19:30:24 +00:00
drh
255534dc97
Fix the shellB.test module so that it does not try to run dump.sql
...
without virtual tables available.
FossilOrigin-Name: 3f8b4c7760148eabbf721ff9b8321793972d372fa3156dc8c60ed680f5467d0c
2026-10-20 19:21:43 +00:00
drh
bd27afc005
Be sure to use the correct collating sequence when doing a balanced merge
...
of a four-way or larger compound select. Error goes back to version
3.38.0 (2021).
[bugs:/info/2026-10-18T23:46:25Z|Bug 2026-10-18T23:46:25Z]
FossilOrigin-Name: 7ee2a48bb3765bfe8cef4ae400eacf77c660f9d5dbaa289ab5f17474fca98cae
2026-10-20 18:25:01 +00:00
drh
03c38c992a
Merge branch-3.54 fixes into trunk
...
FossilOrigin-Name: 8efb0acad85f6220f576c71530256d62f92dfba5673cdc5e0371f480753f1034
2026-10-20 17:53:47 +00:00
drh
d3d85df39e
Enhance the readfile() function in the fileio.c extension so that it
...
is able to read from pipes.
[bugs:/info/2026-10-20T14:02:37Z|Enhancement request 2026-10-20T14:02:37Z]
FossilOrigin-Name: 49d185f2ac2d01c6b1bd9c20d13628eff3803529faaf969bace3981f6acc7a28
2026-10-20 17:46:19 +00:00
drh
f95dc99bc6
Remove a debugging ".mode -v" in the dump.sql test script that was
...
accidentally left in the previous check-in.
FossilOrigin-Name: 632943da2d3e58696ec0a7548e18a99a57a3dd51f700f24144377a6d8fdb8c06
2026-10-20 17:42:52 +00:00
dan
5a1da0ae1b
When a b-tree cell is deleted, zero the cursor's cell-info cache as the cell it describes no longer exists, even if the cursor position is being preserved. Report [bugs:/info/2026-10-18T16:11:58Z | 2026-10-18T16:11:58Z].
...
FossilOrigin-Name: 07ed30558ee7da460ed0ca2b36cd555aeb5caa91f0971b2cf83adc08524ca9b7
2026-10-20 17:27:17 +00:00
drh
60f12a1ecc
Fix the --preserve-rowids option on the ".dump" command of the CLI
...
so that it works for tables that have a non-IPK column named "rowid".
[bugs:/info/2026-10-20T03:22:48Z|Bug 2026-10-20T03:22:48Z]
FossilOrigin-Name: ecd172bb44be40841336cf2ec42f2505c4f98a96eace3e4862e038a3c147770d
2026-10-20 17:24:29 +00:00
drh
2f0c895a4e
Fix the sqlite3_carray_bind() interface so that it works with
...
SQLITE_TRANSIENT and an array length of zero.
[bugs:/info/2026-10-20T13:53:58Z|Enhancement request 2026-10-20T13:53:58Z]
FossilOrigin-Name: 47228787b1459a35a12a499be90e249c555658bf4e393122041f474e8986b17d
2026-10-20 17:05:30 +00:00
drh
5eb5ab72a2
Provide auto-init for the sqlite3_cancel_auto_extension().
...
[bugs:/info/2026-10-20T13:51:06Z|Enhancement request 2026-10-20T13:51:06Z].
FossilOrigin-Name: 08962c885f007c379a16167b280f022cf3c9045ab40a4e7e6ad721c966c2f0cc
2026-10-20 16:40:12 +00:00
dan
12b80e71b6
When a real value is specified as a default for a text column, avoid various inconsistencies by ensuring that it is always converted to an IEEE double and then back to text before use, as is already done for integer values. Report [bugs:/info/2026-10-05T16:22:00Z | 2026-10-05T16:22:00Z].
...
FossilOrigin-Name: d140ada6488a27342c6baf0d8e44adf38f91b37a657c2bcc0efa9ecf437b414c
2026-10-20 16:11:44 +00:00
drh
e3a9db8c15
Raise an error if a REGEXP pattern ends with "\\".
...
[bugs:/info/2026-10-20T13:44:52Z|Bug 2026-10-20T13:44:52Z]
FossilOrigin-Name: 480d6e1a39a2057685260cf8386a3dbef4f391c6d1766a6cded5f8cc4d1a0ec4
2026-10-20 15:42:45 +00:00
dan
34a05a3723
Fix handling of GROUP BY and HAVING clauses attached to the rightmost SELECT of a compound SELECT with one or more COLLATE clauses attached to ORDER BY expressions. Report [bugs:/info/2026-10-16T22:06:45Z | 2026-10-16T22:06:45Z].
...
FossilOrigin-Name: bd873f7ca9fc0d36a884d3929517d9a19c181c811dae65d64815a2006005b788
2026-10-20 15:19:35 +00:00
drh
7697c7d2b9
Fix QRF so that it correctly handles zero-length output appended to
...
the sqlite3_qrf_spec.pzOutput result.
[bugs:/info/2026-10-20T13:22:11Z|/info/2026-10-20T13:22:11Z]
FossilOrigin-Name: ee344fc063ec0de8f1cd4c61c88eca33c2587c52d868202db3c514f0bc2fae52
2026-10-20 14:36:09 +00:00
dan
4f5062f0ba
Correctly handle aggregate functions that aggregate over the rows of a window function query, even if they are nested within sub-selects. Report [bugs:/info/2026-10-16T08:07:09Z | 2026-10-16T08:07:09Z].
...
FossilOrigin-Name: 7522512ff96d869c46596e7d514b65f210530db09e6359c2f37911d45f34979d
2026-10-20 14:07:59 +00:00
drh
4855cb2a31
Fix the CLI to correctly handle a ".exit" immediately following
...
a ".output memory". [bugs:/info/2026-10-20T13:13:50Z|Bug 2026-10-20T13:13:50Z]
FossilOrigin-Name: 2fdd752dc92692e08c805eb10bf78d97e93c8436433c8175fbff310513f340d7
2026-10-20 13:45:54 +00:00
drh
2f641dbdeb
Test case changes to handle non-standard configurations.
...
FossilOrigin-Name: 185ffd27064bab83d3e4c39353ab5bea15e99155f8cc851c03abd49641fbfdb5
2026-10-20 13:10:11 +00:00
drh
a6f89b9d0b
Add an extra sqlite3MemoryBarrier() call in sqlite3_initialize() to avoid
...
a race condition that only happens on non-X64 CPUs.
[bugs:/info/2026-10-20T07:33:27Z|Bug 2026-10-20T07:33:27Z]
FossilOrigin-Name: 37b83ad2f5245217a4a4626916c3974acb3491fc5d45ed082ac0386e9d84b4ce
2026-10-20 12:42:26 +00:00
drh
3863fd3b40
Do not allow a simplified constant expression (example: "123 ISNULL" → "1")
...
to be used as the ordinal column number in an ORDER BY or GROUP BY clause.
[bugs:/info/2026-10-16T12:58:09Z|Bug 2026-10-16T12:58:09Z]
FossilOrigin-Name: c40e620b04aaa3c90501124db27711b1d4e8ae830f75828c7cccf84f7df42660
2026-10-20 12:07:04 +00:00
dan
d89373dc10
Fix a problem causing queries on secure-delete fts5 databases to occasionally return extra, non-matching, rows. Report [bugs:/info/2026-10-18T20:40:47Z | 2026-10-18T20:40:47Z].
...
FossilOrigin-Name: 10b8f4166da26908aef9182824b0c967af7d861ff6c83daed7cd50321ee563b3
2026-10-20 11:13:15 +00:00