1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00
Commit Graph

27241 Commits

Author SHA1 Message Date
drh
cb6105badd Version 3.44.4
FossilOrigin-Name: f1e31fd9961ac82535a5d0702b127d84de8ca21d4df1c51c73e078ea0ad4afa8
version-3.44.4 patch-release
2025-02-19 00:18:53 +00:00
drh
090e39c7db Cherry pick recent fixes into branch-3.44.
FossilOrigin-Name: 75bbd094db08d421b7555bda5447902e44adff99cc095e7216a21cb5a3002167
2025-02-18 18:05:16 +00:00
drh
2688bc35cc Mark the BTree cell overflow cache as invalid whenever the rowid goes invalid.
FossilOrigin-Name: 0ec6669c84462c9ab965f912d3a09fa56cd99b5491c57da4a1941efa763ed5b0
2024-04-12 15:15:05 +00:00
drh
6f5ebb23c4 Ignore CHECK constraints when
qualifying the xfer optimization while running VACUUM.

FossilOrigin-Name: 944d1b6eb346a9b3c32bce3457f8a62013ee5d6b538fa19243036cd2924678d4
2024-04-09 14:08:39 +00:00
drh
3f00c1b31c Check-in a9657c87c53c1922 is wrong: the IndexedExpr.bMaybeNullRow flag is
required for virtual columns if they are part of an outer join.  Add a
test case to prove it.

FossilOrigin-Name: 083b0f7e771838e5f02744c245e8dbd7bef4fc998df59466ba65c531c7162d99
2024-04-05 14:13:43 +00:00
drh
67276c648b When compiling with SQLITE_ALLOW_ROWID_IN_VIEW, if the RETURNING clause of
an UPDATE of a view specifies a rowid, then return NULL for the value of
that rowid.

FossilOrigin-Name: d38cfa6067ccd450c4fac183765c05ff247ecb49ccf172a68ef9d381577df84f
version-3.44.3
2024-04-05 11:28:30 +00:00
drh
ff549b1384 Fix the xBestIndex method of the pragma virtual table so that it correctly
gives a higher cost to plans where the schema hidden parameter is
unconstrained.

FossilOrigin-Name: d68fb8b5dbb8305e00d2dd14d8fe6b3d9f67e2459102ff160d956a6b75ddc18e
2024-03-24 21:15:01 +00:00
drh
5b9ba67d8e Do not automatically assume that ROWID is NOT NULL when compiled with
SQLITE_ALLOW_ROWID_IN_VIEW.
dbsqlfuzz 31b38eeb63a4e1562de665078f52b7b47a7543cf

FossilOrigin-Name: b5d2dce18fcd00749a3efe8386df42fca103f86bd862f2610cfb05651ddb9d59
2024-03-24 16:42:12 +00:00
drh
c2526e2c2d Fix a assert() that is incorrect, though harmless. Also add a test case.
FossilOrigin-Name: 57b0c984605d0f437b4930f6b994e15b80340c753d46a679b07d356c645856ea
2024-03-21 22:08:33 +00:00
drh
29ef48a097 Fix test cases for rtree and fts5. No changes to code.
FossilOrigin-Name: 633dca907488b721ec1b8e470904af73369c1b1225005038aacb3e8a78c6390c
2024-03-20 16:29:19 +00:00
drh
47f478c9da Have rtree avoid keeping a blob handle open following an error.
FossilOrigin-Name: 1303716a113c51e949acc46fbd01634ce0e5a016cbc2d01bb20dd03ffd1f28e0
2024-03-20 16:04:53 +00:00
drh
a93344297f Following a ROLLBACK that reverts changes to an RTREE, any pending queries
against that same RTREE abort with code SQLITE_ABORT_ROLLBACK.
dbsqlfuzz de7d17b72d0e842352c998dd86a47b7d0f707be9.

