aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
Commit message (Collapse)AuthorAge
* Fix a potential NULL pointer dereference following a syntax error.drh2015-03-22
| | | FossilOrigin-Name: 8d27e3e16a9be79fe227e833f4770ebe09a9d90b
* Fix a problem causing collation sequence names to be dequoted multiple times ↵dan2015-03-20
| | | | | under some circumstances. FossilOrigin-Name: eddc05e7bb31fae74daa86e0504a3478b99fa0f2
* Propagate COLLATE operators upward through function calls and CASE operations.drh2015-02-09
|\ | | | | | | | | | | | | And do not flatten an aggregate subquery into a query that uses other subqueries. Fixes for tickets [ca0d20b6cdddec5] and [2f7170d73bf9], respectively. FossilOrigin-Name: 24e78b8d65734a6a8ae21a20542cd1839e756fb1
| * Propagate the COLLATE operator upward through function calls.drh2015-02-09
| | | | | | | | | | Initial fix for ticket [ca0d20b6cdddec5e8]. FossilOrigin-Name: c053448a55f9d030e8ffe88cf4fc14ada7f6ec19
| * Disable the query flattener for aggregate subqueries if the parent querydrh2015-02-09
|/ | | | | | | uses other subqueries in its result set or WHERE clause or ORDER BY clause. Preliminary fix for ticket [2f7170d73bf9abf8]. However it still contains a defect similar to the COLLATE problem of [ca0d20b6cddd]. FossilOrigin-Name: 0b7d65e3fda676d193347cb782854c28a48252af
* Rename the internal "EP_Constant" bitmask to a less misleading "EP_ConstFunc".drh2015-02-09
| | | FossilOrigin-Name: 4ef7ceced2b0000d21f7f8014384c04a0e4661d3
* Fix a (almost always harmless) read past the end of a memory allocationdrh2015-01-27
| | | | | | | that comes about because the Expr.pTab field is checked on an EXPR_REDUCEDSIZE Expr object before checking the Expr.op field to know that the Expr.pTab field is meaningless. FossilOrigin-Name: e098de691002a78270540430b0df1e120582b53f
* Fix an assert() that may fail following an OOM error.dan2015-01-21
| | | FossilOrigin-Name: 5f592359d6d41708da3b3ac9d987a1631bfa3d88
* Fix three crash problems discovered by afl-fuzz.drh2015-01-09
| | | | | Ticket [a59ae93ee990a55]. FossilOrigin-Name: fe5788633131281a0f27c5b75993ce2ff958bfeb
* If a table is the right operand of a LEFT JOIN, then any column of thatdrh2014-12-04
| | | | | | table can be NULL even if that column as a NOT NULL constraint. Fix for ticket [6f2222d550f5b0ee7ed]. FossilOrigin-Name: 6f6fcbe4736b9468a495c684d5eebc8bfe5c566a
* Add new requirements marks associated with the file format documentation.drh2014-11-19
| | | | | No changes to code. FossilOrigin-Name: 6d00bcca6ed1903fb17275752cab71c14392355b
* Do not automatically remove the DISTINCT keyword from "a IN (SELECT DISTINCT ↵dan2014-11-14
| | | | | ...)" expressions. Fix for [db87229497]. FossilOrigin-Name: 55e453aadbb676dda07f0fa537d39ce184ef636c
* Enhance the automatic index logic so that it creates a partial index whendrh2014-10-24
| | | | | doing so gives the same answer for less work. FossilOrigin-Name: d95d0313c447f5baeabdb17284d8606331ab7d49
* Show the TK_DOT operator in the TreeView debugging output.drh2014-10-01
| | | | | No changes to production code. FossilOrigin-Name: 07c89940c49a5dca3205a4b6fa8290f23bcb6e10
* Remove the SQLITE_ENABLE_TREE_EXPLAIN compile-time option. Add alternativedrh2014-09-30
| | | | | | debugging display routines: sqlite3TreeViewExpr(), sqlite3TreeViewExprList(), and sqlite3TreeViewSelect(). FossilOrigin-Name: 4ff51325d6b41d0c59e303b573700ec80c51d216
* Do not allow parameters in a DEFAULT clause of a CREATE TABLE statement.drh2014-09-24
| | | | | Ticket [78c0c8c3c9f7c1]. FossilOrigin-Name: 1ad2bc1ed4c4ac81ac67a9660761f0eeb47c7fef
* Improved ".selecttrace" output.drh2014-09-21
| | | FossilOrigin-Name: c0b61f7092a7fd2c5f51db26ce7a7a5c75c227fe
* Fix the SELECTTRACE_ENABLE macro so that it doesn't cause problems fordrh2014-09-20
| | | | | testfixture. Add new SELECTTRACE() calls. FossilOrigin-Name: f1ba68f131d2f03e4a7bc50cde23a7609d384279
* Simplify the way the column cache is managed around OP_Move instructions.drh2014-09-12
| | | FossilOrigin-Name: 320556233e19cdd9d590a09655c3465754700d39
* Fix typos in comments. No code changes.peter.d.reid2014-09-06
| | | FossilOrigin-Name: e62aab5e9290503869e1f4d5e0fefd2b4dee0a69
* Avoid an unnecessary OP_Move operation for expression subqueries.drh2014-08-29
| | | FossilOrigin-Name: 462f42af52f146fd328ddcbbe78c8444ef7bd2c3
* Allow CAST expressions and unary "+" operators to be used in the DEFAULTdrh2014-08-25
| | | | | | | argument of an ALTER TABLE ADD COLUMN and to be understand on the RHS of range constraints interpreted by STAT3/4. This involves a rewrite of the implementation of the CAST operator. FossilOrigin-Name: 91d8a8d0b792ea5c4fe68fd9caaf3345eddea486
* A simpler fix for ticket [3a88d85f36704eebe1] - one that uses less code.drh2014-08-06
| | | | | | | The error message is not quite as good, but as this error has apparently not previously occurred in over 8 years of heavy use, that is not seen as a serious problem. FossilOrigin-Name: 0ad1ed8ef0b5fb5d8db44479373b2b93d8fcfd66
* Ensure that aggregate functions are not used when evaluating a defaultdrh2014-08-05
| | | | | | value for a table column. Candidate fix for ticket [3a88d85f36704eebe134f7]. FossilOrigin-Name: 29ba812825bf06ef230f2480bba0579653f0a52d
* Improved VdbeCoverage() macros. A few minor simplifications to generateddrh2014-08-05
| | | | | VDBE code. FossilOrigin-Name: 01f60027ad1841051fa493a646141445f8971357
* Further enhancements to IN-operator processing.drh2014-08-04
| | | FossilOrigin-Name: 7fdf26da1d2f40b80f9e44ff6f5af22ace8f95f3
* Refinements to the enhanced IN-operator logic.drh2014-08-04
| | | FossilOrigin-Name: 92ba2821468ecbfac2469161d81c873de67b2243
* Enhancements to the code generator for the IN operator that result in muchdrh2014-08-02
| | | | | | faster queries in some cases, for example when the RHS of the IN operator changes for each row of a large table scan. FossilOrigin-Name: 436e884215e2b33ca3fbb555362237b12827c07a
* A better comment on the generated code for the NULL-in-RHS-of-IN detectiondrh2014-08-01
| | | | | logic. FossilOrigin-Name: 9bc1c730a366e75b760b58e7a343d39165b2a469
* Improved detection and handling of NULL values on the RHS of a IN operator.drh2014-08-01
| | | FossilOrigin-Name: 468e730036edac22cfeb9ea3515aa16e6bcd6650
* Remove an unnecessary OP_Null in the IN-operator logic. Attempt to clarifydrh2014-08-01
| | | | | | comments explaining the IN-operator code, though it is not clear that the comments are correct even yet - more work to be done. FossilOrigin-Name: c11e55fabbc718cb324ecd3540453c25db98f50c
* The idea of coding IN operator with a short list on the RHS as an OR expressiondrh2014-08-01
| | | | | | | turns out to be helpful. If the list is of length 1 or 2, the OR expression is very slightly faster, but the ephemeral table approach is clearly better for all list lengths greater than 2. Better to keep the code simple. FossilOrigin-Name: e13175d3579e1045165bab091b3b28951d691704
* Begin making changes to the IN operator in an attempt to make it run fasterdrh2014-08-01
| | | | | and to make the code easier to understand. FossilOrigin-Name: ee0fd6aaf94cda1dce3fe752bfe3b0f83e0043f1
* Refactoring: Change "pIndex->onError!=OE_None" to use a macro:drh2014-07-31
| | | | | "IsUniqueIndex(pIndex)". Easier to understand that way. FossilOrigin-Name: e75b26ee357bb3d3c1a539b05d633ebf314726d7
* Omit a pointless OP_Null when processing a value-list RHS of an IN operatordrh2014-07-31
| | | | | where the LHS is a rowid. FossilOrigin-Name: 1361450a9dfe9476e8df98f370a3695752252245
* Deactivate the DISTINCT in a SELECT on the right-hand side of an IN operator,drh2014-07-31
| | | | | | since it should not make any difference in the output but dues consume extra memory and CPU time. FossilOrigin-Name: f4cb53651b1e352fae7378878b830a902bcd9248
* Remove a surplus function prototype. #ifdef code that is not used whendrh2014-07-23
| | | | | hex integers are omitted at compile time. FossilOrigin-Name: a5b383e077e4b277a65920f7cc202f32f07aa9ee
* Change the hex literal processing so that only the SQL parser understandsdrh2014-07-23
| | | | | | | hex literals. Casting and coercing string literals into numeric values does not understand hexadecimal integers. This preserves backwards compatibility. Also: Throw an error on any hex literal that is too big to fit into 64 bits. FossilOrigin-Name: 6c6f0de59bf96b79c8ace8c9bfe48c7a6a306a50
* Revise the affinity returned for expressions flagged as 'generic'. Fix for ↵mistachkin2014-06-26
| | | | | [9a8b09f8e6]. FossilOrigin-Name: 92f7ad43dbfe4e02490df2f932c3c74fb89064d6
* Remove the unused second argument from sqlite3ExprCachePop(). Add andrh2014-04-13
| | | | | ALWAYS() on an always-true conditional in sqlite3VdbeResolveLabel(). FossilOrigin-Name: ab23abf392175d3e256ff619b13abbbe732a49ed
* Merge trunk fixes for "x IN (?)" handling.drh2014-03-20
|\ | | | | FossilOrigin-Name: eca35871c34374ca9189c7c9b6d490ac3c30357f
| * Remove a testcase() that is now always true due to the "x IN (?)" optimization.drh2014-03-20
| | | | | | | | | | Add an ALWAYS() around a conditional in the parser that cannot be false. FossilOrigin-Name: d5a1530bdc7ace053d05d1a037551110021d3758
| * The "x IN (?)" optimization in check-ins [2ff3b25f40] and [e68b427afb] isdrh2014-03-20
| | | | | | | | | | | | | | | | | | | | incorrect, as demonstrated by the in4-5.1 test case in this check-in. The "COLLATE binary" that was being added to the RHS of IN was overriding the implicit collating sequence of the LHS. This change defines the EP_Generic expression node property that blocks all affinity or collating sequence information in the expression subtree and adds that property to the expression taken from RHS of the IN operator. FossilOrigin-Name: 2ea4a9f75f46eaa928ba17e9e91bc0432750d46d
| * Fix harmless compiler warnings.drh2014-03-20
| | | | | | FossilOrigin-Name: b1435f26b07b2208cfcca557f96342a5bd0d5328
* | First attempt at getting block-sort to work. This is an incremental check-in.drh2014-03-19
|/ | | | | There are many problems still to be worked out. FossilOrigin-Name: 59742dd4c5259883850044d0938248b009ebd045
* Add VdbeCoverage() and VdbeCoverageIf() macros for improved VDBE coveragedrh2014-02-18
| | | | | testing. FossilOrigin-Name: b92d31a97d5fe4606d9ae1393c7f3e052f46bf5a
* Improvements to "NOT IN (SELECT ...)" processing. Only test for NULL valuesdrh2014-02-18
| | | | | | | | on the RHS on the first iteration, then remember the result. There has been logic to do this for year, but it didn't work right and ended up repeating the NULL test on every iteration. This inefficiency was found using the VDBE coverage testing tools. FossilOrigin-Name: 915f6f1c7aab54583729e60bdc1565f25ecc6f74
* Add logic to do test coverage measurements on the VDBE code.drh2014-02-17
| | | FossilOrigin-Name: ce184c7bb16988641d37c908d9b3042456d4be3d
* Enhance the code generator for INSERT INTO ... SELECT so that the SELECTdrh2014-02-16
| | | | | | generates output directly in the registers that INSERT INTO will be using, in many cases, and OP_SCopy operations can thus be avoided. FossilOrigin-Name: aa2d8b0e8154dd2f5e2c837dc11ab362b083495b
* Use the WITH clause to help resolve names for SELECT statements on the leftdrh2014-02-09
| | | | | of a compound query. Proposed fix for ticket [31a19d11b97088296a]. FossilOrigin-Name: 67bfd59d9087a987f15f6148efa1ff104983e1fb