aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Another #ifdef to omit code that is only used by STAT4.drh2023-03-29
| | | FossilOrigin-Name: 445c75567de9bf9c8075dfc62c60dc4abeefab59c7803a5ef2cc5d69c08d7633
* New #ifdefs to omit code that is unused except under STAT4.drh2023-03-29
| | | FossilOrigin-Name: 09a9b30ba7828a487a33a3ebf8028dfaa147dff67d2724584123b90a88d9814b
* Enhance PRAGMA integrity_check so that it can detect that a NOT NULL columndrh2023-03-29
| | | | | | contains a NaN value and report that as an error. dbsqlfuzz f144b642fe6f1a1c196f258ac6e60118a0cb59b2. FossilOrigin-Name: 7638d9755dc90fd353b874d03ed418fa8aaee4440290ff69b1b552eae84e5baa
* Fix a weird corner case in aggregate function processing that results from thedrh2023-03-28
| | | | | | recent addition of support for index expressions on aggregate queries. [forum:/forumpost/bad532820c|Forum post bad532820c]. FossilOrigin-Name: c34fd9fe1b76e0a5943f014f46141cbe55d41bb1e6980adf9bcb6785a03e7883
* Fix multiple problems with RETURNING on a DML statement against a view,drh2023-03-28
| | | | | | | | | | all inspired by [forum:/forumpost/dc3b92cfa0|forum post dc3b92cfa0]. (1) Do not allow a RETURNING clause to trick the code generator into thinking that the view being updated has an INSTEAD OF trigger. (2) Generate all result columns for a view in a DML statement. (3) The automatic covering index for a view should cover all result columns of the view. FossilOrigin-Name: c8bedef0d61731c29ae34de1594222d15b578f9e2cddbbd5b74fb3059644fe0f
* Do not allow constant factoring during PRAGMA integrity_check, since thedrh2023-03-27
| | | | | | | constants might be stored in registers that are later reused for other purposes. dbsqlfuzz dc9ab26037cf5ef797d28cd1ae0855ade584216d. Problem discovered by a new assert() statement added in [6f8b97f31a4c8552]. FossilOrigin-Name: 0bba27b78112b2b2271e498f41c437df985aa2faab302ee5b29d9b60003a8379
* Improvements to register allocation, especially in the ANALYZE command.drh2023-03-26
| | | | | | New assert() statements added to help verify that memory allocation is correct, and to help fuzzer find lingering errors. FossilOrigin-Name: 6f8b97f31a4c8552312b4c98432ea356ae54c06d9cc929969f50c3c88360cd7b
* Disable factoring of constant values during ANALYZE. This is a temporarydrh2023-03-26
| | | | | | | | fix for [forum:/forumpost/07de5f6216|forum post 07de5f6216]. The register allocation logic in ANALYZE needs to be completely refactored, but that will take longer. This check-in will serve to resolve the issue until a better fix can be devised. FossilOrigin-Name: c3967d1259f1df969d303394986960bd098e174dcd337e374c9c3c39e0efa466
* When the left table of a RIGHT JOIN is used inside an aggregate function and ↵drh2023-03-25
|\ | | | | | | | | | | | | the left table employs an index on expressions, then make sure the expressions evaluate to NULL for the cases where the left table should be NULL. Fix for [forum:/forumpost/9b491e1deb|forum post 9b491e1deb]. FossilOrigin-Name: ffe23af73fcb324df988a00be343654ce7078b7208647c4eb779d666b8297e7c
| * Add usage detection to the NULL value generator for the left table of adrh2023-03-25
| | | | | | | | | | RIGHT JOIN inside of an aggregate. FossilOrigin-Name: 4d05a009dfb63bcb4173da4d09ccc00c308ce4dd2534a32aeb23c5d8d6a1fd4b
| * When the left table of a RIGHT JOIN is used inside an aggregate functiondrh2023-03-25
| | | | | | | | | | | | | | | | and the left table employs an index on expressions, then make sure the expressions evaluate to NULL for the cases where the left table should be NULL. Proposed fix for [forum:/forumpost/9b491e1deb|forum post 9b491e1deb]. More testing an analysis needed - there is a FIXME in this check-in. FossilOrigin-Name: 3572b40a7dfc4acc35e72e08e79f64688f8737e57ac89e4d10e6b32bd5178c63
* | When reading sqlite_stat4 data during query planning, be sure to expanddrh2023-03-25
|/ | | | | | zeroblobs prior to running comparisons. Fix for the issue identified by [forum:/forumpost/5275207102|forum post 5275207102]. FossilOrigin-Name: 5c8dd8dfcaab9c364b3a126ca35880ef57f5cecbe030771e646c934c8cf43709
* In the byte-code, when the result of an expression needs to be in a particulardrh2023-03-25
| | | | | | | | register, always use the sqlite3ExprCode() routine because it has the smarts to know whether to use OP_Copy or OP_SCopy. Do not try to OP_SCopy inline because an OP_Copy might be required. Fix for the problem identified by [forum:/forumpost/5522082cfc|forum post 5522082cfc]. FossilOrigin-Name: c104e5c6eeb89575319d9f94f49446142b06912fa8b283c19d46aa2ccddc5bda
* Add the tag-20230325-1 comment that was omitted from the prior check-in.drh2023-03-25
| | | FossilOrigin-Name: a13c01d076d23f0de500e8e6283e803dfc96f0da7509c0d97d598d6b3e7b930b
* The fix at [2bf5413dc2c19d5f] was incomplete in that it failed to cleardrh2023-03-25
| | | | | | | the reusable register cache that might contain registers in the STAT4 buffer region. This additional change corrects the problem. [forum:/forumpost/83cb4a95a0|Forum post 83cb4a95a0]. Test case in TH3. FossilOrigin-Name: 5d554e4d0f59a4309fed40e4fb26c7be42f1d4d55ccdcaaf7b4d445aa3122955
* Even tighter bounds on the maximum length of the filename fordrh2023-03-25
| | | | | sqlite3_load_extension(). FossilOrigin-Name: 787291414d2d2082a3c63e7cdd6bec4719f0c8b75ad1355f5026932ecbb28ba8
* Tighter constraints on the maximum length of the filename handed overdrh2023-03-25
| | | | | | | | to sqlite3_load_extension(), due to [forum:/forumpost/a43074729e|forum post a43074729e]. This is a follow-on to [01f3877c7172d522] and [forum:/forumpost/08a0d6d9bf|forum post 08a0d6d9bf]. FossilOrigin-Name: 9f351bdee2a09a4419bb8256a13d1f757b3e00ec26a445523f224fc56d9ae26d
* Fix CLI non-handling of OOM reported at [forum:/forumpost/6872514e04|Forum ↵larrybr2023-03-25
| | | | | post 6872514e04]. FossilOrigin-Name: 6f6a0fd63b13cb827d6a402de01a701eb5b3f92954032ea80e78ec864861a26c
* Remove undocumented, vestigial SQL functions in the CLI that were once useddrh2023-03-24
| | | | | for the ".recover" command but are now no longer needed. FossilOrigin-Name: 1ef461aa4e95d254c2c1edebbbfd92ca96d752e04f68ebe70104e8d936d36be9
* Fix possible integer overflow in bounds checking for the debugging functiondrh2023-03-24
| | | | | | "shell_int32()" found in the CLI. This change does not affect the core SQLite. [forum:/forumpost/be9c294ee0|Forum post be9c294ee0]. FossilOrigin-Name: 6211471138a654641a4cf4831cfa3b470e06f29a2b77e4d58177c8e065bec11e
* Fix an error in the OP_SeekScan opcode added by check-in [4a43430fd23f8835].drh2023-03-24
| | | | | Problem reported by [forum:/forumpost/8cc1dc0fe9|forum post 8cc1dc0fe9]. FossilOrigin-Name: 651a13fcd16f03e89eb6228c9f3250e25910b9bbe2637f627f65ff78f8ba2059
* Fix the handling of indexed expressions in an outer query that appear asdrh2023-03-24
| | | | | | corelated values inside an aggregate function within a subquery. [forum:/forumpost/79cf371080|Forum post 79cf371080]. FossilOrigin-Name: d8259877eaa962e6f90675790d3770ef02bd1a5d86d319cd8c1834710df844c4
* Fix a problem in cursor-hints for WITHOUT ROWID tables used in a RIGHT JOIN.drh2023-03-24
| | | | | [forum:/forumpost/591006b1cc|Forum post 591006b1cc]. FossilOrigin-Name: 221fdcec964f8317b2c23e926cc23799615cd3b4239a8a9ff87a83588d05bc64
* Fix byte-code register allocation in ANALYZE for STAT4 when there multipledrh2023-03-24
| | | | | | indexes with differing numbers of columns. [forum:/forumpost/bc39e531e5|forum post bc39e531e5]. FossilOrigin-Name: 2bf5413dc2c19d5feb32e5b01aa9b990ec2f74f45f5ca0dca15215f8c9dbc9b9
* The attempt to bring STAT4 up to 100% MC/DC at [55a26c67ed4a3a93] anddrh2023-03-23
| | | | | | | at [168fa2fb22b8c1ad] are incorrect. Back them out and replace them with a simple NEVER() macro. Error reported by [forum:/forumpost/dc4854437b|forum post dc4854437b]. FossilOrigin-Name: 5992370a89f8de7a6e941130b381f85d369856dbdb7860405e6fb17dad2293df
* The floating-point-to-text conversion with the zero-padding option nowdrh2023-03-22
| | | | | renders NaN as "null". FossilOrigin-Name: ad59fa17663bda54ec5d4e48ac24e04b87daa70c795d840cd8db382e2dd581b9
* For consistency, the ".mode json" output from the CLI now renders infinitydrh2023-03-22
| | | | | in the same format as the JSON functions. FossilOrigin-Name: abee339d5eae8b63d9579b7ec3a25f18071e675223e0bb5294c733fb618a3a26
* The double-to-text conversion renders infinity as 9e999, so that JSONdrh2023-03-22
|\ | | | | | | | | output is compliant and so that values can be round-tripped. FossilOrigin-Name: b52081d0acd07dc5bdb4951a3e8419866131965260c1e3a4c9b6e673bfe3dfea
| * Fix json rendering so that it shows positive and negative infinity asdrh2023-03-17
| | | | | | | | | | 9.0e+999 and -9.0e+999 respectively. FossilOrigin-Name: efce4690a52592c4f5fc7d023eebe771b0e615bb03c0fe203493f853b28e8f85
* | In the CLI, the magic parameter :inf and :nan bind floating point valuesdrh2023-03-22
| | | | | | | | | | | | Infinity and NaN, respectively, as an add to testing SQLite's handling of those quantities. FossilOrigin-Name: c70a61d8fbfb722679398c211aa48ccd84a392a6b59ba70551fe3a9fbab9a6d5
* | Add ALWAYS() on a branch this is always true now due to [84417bbd144b2197].drh2023-03-21
| | | | | | FossilOrigin-Name: badf7d0e3cfa6efaff4b132cb4ecca79a16e73197c5e275db14ccb5ff938276d
* | Fix a valgrind error and potential buffer overread when handling a corrupt ↵dan2023-03-21
| | | | | | | | | | database. FossilOrigin-Name: b1e0cd6444d1f710e58129723b285cf1321679fa920fc2841492dcb489ab8b9d
* | Minor change to btreeNext() to facilitate coverage testing.drh2023-03-20
| | | | | | FossilOrigin-Name: 20b3ef04d8c79e281e32676d57c7a8569fac9e782ca24337691d44d383eff7bb
* | Fix a problem causing a cursor to retain an out-of-date cell-info cache when ↵dan2023-03-20
| | | | | | | | | | processing a DISTINCT query on values that are identical according to their collation sequence, but different on disk. [forum:/forumpost/e132e6cde44fb505|Forum post e123e6cde4]. FossilOrigin-Name: 1b3abc1daeac29714256b5a1d5a07a75dc986f1089054a8bee44a00583b7383a
* | Back out the extra margin added to the input buffer of the CLI, as it is notdrh2023-03-20
| | | | | | | | | | needed. FossilOrigin-Name: ac8d1e5de5da35fa93c3f9241a7817285920431c66f4e4593d4d5c2db9f2b960
* | A better fix for the sqlite3_error_offset() problem on generated columns.drh2023-03-20
| | | | | | FossilOrigin-Name: 770b3e67c89ca16b08a9234acb626917a26ea414b3bc0340f9601644cb7504f2
* | Expression errors in generated columns should not generate non-negativedrh2023-03-20
| | | | | | | | | | | | sqlite3_error_offset() returns. Second of two defenses against [33aa4c0de8a62e33]. FossilOrigin-Name: 2adb4e0dda471ffc9b2a5cbad01b6c2bc6091b7526a8c8b19944cb2d4a5111e7
* | When reporting errors in the CLI, ignore the output of sqlite3_error_offset()drh2023-03-20
| | | | | | | | | | | | if the value returned is clearly out-of-range. One of two lines of defense against [33aa4c0de8a62e33]. FossilOrigin-Name: 26adbb80f51b9219ab2a3593496458b74a567ba5ee46b5154f056e389cfc09f7
* | Increase the size of ref-count values in the pager layer to 64-bits, to avoiddrh2023-03-19
|/ | | | | | | any reasonable possiblity of overflowing the counters. There is a performance and memory penality for this. [forum:/forumpost/b741f15a35|Forum post b741f15a35]. FossilOrigin-Name: 6c5d99a813e8498c2ea91383ac8886a43eaf47023919c03900e893640c03778d
* Add the ability to name functions using one of the join keywords likedrh2023-03-17
|\ | | | | | | | | CROSS FULL INNER LEFT NATURAL OUTER RIGHT. FossilOrigin-Name: 0910b1925e97f7ae4dae86894c9e2f54273c85115e19d0d9bff1280ffee35eed
| * Allow functions named using keywords "CROSS", "FULL", "INNER", "LEFT", drh2023-03-11
| | | | | | | | | | "NATURAL", "OUTER", and "RIGHT". FossilOrigin-Name: eeac3d5ec93e9cf8613d764b700b6e39a3ffb39b3953ce1e6a2f84dd986f9e86
* | Ensure that an error does not delete the Table object out from underdrh2023-03-17
| | | | | | | | | | | | the xConstruct method of a virtual table. dbsqlfuzz 7cc8804a1c6d4e3d554d79096e6ea75a7c1c7d2d FossilOrigin-Name: df4928c92b0db77d0a40d7b492b609db191252e2f87bca63d000e4fe2e206293
* | Add safety margin on the CLI input buffer for ticketsdrh2023-03-17
| | | | | | | | | | | | [33aa4c0de8a62e33], [b97e6c5e6a91d97f], [2971fbe3f993e95a], and [2971fbe3f993e95a]. FossilOrigin-Name: 741af08af1b93406a120580379d13e514524af627da5387ecfa6e442d004bfdd
* | Fix assert() statements that would (incorrectly) fire if an IF NOT EXISTSdrh2023-03-17
| | | | | | | | | | | | trigger that already exists contained two or more RETURNING clauses. Tickets [89d259d45b855a0d] and [d15b3a4ea901ef0d]. FossilOrigin-Name: 648899e4ded72cac6cc24bccf7ebfc709ee7309a003452b21fd6ab0ba20c34b8
* | Correctly handle SELECT DISTINCT ... ORDER BY when all of the result set termsdrh2023-03-16
| | | | | | | | | | | | | | are constant and there are more result set terms than ORDER BY terms. Fix for these tickets: [c36cdb4afd504dc1], [4051a7f931d9ba24], [d6fd512f50513ab7]. FossilOrigin-Name: 12ad822d9b827777526ca5ed5bf3e678d600294fc9b5c25482dfff2a021328a4
* | Do not use the one-pass optimization on an UPDATE if there is a subquerydrh2023-03-16
| | | | | | | | | | | | | | | | | | | | in the WHERE clause, since if the subquery is hidden behind a short-circuit operator, the subquery might not be evaluated until after one or more rows have been updated. Fix for the problem reported by [forum:/forumpost/0007d1fdb1|forum post 0007d1fdb1]. This is the same problem that was fixed by [73f0036f045bf371] only for UPDATE instead of DELETE. FossilOrigin-Name: 2c56b984a0bd3be5ec326a2109ea7b8f1d4ef63c8fc325caac9663cf2479eaff
* | Remove a NEVER() from btreeNext() that dbsqlfuzz ↵drh2023-03-16
| | | | | | | | | | | | | | | | 460aa158f9a2c41145831cc924296cde1f312b3f found could sometimes be reached. I will find a way to test that branch later. FossilOrigin-Name: 1dffeffe150fff6777cf26bc960326ca4e4190d25d05bb066b082d1e1c8eb374
* | Disallow the one-pass optimization for DELETE if the WHERE clause containsdrh2023-03-15
| | | | | | | | | | | | | | | | a subquery. Fix for the problem reported by [forum:/forumpost/e61252062c9d286d|forum post e61252062c9d286d]. This fix is more restrictive than necessary. It could be relaxed if the subquery does not involve the table that is the subject of the DELETE. FossilOrigin-Name: 73f0036f045bf37193b6e87ae45b578c5831614c530488257c69666178da3aa5
* | Fix Bloom filters on an expression index. drh2023-03-14
| | | | | | | | | | | | [forum:/forumpost/2e427099d5|forum post 2e427099d5] and [forum:/forumpost/d47a0e8e3a|forum post d47a0e8e3a]. FossilOrigin-Name: c028fb669a5ae34dbaf50fffab1ae49bc568b994435cf02e145d24da3cfb48d7
* | Include CLI's tip for -- in all builds. Better show optionality of its ↵larrybr2023-03-13
| | | | | | | | | | non-option arguments. FossilOrigin-Name: 9e2c771daad485d923751fdee0316b195bb49ec9f865f2e39565906edeaa5cf8