FossilOrigin-Name: b26e5a500ebc358047eff79db61b5edfec319b95fbf8685e6a798c5e6c1923fb
2024-03-20 15:26:30 +00:00
drh
b2bc4c9338 Back port various minor patches
FossilOrigin-Name: a1a5c427c2c5cfff1ffeb71b29c9f64121465334c6a3fde8213df1dc2a1228d4
2024-03-20 12:19:40 +00:00
drh
d07908335d Automatically disable the DISTINCT optimization during query planning if the
ORDER BY clause exceeds 63 terms.
dbsqlfuzz afd1d61fc27d14938a0d78a50970fa1e9fbfee58.

FossilOrigin-Name: e8d5caef260b171b4df7f6166e191fc763e25be5b94fc1e097cd5c4ec05604e4
2024-03-20 11:36:26 +00:00
drh
76214b6661 Ignore COLLATE operators when determining whether the result of a subexpression
should be shallow-copied or deep-copied.

FossilOrigin-Name: dd58d1178f840f0249cb3d84f44c9da0335ca6a44f064f6ad6ec68ec621556c5
2024-03-20 11:30:40 +00:00
drh
c5c26d7f59 Fix a harmless compiler warning in the randomjson.c extension.
FossilOrigin-Name: a4c93512345f498e3e9aa1673c368bb9b0939b21bd492411b7eff581cd9a709a
2024-03-20 11:25:33 +00:00
drh
27039a32d5 If a term of an ORDER BY or GROUP BY contains an aggregate function or column,
then it is not an alias that needs to be resolved, so don't try to.  This fixes
a harmless assertion found by dbsqlfuzz.

FossilOrigin-Name: e7ba2af5a1ae5d464ad4d4edfdf551bc237168e04784c07a229ba7b28c4f4695
2024-03-20 11:24:11 +00:00
drh
8276a5f336 Fix the SQLITE_ALLOW_ROWID_IN_VIEW bug-compatibility option so that it works
again.  Add the SQLITE_CONFIG_ROWID_IN_VIEW sqlite3_config() value
to optionally disable the bug-compatibility mode at start-time.  Enable
testing of SQLITE_ALLOW_ROWID_IN_VIEW.

FossilOrigin-Name: acc08353e27a960bf949cfc5f94e874a91e1c42fd7a26617dc24cf549fa9b120
2024-03-20 11:04:38 +00:00
drh
0febad8fdf Fix a problem involving infinities int the Kahan-Babushka-Neumaier summation algorithm.
FossilOrigin-Name: 0984e5cd2574780dc1952e3daebafba9ddbb3b4937325117b922fdad0652db57
2024-03-19 10:46:41 +00:00
drh
8d6a941353 Silently ignore redundant ON CONFLICT clauses in an UPSERT.
FossilOrigin-Name: e546d8c68539920ea7b88932e9553d908d6a1956b85e29518ee4f81035987403
2024-03-08 14:16:20 +00:00
drh
da3c2bb7db In os_unix.c and os_win.c, do not allow xFetch() to return a pointer to a page buffer that is right at the end of the mapped region - if the database is corrupted in a specific way such a page buffer might be overread by several bytes.
FossilOrigin-Name: 198a1daae01dd9308f91eec1087279481ce0ff632bb3e5ab54cbf3738a903811
2024-01-23 16:21:07 +00:00
stephan
2295e72ef6 Update #ifdef checks in pager.c and util.c to account for [0462a2612d1fc1d0] to resolve the build problem reported in [forum:9819032aac|forum post 9819032aac].
FossilOrigin-Name: 7374c2342e66b352c2098d401e7660b18a0cdf1a69c24386953b1331c2afcbbf
2023-12-22 15:42:09 +00:00
drh
7722f9a60d When unable to resolve an identifier, change the Expr node into TK_NULL
rather than TK_COLUMN, to prevent any downstream misuse of the non-existent
column.

