aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
Commit message (Collapse)AuthorAge
...
| * Remove a NEVER() that is no longer true. Fix for [36ffedcb9].dan2019-12-27
| | | | | | FossilOrigin-Name: 597896ed0ae9e2960a8f39576bd7f77a11dccc1da84b6a44ebb5c38d90ebc330
| * When determining if an aggregate within a sub-query should be processed as ↵dan2019-12-27
| | | | | | | | | | part of the sub-query or an outer query, consider any FILTER clause in the same way as the arguments to the aggregate. FossilOrigin-Name: 1ffc045d2bbeeda9c13a3a3585538ff6434fc852b0ae6679d3c8b9f606bf92e6
| * When the sqlite3WindowRewrite() routine detects and error, have it convertdrh2019-12-25
| | | | | | | | | | | | | | | | the SELECT statement into just "SELECT null" so that it does not leave the parse tree in a goofy state that can cause problems with subsequent code before the stack has a chance to unwind and report the error. Ticket [d87336c81c7d0873] FossilOrigin-Name: fa58aad48a788802b13a819e49f9b8787f713bbe395c46c7295e821c52c81738
| * Extra defense against problems following an OOM. dbsqlfuzz find. Alsodrh2019-12-24
| | | | | | | | | | import the latest dbsqlfuzz test cases. FossilOrigin-Name: 0a70f5ddaf3567f335cc0fd0fcd5303e2afb5e38a6388faddf5cab1f2a74e3dd
| * Fix a case in which SQLite could fail to identify "x BETWEEN ? AND ?" being ↵dan2019-12-23
| | | | | | | | | | true as implying that x is not null. Ticket [dfd66334]. FossilOrigin-Name: 2f17974912ec5e99089dc0da803e7ff1bf033377a49762d2689a812c005f2641
| * Enhance the sqlite3VdbeMemAboutToChange() shallow-copy validation mechanismdrh2019-12-23
| | | | | | | | | | | | | | | | | | | | | | by adding the new OP_ReleaseReg opcode to tell MemAboutToChange() that a range of registers is no longer needed so that the source register can be freely changed. This is a change to debugging and test builds only and does not impact release builds. Fix for ticket [c62c5e58524b204d] and [5ad2aa6921faa1ee]. The previous fix to ticket [5ad2aa6921faa1ee] is backed out by this change since this change is a better fix. FossilOrigin-Name: 36fdeb4f0a66970a35de688b617f90899c89cfdfab659f864df99aa7ebf854ea
| * Change the code generator for the IN operator so that it avoids creatingdrh2019-12-22
| | | | | | | | | | | | OP_Eq and OP_Ne opcode with the same P1 and P3 arguments. This enables us to back out check-in [ddb17d92df194337] and also fix ticket [188f912b51cd802]. FossilOrigin-Name: 9ab985a9c8160b905730678f40ed440a246cdec549c798bafefaed5abbc0437f
| * Make a hard copy of strings in constraint checks prior to applyingdrh2019-12-22
| | | | | | | | | | | | | | | | | | OP_RealAffinity, to avoid problems with a pointer accounting assert. This change is not strictly necessary - the correct answer is obtained without it and no UB occurs - however the pointer accounting asserts are useful to prevent other problems so it is a simple matter to bring this piece into compliance. Ticket [5ad2aa6921faa1ee] FossilOrigin-Name: 89a9dad6330270a4c3b962f86a208088d2ea9883c7d291351a77f058e0ed8b0c
| * When parsing a CREATE TABLE from the sqlite_master table, delete the CHECKdrh2019-12-22
| | | | | | | | | | | | | | | | constraints if there are any errors, since there might otherwise be attempts to use those CHECK constraints if PRAGMA writable_schema=ON is set. This undoes the fix in check-in [ea721b34477ab8b4] for a more general solution. FossilOrigin-Name: a982e6434cd66bfbe94d455f538bcbc4360b91572062d92acae6b77e9560e65d
| * When a corrupt schema is loaded using writable_schema=ON, the CHECK constraintsdrh2019-12-21
| | | | | | | | | | | | | | (or other expressions in the table definition) might not be fully resolved. Ensure that the code generator can deal with this if the table is subsequently used in a DML statement. dbsqlfuzz find. FossilOrigin-Name: ea721b34477ab8b49d182352c4bc198245933b850e9b6248b4f97600e80bb44b
| * Apply real affinity to generated columns of type REAL that are extract fromdrh2019-12-20
| | | | | | | | | | an index. Ticket [e0a8120553f4b082] FossilOrigin-Name: 728ad39e3bd07a2503a95c68ed5bbc3f28fd97551d59f12a5fab25dc68227e99
| * When an error occurs while rewriting the parser tree for window functionsdrh2019-12-19
| | | | | | | | | | | | | | | | in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set, and make sure that this shuts down any subsequent code generation that might depend on the transformations that were implemented. This fixes a problem discovered by the Yongheng and Rui fuzzer. FossilOrigin-Name: e2bddcd4c55ba3cbe0130332679ff4b048630d0ced9a8899982edb5a3569ba7f
| * Change an unreachable testcase() into an assert()drh2019-12-18
| | | | | | FossilOrigin-Name: 062e00c4d7e30155299339eaefe6cbe01953894baebf0af6d7ab3295b7436eb7
| * Remove an assert() in the code generator that can fail due to an invaliddrh2019-12-18
| | | | | | | | | | | | | | INSERT statement. The same assert() appears again in the VDBE and will fire there if the problem persists in an SQL statement that does not contain errors. Gramfuzz find. FossilOrigin-Name: 9bdd57cb9ad8ac1f4a0f1a3942d94ca5193109eeb1975343c4f0c7abf7135946
| * When a table is part of a LEFT JOIN and should be a completely NULL row due todrh2019-12-16
| | | | | | | | | | | | the semantics of a LEFT JOIN, make sure any generated columns on that row evaluate to NULL. Ticket [3b84b42943644d6f] FossilOrigin-Name: 0271491438ad2a985aeff355173a8d0f1e5813954c82147bc68cb26cca5804c8
| * Do not set OP_Column flags on the instructions generated bydrh2019-12-14
| | | | | | | | | | | | | | sqlite3ExprCodeGetColumn() if the opcode generated is not really an OP_Column, which might happen if the column is virtual. Fix for ticket [b439bfcfb7deedc6] FossilOrigin-Name: 2401e04730a156aa48787b91af4e516406cb7635145e430be62fd16481816237
| * Make the sqlite3ExprCodeTarget() expression code generator routine robustdrh2019-12-14
| | | | | | | | | | in the face of unknown opcodes - it simply generates a NULL value. FossilOrigin-Name: f8e876c82a246ceed32b166f64e05dfe5ce4ab4c6820be60404109b43d36bb80
* | Tie up the loose ends in the ExprList size reduction.drh2019-12-13
| | | | | | FossilOrigin-Name: 59d0f3afe5249a2a6453fe7bc810c2c7beb896d3800174c7c90f9304c0b1ad88
* | Work toward reducing the incremental size of an ExprList object to 24-bytedrh2019-12-12
| | | | | | | | | | | | | | | | per entry, from 32-bytes (on a 64-bit machine). This helps the new mini-lookaside allocator to run better by avoiding excessive reallocs. The current change mostly works, but still has a few loose ends to tie up. This check-in is merely a snapshot to save my work. FossilOrigin-Name: fdda76cfb01bf2b19522ac4558b443634d28a69b0828677c42682b645eae1f3b
* | Change the name of the Expr.a.zName field to zEName, so that it has a namedrh2019-12-12
|/ | | | | | that is distinct from other fields and variables and is hence easier to grep for. FossilOrigin-Name: d3783357f8fa76c42a86f12b214522f0388c37773c36ab8c5ce0623abbc4436a
* Fix a problem with foreign keys and generated columns discovered bydrh2019-12-07
| | | | | Manuel Rigger. FossilOrigin-Name: 27c0fdab1ba4d4993b164eb4b777c63e82aa247c3fa406121dc8ed94970a0b35
* Window functions are never constant.drh2019-12-04
| | | FossilOrigin-Name: 35f0b5a8c7921f7419eeb11be8201fd6988047042fcaeffa297fc322bc480c1f
* Fix a problem that comes up when using generated columns that evaluate to adrh2019-11-21
| | | | | constant in an index and then making use of that index in a join. FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af
* Remove an incorrect ALWAYS() macro.drh2019-11-10
| | | FossilOrigin-Name: f7a74f89dbd58b47bbcb58ea2af71fbe1eb5ec2dbe36d90685c39cb28ecf5250
* Restore generated column loop detection logic that was incorrectly removeddrh2019-11-07
| | | | | | from the previous check-in [9e07b48934e9a972]. This fixes ticket [299b50ba812d8e54] FossilOrigin-Name: 104a2beb57037f9353ffa77096aae0eb64e4682e667f31623bfd3d064dd8d881
* Change the way generated columns are computed so that no column is computeddrh2019-11-06
| | | | | inside branch code that might not be taken. Ticket [4fc08501f4e56692] FossilOrigin-Name: 9e07b48934e9a972dcf62e3538b3b21ffa044c553feba0441675ac0bbe13bcb2
* Fix a false-postive in the sqlite3ExprImpliesNonNullRow() decision routine,drh2019-11-04
| | | | | | | that resulted in an incorrect LEFT JOIN strength reduction when the WHERE clause contained a row-value comparison. Ticket [02aa2bd02f97d0f2] FossilOrigin-Name: ea20068e6d97c9349ebcc7d0a01e99ebf08c6f44363f71a0218a1abea209adc5
* Ignore differences in Expr.op2 in sqlite3ExprCompare() in cases where itdrh2019-10-31
| | | | | does matter. Ticket [1d2a8efc6c3a595a]. FossilOrigin-Name: 329820673a12ff6a6c8759f40989d4ccf272441064b0366a5f491695b55ad0e9
* Always disallow the use of non-deterministic functions in CHECK constraints,drh2019-10-30
| | | | | | | even date/time functions that use the 'now' or similar keywords. Provide improved error messages when this requirement is not met. Ticket [830277d9db6c3ba1] FossilOrigin-Name: 2978b65ebe25eeabe543b67cb266308cceb20082a4ae71565d6d083d7c08bc9f
* Simplify the bytecode generation for SQL function calls such that thedrh2019-10-30
| | | | | | OP_Function or OP_PureFunc opcodes are coded directly, rather than using the intermediate OP_Function0 or OP_PureFunc0 - opcodes that are now removed. FossilOrigin-Name: 84e02d773d60cffe619104991d21d7f0c68616c0f6bb99686bf54f5306c756d0
* Remove a NEVER() comparison from sqlite3ExprCompare().drh2019-10-28
| | | FossilOrigin-Name: f4285297e1e7ebef90bfc0f71402a4e1726d31bc15b69fec13a1f0d98fed1f08
* Merge fixes from trunk.drh2019-10-24
|\ | | | | FossilOrigin-Name: 4ec57d88415fa4ea2e99d4a5671074ec6829d6824bc8509d5ae9c978d47d1419
| * When a vector comparison appears in the WHERE clause and the constraint sidedrh2019-10-23
| | | | | | | | | | | | has a COLLATE clause on the first term of the vector, be sure to honor that COLLATE clause. Ticket [135c9da7513e5a97]. FossilOrigin-Name: 978b2d20cf95d0b7143e3104ce1e9d5c85002867b554dc6b21deb528b730bbc7
* | Take the declared column time into account when computing the values fordrh2019-10-22
| | | | | | | | | | generated columns, and apply appropriate affinity. FossilOrigin-Name: 9e04ba22dfce3998e61331ac229ff543ecccc590284c9dd5def21efbe594fba0
* | Merge the row-value fix from trunk.drh2019-10-22
|\| | | | | FossilOrigin-Name: 1fbd7438611174aa594485241c8cc2f4ea6d09c57ef2fc16c8995e8061fdfdd6
| * Disqualify row-value comparisons for use by an index if the right-hand sidedrh2019-10-22
| | | | | | | | | | | | has an affinity that does not match the index. Fix for ticket [6ef984af8972c2eb] FossilOrigin-Name: 5c118617cf08e17a6edfdfba86e3fc49132a780990b68b52724c2aaeac85f506
* | Merge changes on trunk into the generated-columns branch.drh2019-10-22
|\| | | | | FossilOrigin-Name: ba123b8c201053d8f9387de38f3513b06f7721b28d79fab8489f96d336105117
| * When flipping ("commuting") a comparison operator, set the new EP_Commuteddrh2019-10-22
| | | | | | | | | | | | | | bit rather than adding extra EP_Collate bits, to single later processing that the order of precedence for COLLATE operators is inverted. Fix for ticket [b47e3627ecaadbde] FossilOrigin-Name: 90f7c477354d67d22d5eb0da22dac579f384ab44743fdc19887220e32203ebc2
* | Changes to the INSERT logic to make it simpler and faster and so thatdrh2019-10-21
| | | | | | | | | | it works with generated columns and BEFORE triggers. FossilOrigin-Name: bc368cb090376d33d3844e3689c4f6bd19eed758e39b878ee67fef93b1c839ea
* | Work toward getting generated columns to work with triggers. Still moredrh2019-10-19
| | | | | | | | | | work to do in this area. FossilOrigin-Name: 932a37275d7e932f8237d32c8fc6087ed8cd342fe01ef2f7a43c7237ab84c9ac
* | Add testcase macros.drh2019-10-19
| | | | | | FossilOrigin-Name: fb9c9bb284d441bd7aa34c87b6fd8ce57d036c17623d82354154fc6286bdd134
* | Refactor names of column index transformation functions, for clarity.drh2019-10-19
| | | | | | | | | | Get generated columns working with ALTER TABLE RENAME COLUMN. FossilOrigin-Name: 27ab41c9102e7801ff829488fc123a8040da008bef373d6704efbe2f93e1da90
* | Claw back some performance from the sqlite3ExprGetColumnOfTable() routine.drh2019-10-18
| | | | | | FossilOrigin-Name: e8426acb94179ff49549aced6ea3c26c49ba4761c2f414fa1772d6a031edc79d
* | STORED columns can now reference other STORED columns, in any order, as longdrh2019-10-18
| | | | | | | | | | as there are not loops. FossilOrigin-Name: 0d236698e64b2a4b46f91a25279c406e0bf392fe66116678456f0a034c11d7b4
* | INSERT with named columns for a table with generated columns.drh2019-10-16
| | | | | | FossilOrigin-Name: 64db39f92d68d1b9f23e48af35e16b969c38b58041fbe900066eeb3ddb291cef
* | Simple INSERT and SELECT operations working with VIRTUAL columns.drh2019-10-16
| | | | | | FossilOrigin-Name: 7f9f90b1b885fa9905b296f2e0fcc9b2341019b42fc839722a93cf60e49a9252
* | Initial experimental code for generated column support. Non-functional.drh2019-10-16
|/ | | FossilOrigin-Name: 11d472c1df707b8d03ec57d8fc582a34f5eb89a9d02a154a9871650c65065b45
* Futher improvements to LEFT JOIN strength reduction.drh2019-10-11
| | | FossilOrigin-Name: 8a39167bd2d46496f7484cfec371e4bad22da882209b01da9459c4ed5877da25
* Improvements to the LEFT JOIN strength reduction optimization.drh2019-10-11
| | | FossilOrigin-Name: 548082dfab5d9484279ccc11cd2833ac131b54b7481372b576d7c28bbb3294ea
* Prevent SQLite from assuming that if ((? IS NOT NULL) IS NOT NULL) is true, ↵dan2019-10-10
| | | | | ? may not be NULL. Fix for [d51a8696]. FossilOrigin-Name: 7833feecfe745e237f239ee4c38a9e4bf7ad66a32919150208da87c00a826473