1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-23 21:49:02 +03:00
Commit Graph

32669 Commits

Author SHA1 Message Date
stephan
6ad0fcac94 Random makefile doc updates. No functional changes.
FossilOrigin-Name: 014ef252c7ea404340a5af52a6615cdddd969a4dbf30712fda538550240bb9fc
2026-07-21 20:56:55 +00:00
stephan
04ba5ef30b Random minor doc and formatting cleanups in the wasm makefile generator.
FossilOrigin-Name: a24064919bcc187d5a4d9fa67cb1810fc4e7b9c92596fd2c8e6b0a66bc37e4b3
2026-07-21 20:18:16 +00:00
stephan
adf52c4401 Restructure an errant goto which only accidentally never broke anything. Add some debug output to mkwasmbuilds.c.
FossilOrigin-Name: 0ca4e748e1682046f2e060876bcf7e8d249aa5611d939d32dc1365d3bcf12b48
2026-07-21 19:12:38 +00:00
stephan
ef893b1d66 The base64.wasm=1 flag to ext/wasm/GNUmakefile tells it to embed each resulting WASM file directly in its counterpart JS file base64-encoded. This is roughly 20% larger and saves a network request but is overall less efficient so will not be the new default. It may be interesting for custom builds, in particular for server-side node.js.
FossilOrigin-Name: 7a06190b712e0634dfc9ac53ab7632c2f46186cd280afd2da4af35df433bc3ed
2026-07-21 16:58:02 +00:00
stephan
add85ddbb3 Document the origin of the input size limit for #base64. No functional changes.
FossilOrigin-Name: 696988aac30797139060eb2718fcfda0363f1fa73df1187ea56956681d577411
2026-07-21 16:43:36 +00:00
stephan
6f1c5685db Simplify the previous checkin by removing an extraneous local var.
FossilOrigin-Name: 6382d8336e2891c556456a340daecff81766980a27071e1d5bda6262ffba6f26
2026-07-21 16:29:34 +00:00
stephan
5b04866b72 Fix the corner case of feeding #base64 empty input.
FossilOrigin-Name: 999d20197143d884158341ac36e33bc1eb8e3484228eaf532818add927c30228
2026-07-21 16:23:21 +00:00
stephan
093ca6b1af Consolidate a duplicated code block and ensure that the new filtering of the final JS files makes them read/write so that rebuilds without a clean between them work.
FossilOrigin-Name: 8b013184e42dbd7cd47c07bbb1edbb1f088dfb4efe540bfbc52a2e3c472c7b2d
2026-07-21 16:12:06 +00:00
stephan
1f2bc0ea64 Add support for (make base64.wasm=1), which embeds sqlite3.wasm into its corresponding JS file as base64. A very expensive calculator which was fed the resulting file sizes assures me that the two-file approach is, in the aggregate, more efficient both in terms of overall network bandwidth (+~20% bigger for base64) and client-side memory usage (streaming vs non-streaming wasm compilation), so we'll shelve this as an interesting experiment or maybe for use by custom builds.
FossilOrigin-Name: a167aee75198ff08b20b448fecd3267ed4a70af2472c02605318a5613f446fc6
2026-07-21 16:04:10 +00:00
stephan
bee0db8c60 This embeds sqlite3.wasm into sqlite3.js/mjs as base64 but is applied globally - it still needs to be made configurable.
FossilOrigin-Name: 0467a0f826b5b7bb65d9c74df80c7443f01824c1cc8184417849a74791f491b7
2026-07-21 13:28:52 +00:00
stephan
379e111bff An initial attempt at embedding sqlite3.wasm into sqlite3.js using base64. This produces a chicken-egg situation in the build because the input file where the blob belongs is injested by emscripten (which generates the wasm file from which that blob is to be generated), so it does not work as-is but is being set aside for later. We'll need to add a second preprocessing step which uses a different #directive delimiter to keep it hidden inside the first pass, then squeeze the wasm file in through there.
FossilOrigin-Name: 538199cf62f07a2fe7ee5775c9f01aff1644d638bc0916cf631d61376462b5cb
2026-07-21 12:57:48 +00:00
stephan
b524d66cd2 Latest upstream ext/wasm/libcmpp.c, primarily to make it filcc-legal (only the final chunk in the diff - the rest is minor changes accumulated since the last update).
FossilOrigin-Name: 06f3bbc5bddc2e763042f8b487a3deedf47c54b7fa785ba6fd6abd524b4cbe3a
2026-07-21 10:44:28 +00:00
drh
5970eb49f6 Improve performance and robustness of internal routine jsonBlobExpand().
FossilOrigin-Name: 099af17c6f82d0a1357f4d3ec5967fb5c664ec532ddfa674017cb4d8041d45c3
2026-07-20 21:03:27 +00:00
dan
c6017f07c0 Add tests to verify that the problem reported by forum post [forum:/info/2026-07-20T18:27:00Z | 2026-07-20T18:27:00Z] is only a problem on branch-3.53, not on this branch.
FossilOrigin-Name: 6384b4b8720e35682c3ec01e7de6f0fcaec58026d5e07dfaf989f5e5851d9810
2026-07-20 20:23:27 +00:00
drh
684763d832 Improved detection and reporting of deliberate misinformation in the
sqlite_schema table.

