aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* 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
* 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
* New test case to further validate the fix at [221fdcec964f8317].drh2023-03-25
| | | | | [forum:/forumpost/d34ad68c36|Forum post d34ad68c36]. FossilOrigin-Name: a6e218a6e1ddd74be6a313b1d336334071747efd4ecd354ed7efe303d09c849c
* 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 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
* | 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
* 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
| * Add test cases for functions named the same as join keywords.drh2023-03-17
| | | | | | FossilOrigin-Name: 94944b239ce674d984c88ef6029b0260a972f1b25f01614b559ca07c3ebaf8f5
* | 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
* | Additional debug/test output from the query invariant checker showing thedrh2023-03-16
| | | | | | | | | | row-number that is being checked. FossilOrigin-Name: e4b6eb58e65f7fa0c92768f42bc820614169b7c2f37ded391b866ddb0d894de0
* | Update the tracing output for the query-invariant checker such that it showsdrh2023-03-16
| | | | | | | | | | | | the SQL that is run to verify that a found query-invariant discrepency is valid. Changes to testing logic only. FossilOrigin-Name: 8f45ad27403e971d88ec62e674c03f82eb19df0b43aa58d20b3400cdb6611d90
* | 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
* | 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
* | The check-in at [198b3e33dcfd74c7] caused a performance regression for somedrh2023-03-11
|/ | | | | | queries, which is here fixed. Problem reported by [forum:/forumpost/b405033490fa56d9|forum post b405033490fa56d9]. FossilOrigin-Name: dc9f025dc43cb8008e7d8d644175d8b2d084e602a1513803c40c513d1e99fea4
* Give CLI a no-more-options option. (--)larrybr2023-03-10
| | | FossilOrigin-Name: 0822788752621f6bf6af44b420b594ddd352634b3b0ed0eb835abea34b45817a
* Fix countofview.test so that it works with SQLITE_OMIT_PROGRESS_CALLBACK builds.dan2023-03-09
| | | FossilOrigin-Name: 2fc7c3fcee05c2a251ceb3666f3f6e9014cfe6e2f8570b72c43f251067e6b252
* Fix a possible NULL pointer dereference due to the sqlite3_interrupt()drh2023-03-08
| | | | | | enhancement at [bd8fa10e59f58886]. Reported by [forum:/forumpost/f5a2b1db87|forum post f5a2b1db87]. FossilOrigin-Name: 84417bbd144b2197c9930a520feb94b59053957c190be79f8deaaaebca68ecf1
* Fix a problem in the count-of-view optimization that can lead to incorrectdrh2023-03-08
| | | | | bytecode. dbsqlfuzz 23d782160b71c3f8f535ccb2da313dfc8eb8c631. FossilOrigin-Name: f45009533a79a59b302598ee2545ef787c51d0128f4e1dca60dd83589f660619
* Fix a bug introduced 4 days ago by [e95439119ac200cb]: do not set thedrh2023-03-07
| | | | | | | Expr.affExpr field of a generated column expression if the expression is a RAISE() function, as affExpr has a different meaning for RAISE. [forum:/forumpost/b312e075b5|Forum post b312e075b5]. FossilOrigin-Name: 1096b5a7cc8104db01f8820ace47020baad2f12e6711e3a7b4514ed1becc7b66
* Improvements to query invariant testing such that it uses the newdrh2023-03-06
| | | | | | | SQLITE_DBCONFIG_REVERSE_SCANORDER opcode to sqlite3_db_config() to make more accurate judgements about when a query is ambiguous, and hence when query invariant testing is approprate. FossilOrigin-Name: be9ab292cd14889b1c9648b47138260b33fe5be282ff2d90653b1387885a7d02
* Fix to check-in [b9190d3da70c4171] - the agg-with-indexed-expr optimizationdrh2023-03-04
| | | | | | | | | requested by ticket [99378177930f87bd] - that can cause an incorrect answer if an aggregate subquery has a GROUP BY clause, and that GROUP BY contains a term that is not in the result set, and the outer query makes use of expression indexes. Problem reported by [forum:/forumpost/a68313d054|forum post a68313d054]. FossilOrigin-Name: e06973876993926fd56181281d04b8dd504c689abf883fa21a5721cc1d478ea8
* Make the SQLITE_DBCONFIG_STMT_SCANSTATUS option on by default.dan2023-03-03
| | | FossilOrigin-Name: 5a09191186bc03b374e0c0d029e1a15208c6b845bc2f5f5f9f6a8a882809d9f3
* When it is known when preparing a statement that X cannot be NULL, transform ↵dan2023-03-03
| | | | | the expression (X IS NULL) to integer value 1 instead of 'true'. This is because under some circumstances, "Y IS TRUE" may not be equivalent to "Y IS 1". FossilOrigin-Name: cc4bb05b3653e9502b95ea6fe0bfb77feebc11285b66e1dde4c7b945928efbf1
* Do not use an expression index on a generated column if generated columndrh2023-03-03
| | | | | has the wrong affinity. dbsqlfuzz 65f5eb57f8859344d5f1f33e08c77ee12960ed83 FossilOrigin-Name: e95439119ac200cb47d0e277622f41ee7986b364487cd252b485ce5fa030d70f
* When flattening the right operand of a LEFT JOINdrh2023-03-02
| | | | | | | | (check-in [41c27bc0ff1d3135]), ensure that the OP_IfNullRow opcode does not NULL-out a subquery result that was computed within OP_Once. This fixes the problem problem reported by [forum:/forumpost/402f05296d|forum post 402f05296d]. FossilOrigin-Name: 8fe13f7a5e5eb798189acb25a608df7a94c2f5cc83463331a048b779c7890c82
* When flattening a view that is the right operand of a LEFT JOIN, usingdrh2023-03-01
| | | | | | | | | the optimization of check-in [41c27bc0ff1d3135], always insert the TK_IF_NULL_ROW expression nodes, even for TK_COLUMN expressions, as the TK_COLUMN might be a column from an outer query and hence still need to be NULLed out. This fixes the problem described by [forum:/forumpost/26387ea7ef|forum post 26387ea7ef]. FossilOrigin-Name: 198b3e33dcfd74c7ba6abcf789ee81dfed464a50ebf15c8edeff349d36789fca
* Follow-up to [bbaf1f2eb1e1637b]: Make sure subtypes do not cross a subquerydrh2023-03-01
| | | | | | | boundary even if the function that returned the value with a subtype is buried down inside a larger expression. This fixes a problem identified by [forum:/forumpost/37dd14a538|forum post 37dd14a538]. FossilOrigin-Name: e72661eb680ea707a839cb3d5cf6c7ef03706e7b40af1b84760147e59cd61a50
* Do not attempt to apply the count-of-view optimization to a CTE.drh2023-03-01
| | | | | dbsqlfuzz ef8623915d843b150c159166ee4548c78cc6895a FossilOrigin-Name: abc3a383636c0346053b5d09d96585f56c64cacb5751673ea3bf339e4955d1cd
* Activate SQLITE_DBCONFIG_STMT_SCANSTATUS in fuzzcheck.drh2023-02-28
| | | FossilOrigin-Name: 4fe1419ac3161ea8735241b04913593170c636cf3e1583756fe94edd396cd38b
* Updates to speedtest1.c and the speed-check.sh test script so that they workdrh2023-02-28
| | | | | with the new SQLITE_DBCONFIG_STMT_SCANSTATUS control. FossilOrigin-Name: bd02df052e1ef78b5335915a38f3c5e13c3c04ab82fd251aeb42a440d1d39257
* Change the name of SQLITE_DBCONFIG_STMT_SCANSTATS to ↵dan2023-02-28
| | | | | SQLITE_DBCONFIG_STMT_SCANSTATUS. FossilOrigin-Name: a63e4a150b505fc309fac847131009ee9965eb1b798ebcb202ec8b52f9189240
* Add an sqlite3_db_config() option - SQLITE_DBCONFIG_STMT_SCANSTATS - for ↵dan2023-02-28
| | | | | enabling and disabling the collection of sqlite3_stmt_scanstats() statistics in SQLITE_ENABLE_STMT_SCANSTATUS builds. Collection of statistics is disabled by default. FossilOrigin-Name: 0f5579bef27b84ee855065cfe87703c51e1f9773906a9e0d4e4dafc90bd0e553
* Only use a Bloom filter on an automatic index if one or more of the keydrh2023-02-28
| | | | | columns in the index can take on non-TEXT values. FossilOrigin-Name: 5916705c731604d2e6b51a307cc8d7b67f4c102062bfdfcbc716a2916e0b0d86
* In the Bloom filter optimization, hash all strings and blobs into the samedrh2023-02-28
| | | | | | | | | value, because we do not know if two different strings might compare equal even if they have different byte sequences, due to collating functions. Formerly, the hash of a string or blob was just its length. This could all be improved. Fix for the issue reported by [forum:/forumpost/0846211821|forum post 0846211821]. FossilOrigin-Name: 090304b870419acb5b05205a07fc75830b556928149f76a843cda526f77a6fc0
* When an automatic index creates a Bloom filter, show that in thedrh2023-02-28
| | | | | EXPLAIN QUERY PLAN output. FossilOrigin-Name: d7b2ac1c1a31fa4285cf6df0995db7e7705bb6a1bc94850c14c94cc4e3eb239a
* Further to [46639f682975dac6], the parameters of a table valued function thatdrh2023-02-27
| | | | | | is on the left side of a RIGHT JOIN do not need to be in the ON clause. Add new test cases and tags to associated test cases with the code. FossilOrigin-Name: 18ee689de3d1ae43b05ca52e0b62c49442ebf68a88814a7c679e8856250a4b0d
* In the [/info/7c2d3406000dc8ac|omit-unused-subquery-columns optimization], bedrh2023-02-26
| | | | | | sure to remove the EP_Skip and EP_Unlikely flags from the result set expressions that get nulled-out. dbsqlfuzz bf1d3ed6e0e0dd8766027797d43db40c776d2b15. FossilOrigin-Name: 21aec65e5e2a01e58dd0bb8c8b9b29b8414373b53353fc7ca80a152fdd27566b
* Adjust testrunner.tcl to make use of the new number_of_cores TCL commanddrh2023-02-24
| | | | | available in testfixture, and to use no more than half the available cores. FossilOrigin-Name: e0122d3863ed03e7bb64400d6561cbc824ecb14d228949ffde443069dbb4223a
* Fix an incorrect optimization that was attempted as part ofdrh2023-02-24
| | | | | check-in [18de3a8e6b431a07]. FossilOrigin-Name: f32055e8110a2eac6c9e26d1d1e620f0668bcb475d49d309dc549cea05e1e582
* Increased precision of floating-point to decimal conversions when thedrh2023-02-23
| | | | | | floating point value has no fractional part. [forum:/forumpost/d1387c3979c7f557|Forum post d1387c3979c7f557] FossilOrigin-Name: 18de3a8e6b431a075143631eafdcf0e1b1a21868b417394c365d46d2feca10b5
* Enable the count-of-view optimization by default.drh2023-02-22
| | | | | Enhancement request [eaed8e36ce888f1e]. FossilOrigin-Name: a4aacdd323a854d771c8cb1e2e4cfc4fb66b0020cfed23525733603605f5c63b
* Avoid computing the values for unused result-set columns in subqueries.drh2023-02-22
|\ | | | | | | | | Performance optimization request [baa5bb76c35a124c]. FossilOrigin-Name: 7c2d3406000dc8ac5a99cc205b036356b67e4b0b94738592ffc5680749696904