dan
59e1ab5576
Fix an assert() that could fail when reading a blob or text value larger than 1GiB from the database (requires a non-default build configuration). This is an assert() fix only, production builds were functioning correctly.
...
FossilOrigin-Name: 3e5ec5731f0c8c5f7da357c63d315aae5a2aca5c1b3567bc8c9386ccc2a798cf
2025-10-11 16:23:22 +00:00
drh
8c1670642d
Makefile updates to suppose carray() and percentile(). Add Carray to
...
the CLI and fuzzcheck to support debugging.
FossilOrigin-Name: fe9cf68b513d1e8cfcde90f1982a7f4123f54e3ebb004d961a99bdf6bec03a32
2025-10-10 14:22:05 +00:00
drh
f9d511319b
Fix the carrayfault.test script so that it works in configurations that
...
do not support virtual tables.
FossilOrigin-Name: 767a667b91caff2e789179231f13a0d260c9837020c0ce1553b86e88cf9aa352
2025-10-10 13:43:53 +00:00
drh
97fa2fe414
Fix carrayfault.test so that it works with the new built-in CARRAY.
...
FossilOrigin-Name: 22f694682107036e68b67e48123d606aeff8cd8b7fedc8ab8ed9cc1a9cccd73f
2025-10-09 19:23:01 +00:00
drh
01f5e6e757
Add ENABLE compile-time options to enable carray() and median(). Hence
...
there is no new code and no increase in library size without the ENABLE
macros.
FossilOrigin-Name: 7dec290b413ca1bc67694743d8b771e1634fd85251f1a23d60aaf36c63f0f366
2025-10-08 18:11:37 +00:00
drh
ba5cce9f08
This is how the percentile() family of functions might be integrated into
...
the amalgamation, should we elect to do such a thing.
FossilOrigin-Name: c2cfc9c92e35105e26a4c0887b0401ace15a874fd18046135de4b375ba968795
2025-10-08 16:29:14 +00:00
drh
cdaff852bf
Were we to choose to integrate the carray() table-valued function into the
...
amalgamation, that integration might look something like this.
FossilOrigin-Name: 2b43d5d7dcc5aee14a050c824a5e09b6a38a9c78ddcc25a994eba5d4c5ad9ba2
2025-10-08 15:32:55 +00:00
dan
6147a0f6a1
Add test cases for the carray module.
...
FossilOrigin-Name: dcfc0164a95eddb5e924c606850fe2015e8f2f516d36b380cbb79d6bdfe034fc
2025-10-07 21:02:37 +00:00
drh
308831d1c7
Improve the invariant checker module so that so that it added "+" before
...
"column ISNULL" in queries where the base query contains a GROUP BY, to
prevent the ISNULL term from being pushed down into the subquery, since
that can cause ambiguities if column is UNIQUE.
FossilOrigin-Name: b4ff920fbeef9a8590219596d73c09976da3da53c08a685be56f6b2cd2cdc70c
2025-10-07 18:06:05 +00:00
dan
9b6bc61dbd
Fix some integer overflow warnings in the base64 and base85 extensions.
...
FossilOrigin-Name: 06b4bd2aba22c57f5a5fed606c3bee225dee6fdc13bb16cc58194040ef0d7d85
2025-10-07 15:14:03 +00:00
dan
75ef68e385
Avoid using randomblob() in walckptnoop.test, as it produces different results for different test permutations.
...
FossilOrigin-Name: 94ceb0f0cfef1da89ea2a7420f508024897d9b7c19ef9be9af88d3e6f48c297c
2025-10-06 17:20:26 +00:00
drh
87f53152ed
Fix typo in the previous check-in that prevented the script from running.
...
FossilOrigin-Name: 797664700701effefbf4d87a791febae3bb68544bac23470351a11bcb3a87651
2025-10-06 16:56:12 +00:00
drh
ad7118fa68
Update testrunner.tcl so that the new option is --cases rather than singular
...
--case, and so that it is a glob pattern.
FossilOrigin-Name: 9488b4f00c9278de8c03f4a3cbd4f54e48e71c1eff45de4454f8bd49c080a930
2025-10-06 16:50:37 +00:00
drh
0ab87fc9a7
Fix typo in the "testprefix" for walckptnoop.test
...
FossilOrigin-Name: ff205f29934417e8150b5243245fb70389717b219e35bd8d60791a8485b69b33
2025-10-06 16:23:31 +00:00
drh
0611aeeed4
New testrunner.tcl option "--case DISPLAYLNAME" only runs the single case
...
(and its build dependencies) that exactly matches DISPLAYNAME.
FossilOrigin-Name: 8ea2e097b731514c284f255f12b08e15f63c7f49641a698e61ee7e47cc9d3c45
2025-10-06 15:53:52 +00:00
drh
566348f68b
Fix testrunner.tcl so that --help output goes to stdout, not stderr.
...
FossilOrigin-Name: 441a759c225d4e710a693339402624e7ba52852c08aa64439ed4568c193ad529
2025-10-06 14:30:22 +00:00
drh
9abd7edaa7
Merge recent trunk fixes and enhancements into the alter-table-constraints branch.
...
FossilOrigin-Name: 26f8a700785edf64e2540b37c748e9f201870865ba70374f8681cdfdd048e68f
2025-10-02 15:30:26 +00:00
dan
cbc3cd47f0
Fix a buffer overrun in the zipfile extension that could occur while processing zip archives with extremely long file-names and comment fields.
...
FossilOrigin-Name: c284fda848038a61972fd1df5796f608a24ead109170aafe562a5d5787c46488
2025-10-02 11:16:22 +00:00
dan
d802904c8a
Fix some problems with DROP CONSTRAINT and DROP NOT NULL on generated columns.
...
FossilOrigin-Name: 66c47e18e6e1b69df4c2ceb63ff20423bbc1d5819934d77b140cf321fa14eac5
2025-10-01 17:27:23 +00:00
dan
c592b7e01d
Fix handling of FK constraints that immediately follow named table constraints in DROP CONSTRAINT.
...
FossilOrigin-Name: 1c6f09f9f95ba76efa4f11f1c05d405d799b43f3570b23791472c3e165971bbc
2025-09-30 19:20:53 +00:00
dan
1f6d80c1e2
Fix some DROP CONSTRAINT and DROP NOT NULL cases involving SQL comments or multiple table constraints without separating commas.
...
FossilOrigin-Name: b0b02e58ac60e4371981938c904ccf831b2367e3fd7d22e0ec2b4782e4c6805b
2025-09-30 17:13:12 +00:00
drh
c8e6f627b8
Fix the new generate_series() to correctly deal with an explicit 0 as the step.
...
FossilOrigin-Name: b059413c440d1b831c9a462f7165a350001ba7a8cc77ca2a0a8f2bb73c830aba
2025-09-30 17:12:39 +00:00
dan
d05bf5aedf
Fix another potential buffer overread in the zipfile extension.
...
FossilOrigin-Name: 0819fe670f9ceec79f84eb09c234dc29f6581332f86a53d6a0547697404efff1
2025-09-30 11:17:40 +00:00
drh
8f6b797a1b
Change the name to SQLITE_DBSTATUS_TEMPBUF_SPILL.
...
FossilOrigin-Name: 4a60a9c63534f5d2f16af2c3c6581abe7ecf7adfdb39f17e557e73997ae03396
2025-09-29 19:57:43 +00:00
dan
3eccaa7915
Fix a buffer overread in the zipfile extension code.
...
FossilOrigin-Name: 70c2c99b6f12a3467c23b44adcaf2d7d780ba8317b72de2f6730b1d892cf0c85
2025-09-29 18:55:05 +00:00
drh
c49ff175ef
Merge the latest trunk enhancements into the dbstatus-spill branch
...
FossilOrigin-Name: cb604efdb40da95a759e2eeb9d73608859a94acde9d9782ca82757d3a1c15303
2025-09-29 18:48:00 +00:00
dan
d7330b571d
Add further tests for the new ALTER TABLE commands on this branch.
...
FossilOrigin-Name: 17a6f4e69e54a5dc233e33501f16f0f69f77fff071142cefc309b5407f57f721
2025-09-29 16:49:55 +00:00
drh
b7f5885b3e
Back out check-in [9abaa0ac2b304934] as the code removed there is necessary
...
after all.
FossilOrigin-Name: 27ae98629406bbaee2857f75c069b2ccd4757b247f0742e51b9e619e96b6dc45
2025-09-28 23:10:54 +00:00
drh
1bf80f2dce
Minor bug fixes. Many new test cases.
...
FossilOrigin-Name: 86dcc68d1816d970d8d5fb158696c3fe6c5ddcac2c255823110d656372503885
2025-09-28 17:24:42 +00:00
dan
fc66c6380f
Add test cases for ALTER TABLE and attached databases.
...
FossilOrigin-Name: 8f2e066e9a0a34fe7a41b153c0fb54b621128b2195141cc454a44180c969b4a9
2025-09-27 19:17:08 +00:00
dan
eceff127ea
Add OOM injection tests for new commands on this branch.
...
FossilOrigin-Name: 34b47c9b1be8a6ead917c6e9a85f8a295b14640cde177d8f1384b15f8bc692bb
2025-09-27 18:25:27 +00:00
dan
d47220c190
Add tests for ALTER TABLE authorization callbacks and other things.
...
FossilOrigin-Name: 55cad8d15040bc01300bfe5efcc7225dd9695c2972c0f9b4bbd311ed57188e1f
2025-09-27 18:08:19 +00:00
dan
32c49bd6e6
Fix authorization callbacks for the new commands on this branch.
...
FossilOrigin-Name: 0165e2afa8b640c9d7a31414f06144e089844dc13691f06f363a50d14fec62bc
2025-09-27 16:13:56 +00:00
drh
54f296389c
Rework the bounds calculations on generate_series() in an attempt to
...
avoid signed integer overflow when the bounds are ridiculous values.
FossilOrigin-Name: 3d9148c7d7379a34a0c2a33a1eb2562234868bc0b14c3d16990b33e52fd4ebc5
2025-09-27 15:03:11 +00:00
dan
ba1ee803ee
Add experimental implementations of ALTER TABLE commands to add and drop CHECK and NOT NULL constraints.
...
FossilOrigin-Name: d939b25d76fe70a3255cfe38097d4489323028cd05e5512a98dce06b48eee445
2025-09-27 14:59:21 +00:00
drh
b62c26d999
Limit the complexity of a REGEXP pattern using SQLITE_LIMIT_LIKE_PATTERN_LENGTH
...
FossilOrigin-Name: 869c968569b09d05a5b7d587d8fddb3b4611daf7467dc157701e5dc6c9608606
2025-09-26 15:38:52 +00:00
drh
80d74f0934
In the regexp extension, limit the maximum value of integers in the
...
"{p,q}" syntax, as performance of the NFA used to do pattern matching
is linear in the maximum such integer. The limit is SQLITE_MAX_REGEXP_REPEAT
which defaults to 999. This helps to prevent DoS attacks in systems that
make use of the regexp extension.
FossilOrigin-Name: 911c745f88c0ee8569e67bbcbbab034264f8c981b505aadac3ce7289486a1a68
2025-09-26 13:14:20 +00:00
dan
6553a5d6a6
Fix some integer overflow problems when handling corrupt hexdb dumps in the shell tool. [forum:/forumpost/82b513b116 | Forum post 82b513b116].
...
FossilOrigin-Name: 730323f95d126162fd2867dbee1e1f1fc1d6e05b8a905a6767c4ab1cb43dacff
2025-09-26 11:45:13 +00:00
dan
51e3a140c9
Include writes to temp files by sort operations in the SQLITE_DBSTATUS_SPILL values.
...
FossilOrigin-Name: 4c1118ba40172af61d9304dec7a9c7344566e6a5963a317880ad232bebb40176
2025-09-25 19:32:29 +00:00
stephan
a4476ea1fa
Overhaul the wasm build to (A) support more coexisting variants, e.g. 32/64-bit of both vanilla and esm, and (B) build each variant to its own subdir so that they can build in parallel. It can, with make -j4, now build all new variants in half the time it previously took for just the 32-bit builds. The new build logging output, though unconventional, serves two purposes: (A) improve my build-time situational awareness and (B) it help demystify some of the build steps and output files.
...
FossilOrigin-Name: 2f4be98614b49def2c2951887796c736269ef3bb7ba5b045cae5f748ae165a83
2025-09-25 15:17:58 +00:00
drh
dc868ef879
Convert the ShellText object in the CLI to use sqlite3_malloc64() rather than
...
plain malloc(). Avoid unnecessary quoting of table names in .dump output
and similar. Improved detection of OOM in set_table_name().
FossilOrigin-Name: 6ce4f6dc15a575c318669051fe6590ad114b52ff3f3e260cdf7accccdd922d63
2025-09-25 10:55:54 +00:00
drh
2c88a2ffb5
Rework the set_table_name() function in the CLI to use modern APIs.
...
[forum:/forumpost/2baa4acd64|Forum post 2baa4acd64].
FossilOrigin-Name: 821cc0e421bc14a68ebaee507e38a900e0c84ff6ba7ee95bf796cad387755232
2025-09-24 19:10:58 +00:00
drh
96bb92e70c
Special case the "decimal(-0.0)" output to show exactly 0.0, just as it
...
does for positive zero.
[forum:/forumpost/adc719d88d56ab22|Forum post adc719d88].
FossilOrigin-Name: 9ca4163bd93d78be5e4daf2b5d2b920d54d038c6fa8217dd2add0be0da6cd6b0
2025-09-24 17:49:09 +00:00
dan
2364fe3b38
Improve performance of window function queries that use "BETWEEN :x FOLLOWING AND :y FOLLOWING" where :y is a very large number.
...
FossilOrigin-Name: 1f0b7143575634929c0f77bafa888f0be2dd83f0c6c3deadd8299ac4ab8a8c01
2025-09-24 16:10:46 +00:00
drh
feeacfb897
Fix incorrect buffer size computation for the base64() extension function.
...
[forum:/forumpost/b1993c858f|Forum post b1993c858f].
FossilOrigin-Name: 603efcd404f0013559ca5bd936fc39481a3aa33a10340bac27b751b6b286d0b7
2025-09-24 12:01:50 +00:00
stephan
4500a87c95
In speedtest1, always use fatal_error() to exit fatally, instead of an fprintf/exit() pair, so that stdout/stderr get flushed consistently (which is significant for the WASM build).
...
FossilOrigin-Name: 1bd15cb343f6ce57f108291a8ed0f3ee2046932591d44edec133fe3ea43a2ef0
2025-09-24 06:59:47 +00:00
drh
cac1ef709f
Improvements to short-circuit evaluation of AND and OR operators.
...
This is a partial and incomplete response to
[forum:/forumpost/f5adeb59ff77c056|forum post f5adeb59ff77c056].
FossilOrigin-Name: cea8bf79e18d55a8658e48a967cd0b7970b6f88badb769cfbb1f66ab24fb9ec8
2025-09-23 17:00:53 +00:00
drh
611ffbc981
In the ieee754 extension, render -0.0 as 'ieee754(-1,-3071)' instead of
...
'ieee754(1,-3071)' as that makes the sign clearer. Both strings still
convert back to -0.0. Note that negative zero
and positive zero are distinct values in ieee754.
[forum:/forumpost/1eab7e4a08|Forum post 1eab7e4a08].
FossilOrigin-Name: 136188c161a8a2d5166798fcbd341bd1d3f81da7291011f806d6b2153544832c
2025-09-23 16:01:45 +00:00
drh
65a445d750
Fix the decimal_cmp() extension function to give correct results in
...
corner cases such as negative zero and two equivalent values where one
has extra trailing zeros to the right of the decimal point.
[forum:/forumpost/367c770224|Forum post 367c770224].
FossilOrigin-Name: 25b3626a018fa5916d0e129ee057c3f709c6e4d0b84a1a3102cad127a39a3db9
2025-09-20 14:32:12 +00:00
drh
49a37f333a
Improvements to imposter tables: (1) They are read-only unless writable-schema
...
is enabled. (2) Because they are now read-only, the ".imposter" command
in the CLI no longer requires the --unsafe-testing command-line option.
(3) Imposter tables do not participate in a PRAGMA integrity_check and hence
do not cause false-positive errors. However, you can still do an
integrity_check on the the imposter table itself by naming the imposter
table as the argument to integrity_check.
FossilOrigin-Name: ad152ddc4bcf6cfe840b9a36ab76a5ec36afdb1dd96eb7697e4b3df1bf63b00d
2025-09-19 17:24:12 +00:00