1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-09-05 10:44:27 +03:00
Commit Graph

30303 Commits

Author SHA1 Message Date
stephan
91f5303c1c Experimentally add the --compile-commands configure flag to generate compile_commands.json for compilers which support it (clang), to enable Language Server Protocol (LSP) inspection of the sources. This is probably not terribly useful without the --disable-amalgamation flag, as the amalgamation is so large as to make IDE/LSP processing very slow.
FossilOrigin-Name: 37fb15720f03a4ecc2d1662eab5b4241d6a9b990ea23612a8ef6211ccef3dae7
2025-09-02 13:14:40 +00:00
stephan
6f341f499a Latest side-stream autosetup/proj.tcl for improved compile-commands feature detection.
FossilOrigin-Name: 55744ca8b8f2f95ba8bd3e01ef89e21e26c8547912c9d5637afe772d17f34486
2025-09-01 13:01:20 +00:00
stephan
f91151bfa1 Fix a line-wrap change made in [50234bc9e9fe58da] which broke the docsrc build by splitting a link reference across two lines, which the doc processor does not like. Problem reported in [forum:ea1fe5f421549899 | forum post ea1fe5f4215].
FossilOrigin-Name: 321938063e2d6c579b992bbbed5210c8a051a8b2fe858bb88f95dbd8fb0f35dc
2025-09-01 00:32:43 +00:00
dan
20bfeccb65 Update test script reservebytes.test so that it works with the "prepare" permutation.
FossilOrigin-Name: 4ac774364b693a4b992c997c64bf425e2765133a7a25963cbf2b02c180eeaba5
2025-08-29 16:51:16 +00:00
dan
f942995fd2 Ensure POSIX builds work as expected (no extra usleep() calls) if SQLITE_ENABLE_SETLK_TIMEOUT is defined.
FossilOrigin-Name: f04a826bac1620b28c32252fa2ceaccc5dfbb21405a6a98942f95d3d1ca89acb
2025-08-29 15:56:38 +00:00
stephan
62ed0b79da Add 'from a check-out' to the mksqlite3h.tcl manifest instructions.
FossilOrigin-Name: 7728a74ca87934c333a66e46dc1f88ce572473e345d9ff20e5d566c0e26da82d
2025-08-29 11:21:08 +00:00
stephan
a00b9b99ba Fix the mksqlite3h.tcl SQLITE_SCM_... changes to work from out-of-tree builds. Problem reported in [forum:812f8d6ff4|forum post 812f8d6ff4].
FossilOrigin-Name: 127f0ab16370fe02b4456669bf60e45ce8c96c4e24b2db3080eaf376d77e0df8
2025-08-29 11:09:20 +00:00
stephan
9976684d26 Remove some commented-out debugging lines and fix a doc typo. No code changes.
FossilOrigin-Name: af32cb3e30ee527a89768b98d8646e2b25d3fb642e61e805187bb3e4613b0960
2025-08-28 17:10:44 +00:00
stephan
8200750eb1 Add macros SQLITE_SCM_BRANCH/TAGS/DATETIME to sqlite3.h, pulled from the fossil-generated manifest.tags.
FossilOrigin-Name: db6b6240ad465f865dd2ca8fa0cdfba8b5315c45041b91b76efade6427c213e1
2025-08-28 17:05:37 +00:00
stephan
dca1f04f07 Remove sqlite3expert.h from the compiler invocation for that tool, as it (A) doesn't need to be there and (B) it causes some compilers problems (as reported in [forum:a1085109e7db4cf3 | forum post a1085109e7]). This bug was faithfully carried over from the legacy build.
FossilOrigin-Name: 9f0a16f6e893d51f760a8c1e2cb4709fdd16ccb2c0258695767f8305f407f4ac
2025-08-28 15:04:52 +00:00
dan
1df00568b3 Add test to ensure that changing the number of reserved bytes in a database using VACUUM does not confuse other connections in stock SQLite.
FossilOrigin-Name: 6bf54bbc4d503e8ebeb804dfb318383770e85d434dacbbbd8f6dadc7595b1856
2025-08-27 11:21:44 +00:00
dan
f8b5cc695c Fix a typo in a comment.
FossilOrigin-Name: d2a74d5c36f600fa8d7dc03f6914482a2afca6e4ff557a0007d14f4304645ba1
2025-08-25 16:41:04 +00:00
dan
3c2b02d919 Check that certain ON clauses do not refer to tables to their right as a separate step after parsing a SELECT statement, instead of as part of the planner stage. For for [forum:ccfb3b5052 | forum post ccfb3b5052].
FossilOrigin-Name: e0beda7ffe92abf6322db8314c42940adab7f89a35d38124355cb3464ee70b9f
2025-08-25 14:27:31 +00:00
drh
08a256958f For the --pagecache option of the CLI, if the SIZE parameter is a
power-of-two, automatically round it up to using the PCACHE_HDRSZ.

