aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
Commit message (Collapse)AuthorAge
...
* Avoid a NULL pointer deref in codeAllEqualityConstraints() following an OOM.drh2016-09-06
| | | FossilOrigin-Name: c6e528c1c0f17c69c7745b018afa36694118258f
* Simplify the fix in commit [7d9bd22c].dan2016-09-06
| | | FossilOrigin-Name: bd5a342008575bf66f63881a0bebf43741f2a67b
* Fix the header comment on codeEqualityTerm().drh2016-09-06
| | | FossilOrigin-Name: b7e710e406ed22bcc316099b5e200b6bb2d9c872
* Fix a problem handling (a, b) IN (SELECT ...) expressions when there is an ↵dan2016-09-06
| | | | | index on just one of "a" or "b". FossilOrigin-Name: 231c72d9f651f3a70d5c8af080f3ff181b89d939
* Consider the affinity of "b" when using an "a IN (SELECT b ...)" expression ↵dan2016-09-03
| | | | | with an index on "a". Fix for [199df416]. FossilOrigin-Name: f5e49855412e389a8a410db5d7ffb2e3634c5fa3
* Fix a post-OOM crash in updateRangeAffinityStr(). Add several ALWAYS()drh2016-08-26
| | | | | macros on unreachable branches. FossilOrigin-Name: 87d40195ae5cc2abd9bae45073a615db81263285
* Fix a problem with affinity changes and vector range comparisons.dan2016-08-26
| | | FossilOrigin-Name: b34413ac7e34369b4420e57b0132249dca68a7b0
* Fix a buffer overrun in the code for handling IN(...) operators when the LHS ↵dan2016-08-24
| | | | | of the operator contains indexed columns or expressions. FossilOrigin-Name: f41a0391b732a8c4ad188163f34a0f4a22237bb5
* The previous OOM fix was bad. Back it out and replace it with a better one.drh2016-08-24
| | | FossilOrigin-Name: 1e3bc3698a4b779e6af8e3c727929c4dbddf3edb
* Change the way TK_SELECT_COLUMN is handled so that the subquery is onlydrh2016-08-20
| | | | | | | generated once even if part of the vector comparison is used for indexing and the other part is now. This change also is a pathway to vector assignment in UPDATE statements. FossilOrigin-Name: d8feea7dcde83179bff303072426561cfe825e58
* Fix an obsolete comment on codeEqualityTerm(). No changes to code.drh2016-08-19
| | | FossilOrigin-Name: d07be5afb0a915769382dfd815403f8832cb3eec
* Fix a SQL NULL handling bug in the vector IN operator code generation.drh2016-08-18
| | | FossilOrigin-Name: 936146b12e27784f15a68fe65732c6d92c3a12f3
* Fix some cases involving row values and virtual tables.dan2016-08-08
| | | FossilOrigin-Name: 156a41f30a0afd9a70e6c26470dcc468a11bd402
* Fix the EXPLAIN QUERY PLAN output for row value range constaints that use an ↵dan2016-08-08
| | | | | index. FossilOrigin-Name: bb60651163553c5e46bf7b2805490570cea647b8
* Fix SQLITE_OMIT_SUBQUERY builds.dan2016-08-02
| | | FossilOrigin-Name: 339f85f414a484e44d2502d1ff7281caf9b7c838
* Fix a problem with vector range constraints involving the rowid column. And ↵dan2016-08-01
| | | | | other issues. FossilOrigin-Name: 3ef75d45ebcd8ede91596d69e55fe7d685008a60
* Remove the EP_Vector expression flag.dan2016-07-30
| | | FossilOrigin-Name: e9d9c6d46b46160fad6aa6e3441a65a09157515f
* Fix some issues with vector range constraints and the column cache. Also ↵dan2016-07-29
| | | | | vector range constraints and rowid columns. FossilOrigin-Name: 42607366bfc2dceb1013797a973b3b8df75dcb4d
* Change the way "(a, b) = (SELECT *)" expressions are handled in where.c if ↵dan2016-07-29
| | | | | there is an index on one of the columns only. FossilOrigin-Name: 4dfebff2924f46284d5b9cda69175f79b29d6028
* Merge latest trunk changes into this branch.dan2016-07-26
|\ | | | | FossilOrigin-Name: d4f3d52c5a11fc7ad7e8cad76361edbcef13a12f
| * Make sure affinity is applied correctly on lower-bound range constraintsdrh2016-07-26
| | | | | | | | | | in the min() optimization. Fix for ticket [a0bac8b3c3d1bb]. FossilOrigin-Name: b819bace9c2a0b0159122b26db96a8f50a6f0eac
* | Fix where.c handling of "IN (SELECT ...)" expressions when the SELECT ↵dan2016-07-26
| | | | | | | | | | returns more than one result column. Also error handling for other row value constructor cases. FossilOrigin-Name: 061b8006034f06a0311b4304c8b14d2c8b0153df
* | Allow vector IN(SELECT ...) expressions to use an index if either all the ↵dan2016-07-23
| | | | | | | | | | indexed columns are declared NOT NULL or if there is no difference between the expression evaluating to 0 and NULL (as in a WHERE clause). FossilOrigin-Name: e2fd6f49b1b145bec09c581cc982b89429643ae9
* | Merge comment typo fixes from trunk.mistachkin2016-07-10
|\| | | | | FossilOrigin-Name: 728c5aa436a5f55c86b019c415a2b71d1b0a8fd6
| * Fix typos in comments. No changes to code.mistachkin2016-07-10
| | | | | | FossilOrigin-Name: 77c692a6704cd877ba35d0afb774ab9b46364d59
* | Add some support for using row value constructors in certain parts of SQL ↵dan2016-07-09
|/ | | | | expressions. There are many bugs on this branch. FossilOrigin-Name: b2204215b231202aef7a218411cc2ddaecf28f35
* Allow LIKE operators that appear in a WHERE clause to be included in the ↵dan2016-06-20
| | | | | cursor-hint for a cursor on the rhs of a LEFT JOIN. FossilOrigin-Name: 7455d932f5079ffe40462a8c119fc22b8a9bcbcc
* Include WHERE terms in the cursor-hint passed to a cursor opened for the rhs ↵dan2016-06-17
| | | | | of a LEFT JOIN iff we can be sure that those terms will not evaluate to true if the LEFT JOIN generates a row of NULLs. FossilOrigin-Name: 998095aba01b75f685ed981b377e1dfe650d9bbf
* If a table is on the rhs of a LEFT JOIN, include only terms from the joins ↵dan2016-06-17
| | | | | ON(...) clause in the cursor-hint passed via OP_CursorHint. FossilOrigin-Name: 2a2346b04235c6d0b7a8e64c92ee31018285c29f
* Add a new OP_SeekRowid opcode, that combines the functions of OP_MustBeIntdrh2016-05-26
| | | | | and OP_NotExists. This makes the code slightly smaller and faster. FossilOrigin-Name: ffe80a1bfa014943a614fc6993c1749b9bfec4c1
* Clean up the WHERE_* macros used for the wctrlFlags parameter on the drh2016-05-19
| | | | | sqlite3WhereBegin() interface, freeing up some bits to be used for other things. FossilOrigin-Name: d01305841da94b2d47e32744802f69525bf590df
* Omit the unnecessary WHERE_REOPEN_IDX flag in the WHERE interface.drh2016-05-09
| | | FossilOrigin-Name: da94a6e0ebacad8f235dcd653a25474327f26137
* Simplification to the logic used to decide between OP_Seek and OP_NotExists.drh2016-05-06
| | | | | Use OP_NotExists for both DELETE and UPDATE. FossilOrigin-Name: 3a695263183303e3f64eb2320752d0fdef53eaf2
* In the WHERE generator, when building code for a DELETE operation, make suredrh2016-05-06
| | | | | | that seeks to the main table are not deferred. This is a better fix for the [16c9801ceba49] bug than the previous. FossilOrigin-Name: 150dd09ebd7b17234a79e1811a0fae8b0a7a40d5
* Improvements to the way the LIKE optimization is implemented, resulting indrh2016-05-02
| | | | | slightly smaller and faster code that is easier to test. FossilOrigin-Name: 54c63b329288729031f45b7778752552cd90e226
* Fix a problem in the code generator for joins on virtual tables where thedrh2016-04-09
| | | | | outer loop of the join uses the IN operator. FossilOrigin-Name: 6c56b3a04778bc62ca50307ad838dd301cd91ac2
* Add a NEVER() to the code generator. Change the parameter name "mExtra"drh2016-03-08
| | | | | to "mPrereq" in the query planner, to more closely reflect its meaning. FossilOrigin-Name: 721ae51e443647291f3a8f7f2128aa410fee2682
* Changes so that some assert()s in the virtual table query planner aredrh2016-03-08
| | | | | correct even following an OOM error. FossilOrigin-Name: 9805f6f85211dcb5a0ab3ceca204e6f2e48530ea
* Avoid a NULL pointer dereference following an OOM while generating codedrh2016-03-07
| | | | | for IN operators on virtual tables. FossilOrigin-Name: c924008692e35f1f5144830af08d6de051dd21dd
* Allow the left-hand side of IN operators on virtual tables to have thedrh2016-03-02
| | | | | aConstraintUsage[].omit flag clear. FossilOrigin-Name: 1622623cbbfc4325c53d731aba78ca9c382ec612
* Clearer presentation of the logic. No functional changes.drh2016-02-22
| | | FossilOrigin-Name: a3dcf6db76cc09bdfedb1bbeba3b359b77762cbe
* Avoid an unnecessary seek operation on some corner-case skip-scans.drh2016-02-22
| | | FossilOrigin-Name: 38e837e605076124b73235e1fd832838d9545cb2
* Remove unnecessary sets of db->mallocFailed.drh2016-02-04
| | | FossilOrigin-Name: b787165b25a240fd5b4a5c7f73b395f30213a1d7
* Fix a problem causing the OR/covering-index optimization to be disabled if ↵dan2016-02-01
| | | | | compile time parameter SQLITE_MAX_ATTACHED were set to greater than 30. FossilOrigin-Name: a17712bf8d98dd485560f434a5350e6381cf1411
* Merge the implementation of OP_IdxRowid and OP_Seek so that OP_Seek no longerdrh2016-01-30
| | | | | | requires the rowid register and a separate OP_IdxRowid call. Shorter and faster prepared statements result. FossilOrigin-Name: 9bec50a1e7796a6e038db9b1cc7cc1e7e350bf74
* Simplification and size reduction to the printf logic. Remove the bFlagsdrh2016-01-30
| | | | | | parameter from sqlite3VXPrintf() and sqlite3XPrintf(). Use sqlite3XPrintf() instead of sqlite3_snprintf() for rendering P4 values in EXPLAIN output. FossilOrigin-Name: 0bdb41c45aa1cc8e5c136aaa6605d54b401483bd
* Change the P4_INTARRAY so that always begins with a length integer. Printdrh2016-01-30
| | | | | the content of the INTARRAY on EXPLAIN output. FossilOrigin-Name: 6c520d5726e80b4251338c43c405270d150ea81e
* Experimental attempt to make better use of covering indexes within OR queries.dan2016-01-29
| | | FossilOrigin-Name: a323ac3a9d42bd5cb38d724c7e1180584b91054c
* Avoid unnecessary WHERE clause term tests when coding a join where onedrh2016-01-29
| | | | | of the tables contains a OR constraint. FossilOrigin-Name: ab94603974a0ad5342e5aee27603162652e70492
* Use sqlite3VdbeAddOp4() rather than a separate sqlite3VdbeChangeP4() call, fordrh2016-01-16
| | | | | a slightly smaller and faster binary. FossilOrigin-Name: a4258cd4613c55acacb5c7b61faa3de7eb0759d2