FossilOrigin-Name: 760af4e455e478f8ab72a574eb5f0141bb57e023beee3d16f9a8c02cbd726e45
2026-07-20 20:03:12 +00:00
drh
782a6a42e1 Remove an incorrect ALWAYS() macro from the implementation of the
internal exprNodeCanReturnSubtype() routine so that it works with
zero-argument deterministic functions like pi().

FossilOrigin-Name: a2511c6223a08033a2c5c66faee3afa50b992dc18de7a8498c8e3d24ce1376cc
2026-07-20 19:17:30 +00:00
dan
cd4b0a19ec Ensure that a write with REPLACE conflict resolution on an integer primary key column is handled after any IGNORE or FAIL conflicts, even if there is also an explicit "ON CONFLICT" clause unrelated to the IPK. Forum post [forum:info/2026-07-17T09:30:42Z | 2026-07--17T09:30:42Z]. Also fix a problem whereby a trigger fired by REPLACE conflict resolution might cause a UNIQUE conflict violation to be committed to the database. Forum post [forum:/info/2026-07-18T09:45:24Z | 2026-07-18T09:45:24Z].
FossilOrigin-Name: 8f0ad8f33f5e040eb70b0b77d730c2e785827621bb0ad21afd9ce2efe4dad921
2026-07-20 17:53:36 +00:00
drh
86512b11c5 Additional test cases.
FossilOrigin-Name: 3ae4f953de5349c7e90ad245a0c21e513d4ef23d636fd786842619aff12c2d27
2026-07-20 16:45:50 +00:00
drh
5179e97d9e Move the new test cases for this branch into a new *.test file.
FossilOrigin-Name: 7bdce4ec3b9995a13536eaa2e6a5702333e792b35fa58e606b2e4fa38b85f524
2026-07-20 14:37:21 +00:00
drh
27a20bafd4 Performance improvement in the sqlite3_initialize() interface.
FossilOrigin-Name: 4ad701b085ce1b9ada41441f560e55580f0dd33e8145857afce6c665aa974ad0
2026-07-20 11:50:37 +00:00
drh
73fbc0b152 Fix boundary cases of rowid lookup using very large floating point values -
values near the minimum and maximum 64-bit signed integer.
[forum:/info/2026-07-19T07:31:46Z|Forum 2026-07-19T07:31:46Z].

FossilOrigin-Name: 987ba5a3dc5f2a2294b77ef3ec1ea06682f0530a7268777c6b64985dd0e90d40
2026-07-19 19:49:24 +00:00
stephan
a4398ebbc6 Latest upstream jimsh0.c for minor portability improvements and cleanups.
FossilOrigin-Name: 436cf63e941b3db936a01d4584c9e3cc9675ce9ef4b6689530218c27252c170d
2026-07-19 12:56:34 +00:00
drh
65a80d9000 Test case fixes due to the previous.
FossilOrigin-Name: 923665823276ee9404a9fdb19378b970eeea77a97bc2f4312446c6f6bc5e4405
2026-07-18 19:49:18 +00:00
dan
c1c108fd71 After a DELETE trigger is fired by REPLACE conflict handling, retest all UNIQUE constraints to ensure that the row being inserted or updated does not conflict with one written by the DELETE trigger. Abort the statement if it does. Possible fix for forum post [forum:/info/2026-07-18T03:35:48Z | 2026-07-18T03:35:48Z].
FossilOrigin-Name: e2ab286bb713e1358ae9a1d50dc894362d0ea6f1a2e8467c587f42f0e483dd3a
2026-07-18 19:31:56 +00:00
drh
a5e160582f Disqualify the count-of-view optimization if the view is really
a correlated subquery.
[forum:/info/2026-07-18T10:23:43Z|Forum post 2026-07-18T10:23:43Z].