FossilOrigin-Name: e7a2ba842cb571df66d204b8d5989ecdc78be7205fdaf1de1783c63c9118d465
2025-08-25 13:04:26 +00:00
dan
7af1d61886 Add test case to this branch to show that it handles cases where ON clauses use select-list aliases to refer to columns to their right.
FossilOrigin-Name: 4d34ab4acf0343a22ea8097fa4b1e87a1b0a13be864d5bee0c7a8341c09b8002
2025-08-25 11:47:15 +00:00
drh
c6925d5922 Small simplification to the query flattener logic.
FossilOrigin-Name: cbfe3f0c84eecef4308e1904cce4fe013ee1986ab6c85e82f92736fc80c0a358
2025-08-23 18:18:03 +00:00
dan
4bace197e1 Fix the cases in joinI.test on this branch.
FossilOrigin-Name: 23ac2377315af02b73db6ae37bfeeda1453e41efb702a6b707346956c2d41a9d
2025-08-23 16:26:36 +00:00
drh
81b8ad0830 Fix cksumvfs test case added by [e3bd1feccaee8ff2] so that it works
with varying page sizes.  Test case change only - no changes to code.

FossilOrigin-Name: b6f8f086dacd11f57bdb0eef79f25bce209816a0748f16009372c62dc3edd5ae
2025-08-23 11:09:53 +00:00
drh
b33477c5b4 Fix the sqlite3SetJoinExpr() routine so that it correctly sets the
join flags on CASE expressions.

FossilOrigin-Name: a4107c947c03ed48de3ab3f516cec8a3c092cec8ee19145fb564152e5cd16c85
2025-08-22 21:46:22 +00:00
drh
d271627f96 Steal the test/joinI.test from the on-clause-error-fix branch that
demonstrates that this branch does not work.

FossilOrigin-Name: d163535ec8d463d74112d38a606fa4d900e66deb1a414c947973cd1880e41526
2025-08-22 19:30:26 +00:00
drh
fbb07ff67f Remember if a SELECT statement contains an ON clause. If it does, then after
name resolution, scan the WHERE clause to verify that the ON clause does not
reference tables to its right.

FossilOrigin-Name: 0ec8a8f64434f8cc04f02a356ecaa409ebd886566ba09c32f0fff8ebd103a609
2025-08-22 19:17:44 +00:00
drh
db97d2ef81 Enhance treeview so that it shows the contents of ON clauses while
they are still attached to the SrcItem object and before they are
moved into the WHERE clause.

FossilOrigin-Name: 3e285bc117bcbfafe083709d27cca776d6ba418a9f0f58a6d4178035fba2d6ca
2025-08-22 18:19:26 +00:00
drh
6f15549f91 Experimental minor simplification of the query flattener.
FossilOrigin-Name: 953ea637d51192a6fb9c2ae84e097ae14e8a9c7fa7c98db90a39819b5f97f60e
2025-08-22 16:34:55 +00:00
drh
90916e5ba0 Fix a minor typo in a comment.
FossilOrigin-Name: 9ada44eb6d26532e45cdd2ed8d5707f1734d0177a13b493ff9cf070e0a992522
2025-08-21 18:47:01 +00:00
stephan
8376b87ae3 Add config as an alias for the reconfigure makefile target. Minor makefile doc tweaks. Random typo fixes in shell.c.in and tclsqlite.h pointed out by the misspell makefile target. No code changes.
FossilOrigin-Name: 9f15182776b30676c9aae9bcb5d4ad7580359fbdd607c2a9227c9cf2c81a4054
2025-08-21 17:59:28 +00:00
stephan
1702244d2e Remove some resolved TODOs from the makefile. Ensure that testfixture links against TCL_LIBS.
FossilOrigin-Name: b7751d144330593b5d41cb50e44b5134baad722be65173a7f55887f5e86a8c9d
2025-08-21 17:39:44 +00:00
drh
bb4743c278 The sqlite3_prepare() and similar interfaces should not return
SQLITE_ERROR_RETRY.
[forum:/forumpost/aa61ab56adb56159|Forum post aa61ab56].

