drh
ce25007db8
Detect when a UNIQUE or PRIMARY KEY on a WITHOUT ROWID table would need
...
to use more than SQLITE_LIMIT_COLUMN columns and raise an error.
Also include some unrelated compiler warning fixes.
FossilOrigin-Name: d7729dbbf231d57cbcaaa5004d0a9c4957f112dd6520052995b232aa521c0ca3
2025-02-21 17:03:22 +00:00
stephan
eb0d2e7bc6
Increase default CLI shell .prompt buffer length to 128 bytes, based on discussion in [forum:362f185a6aa|forum post 362f185a6aa].
...
FossilOrigin-Name: 628407f03d4bfb7499f0e6e2197089edf859380a3c4e6fecc517390327718141
2025-02-19 13:05:33 +00:00
stephan
2e132a4c04
Slight tweak to the CLI shell help output to help convey that it can accept multiple SQL arguments, as suggested in [forum:20e617feee|forum post 20e617feee].
...
FossilOrigin-Name: 82fc67070f9aff0065c07cbeed40f4321e03617bdc3e517adc58a2d96e6e3e49
2025-02-19 13:02:23 +00:00
drh
7bfa4452a3
Additional changes making it easier to prove that integer overflow does not
...
occur. No problems found.
FossilOrigin-Name: e846743a875430a5c51d41f00ac9532214f97d9925e6261113b63580f92369fc
2025-02-17 18:09:24 +00:00
drh
ef86b942b9
Code changes that make it easier to prove that no 32-bit integer overflows
...
happen during memory allocation. No problems fixed; this change is just
to make future maintenance easier.
FossilOrigin-Name: 215650a5a1d55bdbca9c92524804a1a54456a17f42a17e53747b21a6507506f5
2025-02-17 17:33:14 +00:00
drh
56d2fd008b
Harden the SQLITE_DBCONFIG_LOOKASIDE interface against misuse, such as
...
described in [forum:/forumpost/48f365daec|forum post 48f365daec]. Enhancements
to the SQLITE_DBCONFIG_LOOKASIDE documentation. Test cases in TH3.
FossilOrigin-Name: 1ec4c308c76c69fba031184254fc3340f07607cfbf8342b13713ab445563d377
2025-02-17 14:16:49 +00:00
drh
59c64e086a
Fix a typo (a missing ")") in a comment that is used to generate
...
documentation. No changes to code.
FossilOrigin-Name: ea21685658df8246551650666ff59945ac27271b10a675104cbadaf57d48595f
2025-02-17 10:58:23 +00:00
drh
f4fc2ee203
Add a typecast to avoid 32-bit integer overflow in the concat_ws()
...
function with an enormous separator values and many arguments.
FossilOrigin-Name: 498e3f1cf57f164fbd8380e92bf91b9f26d6aa05d092fcd135d754abf1e5b1b5
2025-02-16 10:57:25 +00:00
dan
5087eacb18
Ensure the counts of "deferred FK violations" and "deferred immediate FK violations" are kept separate when "PRAGMA defer_foreign_keys" is used.
...
FossilOrigin-Name: c5190b0fd9bd76653fb7bb08e931699e42c88cef8a00352360d091948cda93a2
2025-02-13 14:47:25 +00:00
drh
cd56ad4ccb
Omit the src/pragma.h file. It is generated by the tool/mkpragmatab.tcl script.
...
The makefiles now know how to build this file for themselves.
FossilOrigin-Name: 9709ed1cdfa17f690ffd4ec8cfc54efefec8352143c1d8b701f09299bd7eef6e
2025-02-11 19:54:13 +00:00
drh
374c6a451e
Omit the src/ctime.c source file, since it is automatically generated by a TCL
...
script. Instead, add rules to the various makefiles to generate ctime.c on
demand.
FossilOrigin-Name: 958bb5de7c484cc503c38d38d51a30f679244fd364df5cbfc1992e36995b2ff9
2025-02-11 19:40:19 +00:00
drh
0a4af54a7e
Remove a pointless line of code.
...
FossilOrigin-Name: 57b2b812c8c5524f315e20cee0e6a12a3b1635aeb42925bf891532a7029d0eb0
2025-02-10 19:48:13 +00:00
drh
a0d35d44e4
Convert some expensive NEVER() and ASSERT() macros into assert()s.
...
FossilOrigin-Name: 4aad891802d9d87f1ff3cbbf4bc70fa242c6782088189a2bd5d6f8863f552d29
2025-02-10 11:16:37 +00:00
drh
93df8109fc
Small performance increase in jsonTranslateBlobToText().
...
FossilOrigin-Name: 3b1dcac2eeaf5f97450919f2a6eed74a4d54fb2b812bdb4a580f79d075e99dfe
2025-02-10 00:20:50 +00:00
drh
3efac4aa78
Performance optimization to the substr() SQL function.
...
FossilOrigin-Name: ce228ce3d0132ad758b5b7464fcf22ae5976df3c02ec948280cc76290c79ed0b
2025-02-09 20:23:29 +00:00
drh
3bdebaeabb
Performance and size optimization for the sqlite3ColumnIndex() routine.
...
FossilOrigin-Name: a93e3fe0ee8f98a7ec0dfb2e1abf432cc9d5f9d3ad345b5db261475215d43df9
2025-02-09 19:49:46 +00:00
drh
66172ceb89
Put a 16-byte hash table for column names on each Table object, to speed
...
up column name lookups.
FossilOrigin-Name: 11eb8f99e5c4974cb6ba39e5bbc99f6b88b9e01006b70d5fea85c2a6d4f7044f
2025-02-08 16:16:08 +00:00
drh
9d90a3af2f
Use the sqlite3ColumnIndex() routine to look up a column in a table, rather
...
than using a custom loop. Performance improvement, size reduction, and
complexity decrease.
FossilOrigin-Name: 351dbbc2bf0b23efdc625ddaa5dc2239cf2990addf071a04bd41612b341de8c8
2025-02-08 14:15:42 +00:00
drh
03c65171b8
Fix GCC-isms and compiler warnings introduced by recent check-ins
...
[c56092507c967230] and [6e57848fe1e0e2b5].
FossilOrigin-Name: 91102c04375f83cffcd0f3204870e476636f651710e9e6fb773cf74085ef7636
2025-02-08 13:34:19 +00:00
drh
f62d053b49
Improvements to the hash table used to store symbols in the schema, so that
...
it works better (requires fewer calls to sqlite3StrICmp()) for large schemas,
and uses less code space.
FossilOrigin-Name: 0318b68c845c84eded757c67f820e1783551574ac9e5670be640c4bfe22a934b
2025-02-08 11:15:41 +00:00
drh
84b0f221f4
Fix comments on the Parse.nMaxArgs field so that they are correct. Add
...
assert()s to ensure they are correct. Other Parse changes to reduce the
amount of memset() needed to initialize it.
FossilOrigin-Name: c56092507c96723030589ddd9121bc993d615a7acd453305fc3b1dbb9e30554c
2025-02-07 19:09:20 +00:00
drh
7fd936e5ed
Further reduction in the amount of memset() needed to initialize the Parse
...
object.
FossilOrigin-Name: 45e462c0060e51c3375a226d636148e3415ee6020e544ecc84861c7aef4ecf7b
2025-02-07 15:49:21 +00:00
drh
ede1690cce
Reduce the amount of memset() needed to initialize the Parse object.
...
FossilOrigin-Name: 284538d8486ef3e9bee1ab980043b53c144743c31b984be13a5cc137e7cbec31
2025-02-07 13:37:15 +00:00
drh
65552a7ae1
Fix a harmless typo in a comment.
...
FossilOrigin-Name: ed82272904deb37640286448e03153316f828c629547a615a504af1d7ec5a278
2025-02-06 17:10:38 +00:00
drh
b6859b6f2c
Attempted improvements to the SQLITE_DBCONFIG_... documentation.
...
FossilOrigin-Name: baac853871ad307b67b4d624b9ee47fc1313f1aa62c9f8072fb49e97aa33db94
2025-02-05 12:02:43 +00:00
drh
802b042f6e
Detect and report signed integer overflow in the sumInverse() routine,
...
used by window functions.
FossilOrigin-Name: 317e9a470fba2a4b717b9cb66488b8fccb44810a80f3a7deaf1ea81906e2b8d2
2025-02-04 02:38:23 +00:00
drh
0d9f2a15f2
The Parse.addrExplain field is never even if SQLITE_OMIT_EXPLAIN is defined.
...
FossilOrigin-Name: 5d81a984c6aabb9fa9180efde8ca942b40f1ec18ff5a89f2fbb1252734f051d3
2025-02-03 21:04:21 +00:00
drh
4b99ec0b8c
Fix a comment typo - in a comment used to generate documentation.
...
FossilOrigin-Name: b8de75eeded79a8312218d7a543e7c7d11181c9f4004e875495608d11a81ff38
2025-02-01 23:34:33 +00:00
drh
454a426e31
Remove an ALWAYS() added by [2567298f4b0fdfeb] because dbsqlfuzz found a way
...
to reach it. The test case was added to TH3.
FossilOrigin-Name: d08a7aa8987458a91fcb861d58289e622ba8722936c7874a284f9f2fd782e269
2025-02-01 23:28:49 +00:00
drh
de50617bcb
Fix an issue with sqlite3_normalized_sql() caused by changes needed to
...
support SQLITE_DBCONFIG_ENABLE_COMMENT.
FossilOrigin-Name: 79d287a39443f2d098fcc24199627555a656b34aa5bf5d484f91cb513d83e143
2025-02-01 20:53:17 +00:00
drh
276d213b2a
Tweaks to [4b4f33d791fe4318] to make it easier to test.
...
FossilOrigin-Name: 2567298f4b0fdfeb42aa6bba7e0bec3bc8d0b89bf644a79b41893dd6a6c5774c
2025-01-31 20:18:34 +00:00
dan
8fbf400bb0
Remove an assert() that is not true if a trace-callback is deregistered while there are active statements.
...
FossilOrigin-Name: 0ecfc4d0ebdb272a69f8f98ddb069c7e0735fb899804027eb16f241d83b3d046
2025-01-31 18:33:37 +00:00
dan
f6ca35d88c
Fix a problem with LIKE and GLOB processing in utf-16be databases in cases where the utf-8 encoding of a character ends with the byte 0xBF.
...
FossilOrigin-Name: 4b4f33d791fe4318c4597bee7d2f9e486ed223e731982af470f5cc0dbdc600fc
2025-01-31 14:52:36 +00:00
drh
a033790303
If any errors occur while processing sqlite_dbpage changes, cancel
...
pending truncate operations.
FossilOrigin-Name: 6138e0dc4e0e4e19cb048fe0cd969156151fdc427eee21188d2a822642aad043
2025-01-31 14:52:05 +00:00
drh
824a5bfcf0
Improvements to the SQLITE_DBCONFIG option documentation.
...
FossilOrigin-Name: 59f0ba10062a6ccfd56061a16af3436b9e1b9d23378bff3302bcf33bb3137cb9
2025-01-31 12:09:36 +00:00
drh
e16b345243
Add the SQLITE_DBCONFIG_ENABLE_COMMENTS setting (default on) to enable or
...
disable the ability to include comments in SQL input text.
FossilOrigin-Name: 393749a2e22d5c8eba36e2106a35909420aa6316652d1ab4f18ef699247b6fba
2025-01-31 01:34:19 +00:00
drh
0911f86abf
Merge all the latest trunk changes into the extra-security branch.
...
FossilOrigin-Name: 86ba57561a8d8c14e401c06b2345a9417053aa3a5f0c84e52460f23f5e6aa8d0
2025-01-31 00:54:59 +00:00
drh
49906e8e4b
The reuse-subroutine optimization [c9a3498113074bbc] might have generated
...
byte-code that loops forever. This check-in fixes the problem.
FossilOrigin-Name: 0cc4ed8c6e53aca1f5e94c132bedbc7f561c04a77f1a30b965ffe7560634bfeb
2025-01-30 21:12:58 +00:00
drh
8bffd498ea
Remove an unused parameter from an internal-use subroutine in the TCL interface.
...
FossilOrigin-Name: a700692b39e24f5ca9ea6f879d413e20c2ad2b85f62c867407dafe111f13d931
2025-01-30 16:07:51 +00:00
drh
000e39e9a8
Improvements to the TCL interface for Tcl9 as suggested by Jan Nijtmans.
...
FossilOrigin-Name: d76c5db866de2732b68401a4c3e39acddc7a99bed965160c1796477c062b478a
2025-01-30 16:00:28 +00:00
drh
36279c256b
Enhance the if() and iif() SQL functions so that they support any
...
number of arguments greater than or equal to two.
Suggested by [forum:/forumpost/40f7867f75f80|forum post 40f7867f75f80].
FossilOrigin-Name: fb76d184ee5afc41009c4023bb68b3ddd42c9235a79ec9695c26f5bbe9a1aa25
2025-01-28 20:32:48 +00:00
dan
9dcf3d08c9
Fix sessions module handling of tables with generated columns.
...
FossilOrigin-Name: 437fb316389bc3c24c5cdb4d01edfc81e2c2e9f2b399fc2a95b05d279361d8ec
2025-01-28 19:03:37 +00:00
drh
8b62a82ae3
Simplifh the IdList object to remove unnecessary fields. Performance
...
increases by about 0.8%.
FossilOrigin-Name: a4625bb995dd5582d1f3cf0c2e54eb3f01f1cc1405811dda86ebd38b2b858994
2025-01-28 12:50:17 +00:00
drh
d8c37bbc54
Remove an ALWAYS() in the star-query heuristic that is sometimes false if you
...
have a corrupt database. dbsqlfuzz c37ba7728d79859b79c8341b59297e88fba017d3.
Test case in TH3.
FossilOrigin-Name: 6b9a339628eb8bfb6dfbee02000a6ac91cc8a9ae16bd990e62c4142b9f912c36
2025-01-28 00:48:01 +00:00
drh
44980e8169
Use hashing to accelerate column matching on INSERT statements. Code is
...
smaller and about 1.8% faster overall according to test/speedtest.tcl.
FossilOrigin-Name: 8be956383e0344fb613ec2e56fce7b518f439ae34bf9ddb424de2bd9b31c9889
2025-01-27 21:18:13 +00:00
drh
7c727bb61b
Avoid splitting a hyperlink across lines in the documentation comment for
...
sqlite3_serialize().
FossilOrigin-Name: 74b770bd445d98ff883000ab2e31603d729e415e4e4f640646eef30825634f48
2025-01-27 14:12:14 +00:00
drh
2228567ad3
Further comment improvements in the star-query heuristic. Add an ALWAYS()
...
on an unreachable branch to achieve MC/DC.
FossilOrigin-Name: 5e18ce68fbc5e73e6694936f3ba71f5b5e3758cf380951805ca6ea6a3f0943aa
2025-01-26 20:09:57 +00:00
drh
fe54b7a1f4
Small size and complexity reduction on the star-query heuristic. Improved
...
comments for the star-query heuristic.
FossilOrigin-Name: a7ecb2f4b7eee78b88f1b2e026dffed2007ca4ffeb152632624ab2582839b250
2025-01-26 17:29:33 +00:00
drh
fb9e8e48fd
Revise the strategy used by the star-query heuristic: Instead of decreasing
...
the cost of all fact-table WhereLoops, increase the run-cost of WhereLoops that
are SCANs of dimension tables.
FossilOrigin-Name: 1bc09c9e8bd77ac41ecbe510c7e003757fc11d0f586da6cdf3584315aa9d6407
2025-01-25 23:04:05 +00:00
drh
0186ee1cd7
Improvments to debug output on the star-query heuristic.
...
FossilOrigin-Name: b3ebeb0682a2c837987acf4ed92f06cf91aea235830c5a0f9dd1ce64afe16e84
2025-01-25 14:30:36 +00:00