FossilOrigin-Name: bb65c3adcd79581715f90d287807a3f03b375f69957c7d0202d31b23cf627da0
2026-07-18 17:47:25 +00:00
dan
21fb3ccb37 Update tcl test command "optimization_control" to support the "count-of-view" optimization.
FossilOrigin-Name: b14c3f8fec5123b1faa6d88dee2740ee4acb10dd522207531567d46f4714e227
2026-07-18 13:34:51 +00:00
drh
7922210925 Enhancements to new test cases, for improved readability.
FossilOrigin-Name: 053e0d1f011d9ff4d57a6e33adf8de9a7a5550a3c5f6a6d4c511f75b85a09a99
2026-07-18 09:04:36 +00:00
drh
8498ccfd5f Add test cases from
[forum:/info/2026-07-18T03:35:48Z|Forum Post 2026-07-18T03:35:48Z].
New test cases are currently failing, as new or alternative fixes
are needed for the original problem.

FossilOrigin-Name: 49b67b7da6bceae3ee87153480e676f53a472b0f6e0ed8d1866ed819e8f64fa1
2026-07-18 08:46:36 +00:00
drh
ab3e9fc9e9 Additional test cases
FossilOrigin-Name: da16fe363e2b0f8e735405a03fd0cae0796333c37d41cb323863d3803ebfdc45
2026-07-17 23:25:28 +00:00
dan
88b4e34fa9 Ensure that a write with REPLACE conflict resolution on an integer primary key column is handled after any IGNORE or FAIL conflicts, even if there is also an explicit "ON CONFLICT" clause unrelated to the IPK. Forum post [forum:/info/2026-07-17T09:30:42Z | 2026-07-17T09:30:42Z].
FossilOrigin-Name: 1875249ab30fb110bc09963b592c8f48d2fb57066d770ad7e1da7e8bc8602977
2026-07-17 16:26:56 +00:00
drh
849be20583 Add the SQLITE_SHELL_EDITION compile-time option, which if set to a
date number of the form YYYYMMDD will try to configure the defaults
to be similar to the latest release at or prior to that date.

FossilOrigin-Name: 6924895d2cbc50971d8da1810423ad15c638dabc31b4f1083dd6076e20492ef4
2026-07-16 23:55:15 +00:00
dan
c744314bca Relax the restrictions on reordering tables in vtab queries that occur to the right of a LEFT or CROSS JOIN but are not actually the RHS of said join.
FossilOrigin-Name: 9062c79fc273d9e59090ea475e7d2abaf33c7cfe9948cbfb92b979a6ed31a37f
2026-07-16 13:17:34 +00:00
dan
856043efbf Relax the restrictions on reordering tables in vtab queries that occur to the right of a LEFT or CROSS JOIN but are not actually the RHS of said join.
FossilOrigin-Name: 7df34b446edb2e6826f504a9fed13631817ac03e1423539fc4c28efe7ec485e0
2026-07-15 19:19:03 +00:00
drh
7193cc9c08 Adjust QRF to generate lower-case HTML output with the SQLITE_STYLE_Html
style setting.

FossilOrigin-Name: 4be8630e053de91fb03c960d792960e837cf6360d5d24fbae4fc97b8fcaef062
2026-07-14 17:02:47 +00:00
drh
b14505fc54 Remove harmless "breakpoint" command inserted by the previous check-in
FossilOrigin-Name: 5a4b0b81de1abf9c1b73f026b416b29b9bdddc7a1b73ae5b9aa02f3dde131731
2026-07-14 14:52:25 +00:00
dan
98da7d71ee Update some test cases in fts5corrupt3.test and fts5corruptB.test to account for recent updates to database and record corruption detection.
FossilOrigin-Name: a48f4cf312b8a1af03b1dc61d8475fc7448fb927e2573fa98882e7b14c065c65
2026-07-14 11:46:07 +00:00
drh
cb704c0ad6 Add assert()s and a testcase() to and fix and improve comments in
the percentSort() routine.

FossilOrigin-Name: be673351ebdeba8e78ee11941ecb3e178e4d5212ff07f1d2790320af1d52e6a0
2026-07-13 14:52:13 +00:00
drh
f2e2b82023 Improve documentation for sqlite3_result_zeroblob64(). No changes
to code.

