aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
Commit message (Collapse)AuthorAge
...
| * 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
* Avoid assuming that an expression that contains the sub-expression (? IS ↵dan2019-10-09
| | | | | FALSE) or (? IS TRUE) may only be true if ? is non-null. Fix for [a976c487]. FossilOrigin-Name: eb7ed90b8a65748f0721aaf7bdddd2207f552be5015603fbfb7044d815ae2f36
* An improved fix for the dbsqlfuzz-discovered ALWAYS() failure following OOM indrh2019-10-09
| | | | | sqlite3ExprCollSeq(). This time with a test case (engineered by Dan). FossilOrigin-Name: 907f7965b335d8d5441f2e386bb190d1f93ffcd45ca98d2d1c621dede491fc5e
* Change sqlite3SelectDup() to always return NULL if an OOM has occurred.drh2019-10-09
| | | FossilOrigin-Name: 01ba4641ab436c6065c8725908fc0913f2abded4ea62e004b7534e0116b9451a
* Alternative implementation of the previous check-in which is testable.drh2019-09-27
| | | FossilOrigin-Name: 102ef64462cf0d78395ccc7ebb8e3bf6b7647c06b7657a037e051697bc08d6b7
* Fix sqlite3ExprCompare() so that it ignores differences in the Expr.iTabledrh2019-09-27
| | | | | | | field for IN operators, as otherwise it can lead to false negatives, which is usually harmless, but can cause problems for an assert() in the window function logic. FossilOrigin-Name: 6a204b192a6c6f21988cab217366f21b14c672b81ceadc43675761a6d8c4484f
* Omit the sqlite3IntTokens array constant for a code simplification.drh2019-09-23
| | | FossilOrigin-Name: f907395ef5a2dc1d084b6a286af00de4c742cf12d4f347c21e1b757786508f57
* When a scalar subquery has a pre-existing "LIMIT X" then change it todrh2019-09-23
| | | | | | "LIMIT X<>0" rather than just "LIMIT 1" so that if X is 0 the limit will still be zero. Ticket [99cd4807dc03f178] FossilOrigin-Name: 82e5dcf5c1d500ed82f398b38fdae0f30033804e897fbab3c10f1e15e2abedef
* Always clear the temporary register cache after coding a subroutine.drh2019-09-18
| | | FossilOrigin-Name: b6f2a7f9cdb547c925f08306df82519e41a7a0dd2cabd9861a48917bb6eef845
* Fix a bug introduced earlier today by check-in [88833a9c2849c959].drh2019-09-02
| | | | | Ticket [29f635e0af71234b] FossilOrigin-Name: 6e7b4527d32cc1be0294614b9d7363d4b59cf654a954b86515b3f6888975ce73
* When applying the IN_INDEX_NOOP optimization and the LHS has REAL affinity,drh2019-09-02
| | | | | | also apply REAL affinity to each element of the RHS. Ticket [2841e99d104c6436]. FossilOrigin-Name: 88833a9c2849c959a37a80e0e4d2b211ce3c83a48319724c89b172b060c876b4
* Fix an obsolete comment that defines the meaning of one of the parametersdrh2019-09-02
| | | | | to the sqlite3FindInIndex() subroutine. No changes to code. FossilOrigin-Name: 0c946f0846b2835f8facca806a4d4ecc2b2e97343de245a0d91716d998b2a829
* When computing an expression value for an index-on-expression or a CHECKdrh2019-09-02
| | | | | | | | constraint and the expressions uses a REAL table column, but the value of that column is an integer (in other words, when it is using the store-real-as-integer optimization) be sure to promote the value to real before evaluating the expression. Ticket [57af00b6642ecd68]. FossilOrigin-Name: 0658c16e311393c8a347b1bd41fa5dbfd2e184aa75d84c011aa8dbac79b632e9
* Fix a harmless compiler warning.drh2019-08-31
| | | FossilOrigin-Name: 63c67a54b4d3e501f3059dcdfc6bb50c6b8dad63a34eb773e4408d9e4e780d7a