aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
Commit message (Collapse)AuthorAge
...
* Use macros to determine if an expression is always true or always false.drh2019-04-19
| | | FossilOrigin-Name: 6de980a09c3a7adf71f2c9a63a242673b5e1f246e8ee071b26844275f0dad0fc
* Streamline the processing of the AND operator. Slightly smaller and faster.drh2019-04-19
| | | FossilOrigin-Name: 7713996aa99ce6dd35b5a2db74dd26658fb8d9817169b2a7531cdef6edb41403
* Fix an obsolete comment and other minor issues from code inspection.drh2019-04-14
| | | FossilOrigin-Name: cd084427319394386844d6651479256a2fd57a412fccb79ba53172ce76693eb1
* Enforce the SQLITE_LIMIT_COLUMN limit on virtual tables.drh2019-04-13
| | | FossilOrigin-Name: 0b6ae032c28e7fe34d81d1769f6e2901addbd1b95cd9a255dcef274061fb0164
* Eliminate the tool/addopcodes.tcl script. The purpose of that script was todrh2019-04-05
| | | | | | | keep the number of parser codes below 256 in order to save parser table space. But we have long since blown through that ceiling so the addopcodes.tcl script was just needless complexity. There is no longer any reason to keep it around. FossilOrigin-Name: d272819298083ebbde57962a2938925b1aaa1caf03e48bb3ea26ad91e0461d84
* Improvements to the sqlite3ExprImpliesNonNullRow() theorem prover.drh2019-04-01
| | | FossilOrigin-Name: 3fde627616030ca0de87169467e2e453fdc91154942e3a3a92a221df5923b2d2
* Make all ephemeral tables built to hold the RHS of an IN operator bedrh2019-02-22
| | | | | | | index-btrees, never table-btrees, regardless of whether or not they are used as IN_INDEX_LOOP or IN_INDEX_MEMBERSHIP. That way, the same ephmerial table can be reused for both cases. FossilOrigin-Name: c2d50df8fd1a1fdae6226a3e77296ded09b53a74540caedd4868e686a93cbc10
* The IS NOT NULL operator does not imply that the operand is never NULL.drh2019-02-05
| | | | | Fix for ticket [5948e09b8c415bc45da5cf] FossilOrigin-Name: d840e9bb023a1e84a7739d764a0f6cf608fc3183ff8c366fcdb486ebd932f0c1
* Ensure that the Walker.pParse structure is initialized when walking thedrh2019-02-01
| | | | | source tree to gather the WINDOW clauses on a query with window functions. FossilOrigin-Name: 4ca9d5d53d41d08fbce29f9da8cc0948df9c4c3136210af88b499cf889b5ccb8
* Fix problems with sub-selects in WINDOW definitions. Also rename-column ↵dan2019-01-23
| | | | | operations when the column being renamed appears in a WINDOW definition that is part of a VIEW or TRIGGER. FossilOrigin-Name: 0387cb3add992b2028efe4f2100188d8f9fdfdcb233329857aa4b46a293cfc97
* Fix a problem with using ALTER TABLE to rename a table or column when thedan2019-01-19
| | | | | | database schema contains a trigger or view that itself contains an expression "<column> AND 0". FossilOrigin-Name: 908ff7fffa302255a74e2334ca3a1779ed43acb0268fce5a83a56fd16794dc88
* Fix a failure in sqlite3ExprCompare()drh2019-01-17
| | | FossilOrigin-Name: 835e2cc55feea2f2426c99816c27f9c35d2fd4cdd9bf1c7f46f889ecfd222778
* Fix a problem with ALTER TABLE and vector assignments in UPDATE statementsdan2019-01-15
| | | | | within triggers. FossilOrigin-Name: cc6cd7531fee39b4c2a9f522f1089c1d79254a9e25acae59468322031f94c25a
* The keywords TRUE and FALSE should only act as boolean literal values ifdrh2019-01-11
| | | | | unquoted. FossilOrigin-Name: 5547f39de993c708f72301ef25df190a2f007e0c4253799bdd9e86bb1ae41777
* Add the exprNodeCopy() routine that will safely memcpy() an Expr node thatdrh2019-01-05
| | | | | might be a size-reduced node. FossilOrigin-Name: a874c649960ba2e2b2fd380d08c02a45884a1060d3922be8847729008ca6766e
* Fix harmless compiler warnings.drh2018-12-31
| | | FossilOrigin-Name: b57c545a384ab5d62becf3164945b32b1e108b2fb4c8dbd939a1706c2079e18b
* Merge enhancements and bug fixes from trunk.drh2018-12-31
|\ | | | | FossilOrigin-Name: 9fb646f29c05bca5f677a2c7c4f45c36bfe0a0c6a88cb7968b4a0459bdd63bb2
| * A new implementation of sqlite3VdbeMakeLabel() is faster and makes fewerdrh2018-12-29
| | | | | | | | | | | | | | | | | | memory allocations by deferring memory allocation until sqlite3VdbeResolveLabel() is called, at which point the code generator has a better idea of how big the relocation table needs to be. The sqlite3VdbeMakeLabel() routine now takes a Parse* parameter instead of Vdbe*. FossilOrigin-Name: 4a0929ac76d8aa5dd65eac3b83d6bbf41e505e01d175ca0fb2b19ba02d439415
* | Improvements to EXPLAIN QUERY PLAN formatting. The MULTI-INDEX OR now showsdrh2018-12-24
| | | | | | | | | | | | a separate "INDEX" subtree for each index. SCALAR SUBQUERY entries provide a subquery number that is related back to the .selecttrace output. FossilOrigin-Name: 7153552bac51295c56a1c42ca79d57195851e232509f9e9610375692f48c7e86
* | Do not generate subroutines for non-static SELECT and EXISTS expressions.drh2018-12-24
| | | | | | | | | | | | Fix up some test cases to account for the minor changes in EXPLAIN QUERY PLAN output. FossilOrigin-Name: 06de44ec9e173992ca9afb89dd2b4e40d2a7e35512c7959603cdceb606f5dfbd
* | Prevent the use of subroutines to implement the RHS of IN operators withindrh2018-12-24
| | | | | | | | | | CHECK constraints. FossilOrigin-Name: 6b24d3fb94e787d25e49501714780dfb0c0c99077102056aa68445f4808cdd57
* | Experimental code that tries to put the computation of subqueries inside adrh2018-12-24
|/ | | | | | subroutine, and reuse that subroutine if the same subquery is evaluated more than once. Current code does not work for CHECK constraints. FossilOrigin-Name: 6c44838adbe5dc482bc010e91a6dd7a0f777c989f443dd600740d2c783208e0d
* Split the code generation for the RHS of IN operators and for SELECT anddrh2018-12-23
| | | | | | | EXISTS expressions into two separate subroutines, because there is now little commonality between those to functions. This is intended to help make the code easier to read and maintain. FossilOrigin-Name: 2b6494b1509f0d0189f98aa34c990eee99c775ff57826e79b2c5b0a12b4c97ad
* Do not all REPLACE to sneak a NULL value into a NOT NULL column. Detect thatdrh2018-12-22
| | | | | situation and ABORT instead. Fix for ticket [e6f1f2e34dceeb1ed61531c7e98]. FossilOrigin-Name: db8d1d12f5c1673404b2afb5426d5ea3afe3b69d01f8f2bc47ffdf70684fdf24
* Fix a segfault caused by using the RAISE function incorrectly (library nowdan2018-12-20
| | | | | returns an error instead of crashing). FossilOrigin-Name: ddf06db702761d663119d508afe21d7dfebe963d576bb42fc2f2024205ab86f8
* Fix another problem found by Matthew Denton's new fuzzer.drh2018-12-12
| | | FossilOrigin-Name: 2b690dbdffe144bd69ca0aa291c230faf3d9d73f7a2985d50f016fe54003f9a9
* Remove an ALWAYS() from a branch that is not always taken. The test casedrh2018-12-12
| | | | | found by OSSFuzz has been added to TH3. FossilOrigin-Name: 5c7dab85535ac42c021977dbd4a39cef5a72e3d9dccff1c5ca5570a1780516cd
* OSSFuzz found a case where an assert() inside sqlite3ExprCompare() can bedrh2018-12-12
| | | | | true. Test case added to TH3. FossilOrigin-Name: 23b62fb160d86dc9d9073bcc714601f5b7695f96abd893eafecf4b2e565b87f2
* Do not use a partial index as a table scan in an IN operator.drh2018-12-08
| | | | | Fix for ticket [1d958d90596593a77420e59]. FossilOrigin-Name: 15bc915dd7ae25bfdfbe357c3792db3639799e4d121c6b5b24297af2d6d7129e
* Performance improvement: Avoid using sqlite3WalkerSelectExpr()drh2018-12-06
| | | | | | and sqlite3WalkerSelectFrom() twice, so that the compiler will in-line their implementation. FossilOrigin-Name: 2b9258b8b0342330ebe8c22b59ec276fd042a05547d15b24fdf29e16280868de
* Fix the sqlite3ExprDup() routine so that it makes complete duplications ofdrh2018-12-06
| | | | | subqueries containing window functions. FossilOrigin-Name: 940174543e87184a0278fcd02e8a096a11510174d9c1d65d21878819790ddaff
* The sqlite3_normalized_sql() interface should not be transforming quoteddrh2018-12-05
| | | | | | identifier names into wildcards. Fix this, and at the same time simplify the code substantially. FossilOrigin-Name: e8540377ec66fa5f9ae3c93bedb5c094057698199c37fc211f7ea95429e815e4
* Deploy the sqlite3Strlen30NN() function (argument guaranteed to be non-NULL) fordrh2018-10-31
| | | | | a small performance improvement. FossilOrigin-Name: 4a6ad5190b62020d97a7de02c801544f20b7b98145ceff14af1f2834d3057f9c
* Add the sqlite3_normalized_sql() API.mistachkin2018-10-29
| | | FossilOrigin-Name: 592b66e8058dd03a056a036e2606247c9efdb06d15eebe9bcc455f7f55e30ae6
* Slightly smaller and faster alternative to [507d892c3a40a0bacbd47] thatdrh2018-09-24
| | | | | | fixes a problem with views that use window function as part of complex expressions. FossilOrigin-Name: d7c816ae15f05f21b9b213161e1044aaefc56f17e7bc4b7b551a9e04efc05855
* Fix a problem with views that use window functions as part of complex ↵dan2018-09-24
| | | | | expressions. FossilOrigin-Name: 507d892c3a40a0bacbd47ed3c4fe2d8925a82716ae08da8401750a42782ba454
* Fix a faulty assert() in the validation logic for the LEFT JOIN strengthdrh2018-09-23
| | | | | reduction optimization. Problem found by OSSFuzz. FossilOrigin-Name: 2fd62fccd13e326dbd7dd730112542c6faa56e466bf4f7b8e22ced543031280c
* Combine the Expr.pTab and Expr.pWin fields into a union named "y". Add a newdrh2018-09-20
| | | | | | | EP_WinFunc property that is only true if Expr.y.pWin is a valid pointer. This reduces the size of the Expr object by 8 bytes, reduces the overall amount of code, and shaves over 1 million cycles off of the speed test. FossilOrigin-Name: ad130bb86e74e6ce165fdbdce3a19699510f0e62071c1c7923b5a4538d888c7c
* Merge fixes and enhancements from trunk.drh2018-09-01
|\ | | | | FossilOrigin-Name: 589186c083ff3af8d5a6d5ad34e1cefea57806ebf3831ea3bf5a48ef1e173140
| * Merge enhancements from trunk.drh2018-08-23
| |\ | | | | | | FossilOrigin-Name: c446c8841192054c97ba5003fb6185b135a687b36c10fe0986e627282955520a
| * | Experimental change that allows overloaded functions to be analyzed bydrh2018-05-26
| | | | | | | | | | | | | | | the xBestIndex method and used by the xFilter method of a virtual table. FossilOrigin-Name: a353b1d7ee6c5989ba1b98a3990c9a4c2ff39ae66572fd1200606e8ef585e5fa
* | | Extend RENAME TABLE to edit triggers and views. Still buggy.dan2018-08-29
| | | | | | | | | FossilOrigin-Name: 01308bae3acf33f78b5bb90892085eab340df093aafc17e6ccf6a7d6cf324897
* | | Rename internal function sqlite3RenameToken() to sqlite3RenameTokenMap() anddan2018-08-21
| | | | | | | | | | | | | | | sqlite3MoveRenameToken() to sqlite3RenameTokenRemap(). FossilOrigin-Name: b9ae9a0a188b82d7066f6ef7d21592889df0a61559e9a0e01819e9d5a92c3f36
* | | Merge trunk fixes.drh2018-08-18
|\ \ \ | | |/ | |/| FossilOrigin-Name: ccad277927baa2c36d0b5a03832dc51d9a7f3071587f0da0f2c1b44885c82e8d
| * | Fix EXPLAIN QUERY PLAN so that it describes IN operators implemented usingdrh2018-08-16
| | | | | | | | | | | | | | | a ROWID lookup. FossilOrigin-Name: 60045fbf52162f15f2e18a4e392e80fab19bdbce242728b5e62b0894eac49dfd
* | | (no comment)dan2018-08-15
|/ / | | | | FossilOrigin-Name: e272dc2b1c0edab59a40f32c77c81a3e636937280524161eff5669cb0046ad84
* | When a column must be a constant due to WHERE clause and the value of thatdrh2018-08-09
| | | | | | | | | | column is being coded as a constant, make sure the affinity is correct. FossilOrigin-Name: 7404ea83168e6c739ebe8fc5d65bbf0265432ccb35b3418bb0381d74362f7527
* | Remove the column-cache from the code generator. The column-cache has beendrh2018-08-04
|\ \ | | | | | | | | | | | | | | | | | | | | | a persistent source of bugs for years and with recent improvements in the performance of OP_Column, it no longer provides a benefit. After the column cache is removed, the binary is almost 2KB smaller and the speed-check.sh performance test is over 3 million cycles faster. FossilOrigin-Name: cdff3af7bedc5ebea04bd9b5e2112d3db451a475c18c9a9ebd45f6f3a89a43cb
| * | Fix comments that were made obsolete by the removal of the column cache.drh2018-08-04
| | | | | | | | | FossilOrigin-Name: 2041231d56c7b02b785015ef4d1af260d61326eab1b2a304c17faa3e33f76441
| * | Further logic simplifications that flow out of the omission of the column cache.drh2018-08-04
| | | | | | | | | FossilOrigin-Name: 7d9072b027cc28dd8ecf5e2686d821017997445c15124eebe2839984622af4db