FossilOrigin-Name: c3d307d1367ba08c9ddb9fc26c95131d3e124d7e97896383f21b48cdc154a50a
2026-07-12 07:42:55 +00:00
drh
b15184e582 Improvements to the implementation of sqlite3_result_str() so that it
has 100% mutation coverage.

FossilOrigin-Name: 121f54c532d51af017d93996c40a694227064f1204429a7df1f1e2daff862eba
2026-07-11 19:49:54 +00:00
drh
5bf769ab6d Minor change to the "weekday N" modifier in the date/time functions
to facilitate 100% mutation test coverage.

FossilOrigin-Name: 76002a6f5de2dadb49ea76571fe395b9c8e261b380068fd2ea88f8326f268109
2026-07-11 16:14:16 +00:00
drh
a9a1fac180 New compile-time option SQLITE_MAX_SCHEMA and runtime limit option
SQLITE_LIMIT_SCHEMA that put an upper bound on the number of objects
in a database schema.  Current default is 10 million.

FossilOrigin-Name: 4ff362a4c2897e2b438d3d8fc88a012264526fa617f058be5a2d596c42d2e8a4
2026-07-10 15:06:05 +00:00
dan
951de300af Ensure that the "leaf-size" field of an fts5 record is only read from records that are actually leaves and are large enough to contain it. Bug [bugs:/info/2026-07-09T20:15:55Z | 2026-07-09T20:15:55Z].
FossilOrigin-Name: fe52900694e045231e91047fbfd82577c7fa347d7352bd048867a9e95299a0d0
2026-07-09 20:56:29 +00:00
drh
d58cea22b2 In the sqlite3_rsync utility program, fix three defects identified by
[bugs:/info/e2dfadf51209f12b|Bug e2dfadf51209f12b].

FossilOrigin-Name: 805f3acd2b0e81c8274680cbc4cdd6b7b9246df8075ed9caba9e2780729a2740
2026-07-09 16:34:26 +00:00
drh
1103b10d8a Fix an incorrect free() call in the CLI on Windows when using the -A
command-line option.

FossilOrigin-Name: 1ce57ba94b63796d5c9b913e3973751ee4f146bdc452ce8b408d2c0cff7f598d
2026-07-08 20:30:22 +00:00
dan
b83afcac56 Allow "ALTER TABLE ... DROP CONSTRAINT" to drop foreign key constraints.
FossilOrigin-Name: 4b0882cdb5b7947b23023c13e33f532ca44c0645f6a142a3c7bdb143142d9078
2026-07-08 17:54:16 +00:00
dan
47a4302042 Allow "ALTER TABLE ... DROP CONSTRAINT" to drop foreign key constraints.
FossilOrigin-Name: 17c08963812d6458783720c511806727aeae263a243a11d49b463d2c7867cd54
2026-07-08 17:40:04 +00:00
drh
e26d1a5132 For display modes in the CLI for which column headers are enabled,
make the mode "always" instead of "on.  Improved comments and test
cases.

FossilOrigin-Name: c8aa208bf5b00f3ab93c5edd510dfd0d7edd271c064f159616ee409b308f7eb9
2026-07-08 15:43:42 +00:00
drh
839d781501 Make the (legacy, deprecated) ".header" command in the CLI responsive to
the "always" title mode.  Clean up title mode and define its operation with
improved comments in the TCL interface and in the CLI.  Add the
"-title auto" option to the CLI.

FossilOrigin-Name: f94259fc07cd7856e9c6f81a46689f4f96bbf464fda7f1d11b51a308c296aca0
2026-07-08 15:34:53 +00:00
drh
3d0c7ce2aa Change the CLI so that the default "--title" is "always" instead of "on"
for some display modes.  This check-in also include a fix to "--title always"
for the "markdown" display mode.

FossilOrigin-Name: c3b0fff1b76b8c354b34fef17ff639968698e97234d6ab7af15e0e1a835486e9
2026-07-07 14:53:53 +00:00
drh
cfab834775 Add the "--rowcount on" and "--title always" features to QRF, the CLI, and
the TCL interface.  Make them on by default for "--style psql".

FossilOrigin-Name: 4edba31af4ef18350cb415079fb92cae0c53767fc0e74d63d404296974e75e5c
2026-07-07 13:53:57 +00:00