FossilOrigin-Name: 8f770d14d3dca5eb38faa89c4cba269233aa45cc4a56176fdae22f14974ceeb2
2023-12-19 13:00:21 +00:00
drh
1088fc8387 Avoid invoking sqlite3ExprColUsage() on an unresolve column reference.
FossilOrigin-Name: 6e0e2ee7c723582be5ad9126f5cd642c3cecf615c609bc0b87e914a6f5c0c904
2023-12-13 16:50:21 +00:00
stephan
fe8d9f4287 Worker1 Promiser API: when multiple db connections are active then use the requested connection instead of always the first-opened connection. Bug reported in [forum:894c330e7f23b177|forum post 894c330e7f23b177].
FossilOrigin-Name: 3874e5a3282888b5b24835194d2f6c7b93f1ef456aa70013218b21038e831ba3
2023-12-12 17:55:20 +00:00
dan
1c6b0e5db9 Different fix for the fts5 COMMIT-following-OOM problem first fixed by [fba3129d]. This one does not cause problems if an fts5 table is renamed and then dropped within the same transaction.
FossilOrigin-Name: 67da596d82ec0ed3c679da3be9d7379c557cd2fb83d7d833556107caf31327f6
2023-12-11 13:48:30 +00:00
drh
e467488d36 Increase the patch level to 3.44.3.
FossilOrigin-Name: bb4d35e2628320e187f96ca671cbbf68df51e423e93678b56f18983e93f91b9f
2023-11-29 02:53:53 +00:00
drh
0495cf05a0 Reference count the Table passed into the OP_VCheck opcode.
FossilOrigin-Name: 79e6496bb18246c29970a0da53f2178b6de36c5d1f50da881a6846f188e8c04d
2023-11-29 02:50:31 +00:00
drh
c8f9803dc3 Version 3.44.2
FossilOrigin-Name: ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f
version-3.44.2
2023-11-24 11:41:44 +00:00
drh
b4b2be91dd Another assertion fault fix, similar to [a9443dbfbe25e588].
FossilOrigin-Name: f796da626b5c3b099cc246a8b46d92839922e34f398d673b0b03d7ee33a28a60
2023-11-23 12:12:54 +00:00
drh
6292bb4fc0 Fix harmless compiler warnings in debugging code.
FossilOrigin-Name: db40272c36c01d5eeb902daed2670d57ee858caae560785350aed2600b573c2d
2023-11-23 11:45:15 +00:00
drh
90d7893739 Fix an fts5 problem that could occur when mixing regular and secure delete operations on a single table.
FossilOrigin-Name: 25fb5a540b1a61e1d0ff3d74ad7135bc53eb3fbe9f5352f98dd22dc7edd063bb
2023-11-23 11:29:00 +00:00
drh
efba33ed48 Increase the version number to 3.44.2.
FossilOrigin-Name: 73d3cb790950e317256f500e8bfd707a6156631628a80bcafce494e8bb1e1966
2023-11-23 11:21:20 +00:00
larrybr
e6fa99aebd Fix output redirect bug reported in [forum:/forumposts/cbf4933cfeee74bb|the forum].
FossilOrigin-Name: 2ab256bc0bb351c16feaf0d4917ad9c3f55e39821cc7d319d86c6f0752188af7
2023-11-23 07:06:21 +00:00
stephan
c028221c3f Correct the URL for loading sqlite3-worker1-bundler-friendly.mjs from sqlite3-worker1-promiser-bundler-friendly.js, so that the promiser can be used in bundler-using environments. Problem reported via email.
FossilOrigin-Name: b1128838f9508ba8e4b735a386c5dd42c1faf84705b95fb069ab724637341170
2023-11-22 17:13:27 +00:00
drh
fef8c0b942 Version 3.44.1
FossilOrigin-Name: d295f48e8f367b066b881780c98bdf980a1d550397d5ba0b0e49842c95b3e8b4
version-3.44.1
2023-11-22 14:18:12 +00:00
larrybr
1c83877d82 Pickup minor stylistic changes related to console I/O and, for Windows builds, get fact of UTF-16 translation into the sign-on banner. (a straight cherry-pick)
FossilOrigin-Name: d7a59e79467cf7aa13291c58f1cc4c1e2a51494bdd28661039421868f61088bd
2023-11-21 18:46:17 +00:00
drh
1dda1e22c9 Back out an incorrect change to the sqlite3ExprCompareSkip() function from
long ago.