FossilOrigin-Name: 4e473cf0c21dd78d457f5728086372464e82de95c5431a2587efd580f5076291
2025-08-20 23:29:59 +00:00
drh
5e972ddd9f Add an assert() to prove that sqlite3_prepare() does not return
SQLITE_ERROR_RETRY.

FossilOrigin-Name: 6c6a8a596f5d578cc7d35c577608492c0314cdb84ed67b9f068d90fb0b42f4de
2025-08-20 23:13:49 +00:00
drh
51d3e6d51c Change a newly unreachable branch into an ALWAYS().
FossilOrigin-Name: 99556be3fd99e6b7c520b0ae2090f59c6f58375750f9d571f9f586bce0a21504
2025-08-20 21:12:40 +00:00
dan
1be5689087 Avoid returning SQLITE_ERROR_RETRY if collation sequences associated with the table's PK cannot be found when creating an index. Possible fix for [forum:aa61ab56ad | forum post aa61ab56ad].
FossilOrigin-Name: ac649e5b9ca9b8f7729defa8d646df8c0cb57977a5eedcfa2cf1147d109a17f1
2025-08-20 15:42:23 +00:00
dan
c30e1a10ef Fix a problem with SQLITE_CHANGESET_CONFLICT conflicts caused by DELETE triggers within a call to sqlite3changset_apply_v2() with SQLITE_CHANGESETAPPLY_IGNORENOOP specified.
FossilOrigin-Name: 138e2aab43ac07aaf8c5389105ff6d3e107ff2d35badcb48233664fcb9661471
2025-08-20 11:21:35 +00:00
stephan
4a27581f14 In builds without HAVE_FCHMOD (e.g. WASI), make the chmod() of temp files a no-op, analog to how lack of HAVE_FCHOWN is handled, as discussed in [forum:98d5158d3fdd7a41 | forum post 98d5158d3f].
FossilOrigin-Name: 7d13e8e403ba00d37b950caa359d74452319247495284d252efa6473bad15b64
2025-08-20 09:43:15 +00:00
dan
697d29ea49 Fix a problem causing an SQLITE_CHANGESET_DATA conflict of a DELETE operation to be incorrectly ignored if the SQLITE_CHANGESETAPPLY_IGNORENOOP is specified.
FossilOrigin-Name: 78b543f85ac6643f3b69bf1250c6362f00e030f93f460ef7d04902682ef64ee9
2025-08-19 21:35:23 +00:00
stephan
7f84ce0ea9 Add a doc sentence about sqlite3_set_clientdata()'s result value, per request in [forum:bda6c22b6a | forum post bda6c22b6a]. No code changes.
FossilOrigin-Name: c664cee321fc449283ecfc073c45057c078299be33dc0c170b156d81a6698b55
2025-08-16 10:17:04 +00:00
dan
a6c95406c1 Avoid depending on HAVE_STDINT_H and SQLITE_PTRSIZE and other things in non-amalgamation builds of fts5.
FossilOrigin-Name: 309fdd496673bf58984fb16aef3d4cc2ad8c9f6dad7687509f4d708fed5ba41b
2025-08-14 19:36:59 +00:00
stephan
e3fc1fc8dd Minor internal cleanups in the configure script. No behavioral changes.
FossilOrigin-Name: c42269e5ce3688fccee16cf35e1101f36afc3ccc19bef57b177d46c84db2435a
2025-08-13 19:59:37 +00:00
dan
6f097125cd Have cksumvfs write checksums to the database file only, not the wal file. Writing them to the wal file breaks wal file recovery.
FossilOrigin-Name: e3bd1feccaee8ff2f68b7b863769dd739e8a434fd32fed73deeeec885628311c
2025-08-13 19:13:16 +00:00
dan
0e77c3fa4d In cksumvfs, do not write checksums to the wal file, as this prevents recovery from working.
FossilOrigin-Name: 5bf48c7e31904f1f7048499c630801846df89f262b32ea1e49fb6e039eaad11a
2025-08-13 18:37:41 +00:00
stephan
527062ac5e Minor autosetup/README.md tweaks.
FossilOrigin-Name: bd7530bf6afdad391b223651632e1b4d59ab5ec806c7a94daadc7f09091321f4
2025-08-13 18:30:42 +00:00
stephan
656563cce9 Move the forced NDEBUG in fts3Int.h up above the #include of assert.h, as reported in [forum:8f16dd9480aad85f | forum post 8f16dd9480aad85f].
FossilOrigin-Name: 3b06d1c9b6c03f38029a8b98fef6253647878c0f8b05447ec0c8122f189c90dc
2025-08-13 17:58:47 +00:00
stephan
6cebfa56cc Doc updates in the configure script. No functional changes.
FossilOrigin-Name: 47c4a2ddd1966aa8564e105fc1f2ba3c9c1668b44d4979424f65148d7976064c
2025-08-13 16:49:55 +00:00
dan
8e875fa3bd Fix a problem with the checksum-vfs and direct-overflow-reads. Forum post [forum:350e147cd1 | 350e147cd1].
FossilOrigin-Name: 7b7ce5f17fd63932a050b917b4356c23eec6040d1c4f51136393d7c6e3d40a63
2025-08-13 14:40:24 +00:00
dan
c5c9c6093b Fix a problem with the checksum-vfs and direct-overflow-reads.
FossilOrigin-Name: 8288edb9f930206f117823cf1d18af632dc6adbd7c4c3b9bcfc252e1a5e5b9cd
2025-08-13 14:35:14 +00:00
stephan
16478dbfdd Doc cleanups in main.mk. No functional changes.
FossilOrigin-Name: 839c998443880161af06b9f7470ebfc828251c3c1accdae5f0fbbcc13408474c
2025-08-13 11:46:05 +00:00
dan
a939a635a2 Fix a problem with reading wal mode databases from UNC shares on windows introduced by [e88212b10a7829ff].
FossilOrigin-Name: f341e7812984b41acd7dd2dd795a1716a8826af4326578dcdf7d7fdd55124ceb
2025-08-12 19:02:48 +00:00
dan
3f85939bf0 Fix a problem building testfixture on non SQLITE_OS_WIN platforms.
FossilOrigin-Name: 9e6fa73467892eb2333c0a94ca38b66b7cc0432326de93ff131ecde4c165114e
2025-08-12 18:57:02 +00:00
dan
b1406a6550 On windows, when opening a UNC path, fall back to using a single file handle shared between all connections for locking.
FossilOrigin-Name: 5c0202d96c3a20a2cbcd38eba5e62371606894a0cbc2da4f60e10a1b5fa7bd04
2025-08-12 17:55:34 +00:00
drh
1ecc135cc5 The off-by-one fix at [3e627d66ebdef8df] is insufficient. An index
can hold twice as many columns as a table, if the table is a WITHOUT ROWID
table.  The limit should be twice the maximum, not just one more than the
maximum.  Problem discovered by OSSFuzz.

FossilOrigin-Name: a836126bbec5c14432ed7fc7e9e6f8ebcd5dd1116d3ac8a9a0d25c8f62cc51fe
2025-08-11 13:17:10 +00:00
dan
9081b89720 Replace some 32-bit arithmetic in fts3_write.c with 64-bit to avoid the possibility of integer overflow.
FossilOrigin-Name: 6711110b1c7589311f012deee4d4dd5b771fa44ad328b471c9ef583960795199
2025-08-11 10:54:39 +00:00
stephan
88f7807fa6 Add an explicit call to sqlite3_initialize() to sqlite3_rsync so that it works when built with SQLITE_OMIT_AUTOINIT, as suggested in [forum:c4ec6b33097b8536 | forum post c4ec6b33097b8536].
FossilOrigin-Name: 8c9db6237154d1c153916ed821f576f91b353bf988182127d2a619506707d6bd
2025-08-07 20:20:22 +00:00