FossilOrigin-Name: 89658abbcd04e6f6d5a2139fa92091df1de72e56bdbb12aacebf9e9178c58e3b
2023-11-20 15:58:14 +00:00
larrybr
84548fbd21 Arrange to not compile unused console I/O function.
FossilOrigin-Name: 184a0cd2e855c5177948eaf754c82685e2fcd5a08488d4d3d7b5fc7537e007b4
2023-11-20 13:59:44 +00:00
drh
8fa99e9568 Convert an assert in OP_VCheck into a branch that aborts the opcode, as this
can happen on some very obscure conditions, as discovered by dbsqlfuzz.

FossilOrigin-Name: 0d5f68717c829d4066c6af925c3a71f673ea34f14b1805388d1bdef152864d52
2023-11-20 13:12:05 +00:00
drh
02726b172a Cherry pick additional assert() fixes from trunk into the branch-3.44 branch.
FossilOrigin-Name: 6d8a8b700237d738e7b16dd844cf2514f0df7e2275bd9eab8de0a780e3687298
2023-11-20 12:00:29 +00:00
drh
61d0a37cdf Fix an assert() in fts5 that could be true following an OOM or IO error in contentless-delete mode.
FossilOrigin-Name: 80a0bd7a692b7f08d0fddc5bc2a75e3c8146c54a08c19a70d0e1b6d0e1ac383e
2023-11-20 11:50:22 +00:00
larrybr
4ba9f44d18 Fix test 5.0 in shell1.test for Windows. (A double-quote wrapped single-quote needs no further treatment to be recognized as a single single-quote.)
FossilOrigin-Name: aaa73400c41f382bbbd4ea32ad196d271c7a5e800bfee9afd998037a14fc89b9
2023-11-19 17:33:51 +00:00
larrybr
bd0d38f410 Merge changes to do Windows console I/O with UTF-16.
FossilOrigin-Name: f782054e7ccdfb421a73acde6994f5046b99884924a508316a0d4a0dc9b03318
2023-11-18 22:10:40 +00:00
drh
eedca24422 Correct conditional compilation issue seen with MSVC in the Win32 mutex subsystem.
FossilOrigin-Name: 6c069c5d664dca7908167e5759f952e407382b2669b25191167ad8d8fb03daa2
2023-11-18 20:24:55 +00:00
larrybr
241677519a Cherrypick changes to simplify and make more rational how console I/O package features are selected.
FossilOrigin-Name: b20c9f1785e94af4b81dcbbc63c49a883ab4095ff251b19e814ab6ef7ff06f2b
2023-11-16 20:50:56 +00:00
larrybr
22402d7d05 Get Fiddle build to succeed. (It runs, too, but not from changes here.)
FossilOrigin-Name: 957ebaa2be3056371d679f7a00aeba242db34218fb839ffd1d1197cad0c4a510
2023-11-15 16:54:49 +00:00
larrybr
c283f969aa Changes to console I/O for Fiddle build, to always defer to C library (as before.) A WIP, pending testing with Fiddle build.
FossilOrigin-Name: 45b8061e7568ccca164fe000f1f0a0d984b1c28fad530bc9fdea35793a0f40bc
2023-11-15 15:20:52 +00:00
larrybr
26b57aaed7 Cherry-pick some assert()s to cover misuse of *Put*() from 500+ shell.c callers.
FossilOrigin-Name: c1a53c28a4286c4c52fb78398d4dbf5c03de514a1fa9199bf0cfcd2cd3cc7cd9
2023-11-14 03:31:24 +00:00
larrybr
6edc7ab317 Manual merge of branch-3.44 with 3 sources affected/created by console-io-lib changes.
FossilOrigin-Name: 18ebcf117aad77fa968ff5c537c9b56c1342dea687377a72a02519412a6aa565
2023-11-13 17:45:13 +00:00