aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
Commit message (Collapse)AuthorAge
...
* Code simplifications. New test cases.drh2018-02-26
| | | FossilOrigin-Name: 57508518ef9d003d259ba98dcc32e5104aca26731a7161808741fe10bc0830d0
* Get the "DEFAULT true" and "DEFAULT false" phrases working correctly indrh2018-02-26
| | | | | CREATE TABLE. FossilOrigin-Name: 8002f87d96b3f885cd208e7d204907a33ba60c4057ce2338b71e2de41215b0e5
* Refactor for correct NULL handling in the IS TRUE, IS FALSE, IS NOT TRUE,drh2018-02-26
| | | | | and IS NOT FALSE operators. FossilOrigin-Name: cf2abd59be9971a55bd3d6c5df374c6aaa23bf81819482b42f01ee2484dcd739
* Experimental implementation of IS TRUE and IS FALSE operators. All TRUE anddrh2018-02-26
| | | | | FALSE to act like constants if the names do not resolve to a column name. FossilOrigin-Name: 40314bc999af08ab10e654241208842b4bb95b19858d11249444372250ea4160
* Use a loop to avoid recursion in the heightOfSelect() function.dan2018-01-18
| | | FossilOrigin-Name: 86de43595cb2ecebd680fe654affcfb9fbcfff6575c893293ae298124a357bfe
* Avoid excess stack usage when a VALUES clause with lots of rows occursdrh2018-01-14
| | | | | within a scalar expression. This fixes a problem discovered by OSSFuzz. FossilOrigin-Name: a4fa0581ba7cfd45fabe0198f55b3c2c8ee3ecfd2825aeed91116f44e77d760b
* Change the function name to sqlite_unsupported_offset(X). Only enable thedrh2017-12-29
| | | | | | function if compiled with -DSQLITE_ENABLE_OFFSET_SQL_FUNC. The makefiles add that definition to shell builds. FossilOrigin-Name: 7a7f826e324b1a2c332e2f1d0740fd0babffcaca6275a798572f02ad367b99ab
* Enhance location(X) so that it works with indexes and WITHOUT ROWID tables.drh2017-12-29
| | | | | | | The function might return an offset to the main table or to an index, depending on whether the column X would be loaded from the main table or from the index. FossilOrigin-Name: dd94d6a880dfec4bddd247239b815b84964f804d24841e25f33f1d46a4b5274d
* Merge recent enhancements from trunk.drh2017-12-29
|\ | | | | FossilOrigin-Name: 6251e438f2a76170fd1e95aa512a46086ed88ab93b9b97a1dba97c4558689305
| * Add and use the internal sqlite3DbSpanDup() interface.drh2017-12-27
| | | | | | FossilOrigin-Name: a8e1545cb7aacb6a26a8c92a3ad4a3d584d150c3a00d2828c8adbb1ee19fcb6d
| * Remove the ExprSpan object. Instead, keep track of the test of subphrases indrh2017-12-24
| | | | | | | | | | the parse using the "scanpt" non-terminal. FossilOrigin-Name: 3eab7bdc44e0878b83dc86f27058a40c2ffafeacadc566f03693f6dc7e40a504
* | Add an experimental location(X) SQL function that attempt to return thedrh2017-12-16
|/ | | | | | | location of the payload within the database for the record that contains column X. location(X) returns NULL if X is not an ordinary table column or if SQLite cannot figure out the location because it is using a covering index. FossilOrigin-Name: 51be9558164301c5dd4df23ab8b3e67de0b522f8d36f79f3d84d45d3dc2a83a4
* Clarification of comments on sqlite3FindInIndex(). No changes to code.drh2017-11-17
| | | FossilOrigin-Name: 071cabd23cd010180711a138f891a0e358031dd128532def4f62c5764651bace
* In the parse tree, combine LIMIT and OFFSET into a single expression rooteddrh2017-11-14
| | | | | | on a TK_LIMIT node, for a small code size reduction and performance increase, and a reduction in code complexity. FossilOrigin-Name: 3925facd942c9df663f9b29b1e6f94f6be14af8c2b99eb691bfc836b4c220826
* Reactivate query flattening when the result set of the outer query hasdrh2017-10-28
| | | | | | | | | no function calls or subqueries. This is a partial reversal of check-in [c9104b59]. Co-routines are still preferred if the outer query has a complex result set, but for simple results sets, query flattening is used. Check-in [4464f40ccd7] is completely backed out due to this change. FossilOrigin-Name: d17ef7d153058f7332b3fec421ade42c67e26b06f36fc1629e6799537a5afc5f
* Avoid passing a NULL value as the second argument to memcpy().dan2017-10-23
| | | FossilOrigin-Name: 58e5bb491bc0e28412ca188ba8fbe94adc67b5b1e9d7c112c36011400528d577
* Fix unreachable conditionals and revise a testcase that was made obsolete bydrh2017-09-30
| | | | | the changes on this branch. FossilOrigin-Name: 71f0adf7ca6824c3aba69104b9976dbb71b377474529e1a36220b4804293501e
* Add new routines to simplify dealing with collating sequences in expressions:drh2017-09-28
| | | | | sqlite3ExprNNCollSeq() and sqlite3ExprCollSeqMatch(). FossilOrigin-Name: 490e488ea963fe725b16212822c8608f2b6abce688931b611446bc2cbfe6b87c
* Improved resolution of large integer values in "CAST(x AS NUMERIC)".drh2017-09-20
| | | FossilOrigin-Name: 7f2bd4ff45fba29528c18cac6da983bd9b164303525d3965056f5b40f85dc83f
* Do not make the assumption (as check-in [4da49a95c0f07] incorrectly did) thatdrh2017-09-17
| | | | | | | the ExprList returned by sqlite3ExprListDup() would never be passed into sqlite3ExprListAppend(). Include a new test case that shows this sometimes does happen. FossilOrigin-Name: 29227d00a9999f0f28a0b55ef70183799a667c3b9d81d2e5ac0ab1840bef98b1
* Improved the header-comment documentation on sqlite3ExprCodeExprList().drh2017-09-15
| | | | | No changes to code. FossilOrigin-Name: 5dc3ecb5f67968545fb35ceed61ad625e069c4e744c5c3ebaea65e2fee347a5f
* Optimization to the ExprList object to make it slightly smaller and faster.drh2017-09-15
| | | FossilOrigin-Name: 4da49a95c0f07ed7790169e8833c3e2dacda504a3d997f567572020148abe30b
* Proposed fix for ticket [b899b6042f97f5]drh2017-09-04
| | | FossilOrigin-Name: c7f9f47b239fdd99b555fb0a31eb82b22dbe6c821f1612d67a0d6a822288d9f7
* Remove an unnecessary conditional.drh2017-08-21
| | | FossilOrigin-Name: 56d19f9fd7b01d4ed5c3e7309977b43fedffee168c9760d3e3b7e885790f781e
* Sometimes a TK_COLUMN Expr node can have Expr.pTab==0 if it is a referencedrh2017-08-14
| | | | | | to an expression column in an index on and expression. Fix for ticket [aa98619ad08ddcab]. FossilOrigin-Name: d0da791ba0edfb65186459345e43500d8364a086a5a1651d828fecc1a1dd1edb
* Combine the Parse.ckBase and Parse.iSelfTab fields into just Parse.iSelfTab.drh2017-07-20
| | | | | | | This fixes a problem with date/time functions in check-constraints. Add some test cases for date/time functions in index expressions and check constraints. FossilOrigin-Name: 22eda0985ecd1f456c073e6ad735a8417f3ff1fb6aaad1640e1cec01e50c51d8
* Allow indexes to be created on date/time functions as long as the 'now'drh2017-07-19
| | | | | date and the 'localtime' and 'utc' modifiers are not used. FossilOrigin-Name: 0a5e1c04d9d07bb7fd6546a9ddac1bf42b19ea19c2b79570aea6cd4226887a27
* Fix a register allocation problem in PRAGMA integrity_check that causeddrh2017-07-15
| | | | | | | | the same register to be used for two different purposes on the first ATTACHed database if the schema for the ATTACHed database was noticable more complex than the schema for the first database. Fix for ticket [a4e06e75a9ab61a1]. FossilOrigin-Name: 253945d480b052bfe311888022b5eb0be91c8c80cda05036e58207d57520262c
* Exploit the fact that Expr.pRight and Expr.x are never used at the same timedrh2017-07-07
| | | | | for a small performance gain. FossilOrigin-Name: aacbb9a461fdb34c7f9c8ce348e44c3e96c93334f210d438d92bfac1794dc686
* More aggressive use of EP_Leaf on expression nodes, to help prune searches.drh2017-07-07
| | | FossilOrigin-Name: c1a1d68c8219c8072e60af5c46a30849ae9a04fa1a6b2a8b22b82fec069d691d
* Fix the exprCompareVariable() routine so that it works for non-UTF8 text.drh2017-06-29
| | | FossilOrigin-Name: 25acd9658be792d686b3ebfaa8c3692f9830e043538ed0afecf97110a07758a4
* Alternative implementation of exprCompareVariable(). Need to run tests ondrh2017-06-28
| | | | | both this branch and the original to see which one to go with. FossilOrigin-Name: b959c6297c151150ea2dca24aa1f68f3bd76dd6620eb6c03f8dfa59fdd5c13b2
* Consider the values bound to SQL variables when determining whether or not adan2017-06-24
| | | | | partial index may be used. FossilOrigin-Name: 7b59c353b805c64689b4ae9df347705acbb5f116346ad77af8ce087da7893747
* Avoid unnecessary memory zeroing during expression list allocation.drh2017-05-31
| | | FossilOrigin-Name: de28e6514a42438411e2c9d833ba660108128ca86d0b90f32925fb73195f4862
* Optimizations to the Walker object and its methods to make the code a littledrh2017-05-29
| | | | | smaller and to help it run a little faster. FossilOrigin-Name: 6854a34ed708259f2280f7ee56cec09f7fc99810dc739dc2814ddeae286aa2c4
* The TK_IF_NULL_ROW expression node must be treated as a variable thatdrh2017-05-25
| | | | | | references the table Expr.iTable. Proposed fix for ticket [7fde638e94287d2c]. FossilOrigin-Name: 77fc23013cebc7797985864b91d78db5d0e2469511732044ebfaf02b891c979a
* Fix the build so that it works again with SQLITE_OMIT_SUBQUERY.drh2017-05-15
| | | FossilOrigin-Name: bb0d9281588b8cc24bf2f1f10d0c56277004226adaa2ce5037782503b283b45d
* Fix an obscure assertion fault that can follow an OOM. The problemdrh2017-05-06
| | | | | was introduced by check-in [a1cf44763277b6c7]. FossilOrigin-Name: 04e7e5650efffdce759b46999beb67c250af6cf394a7779ab861f210a84c134d
* Additional comments on the sqlite3ExprIsConstantOrGroupBy() routine. Nodrh2017-05-02
| | | | | code changes. FossilOrigin-Name: 8424492eac506866d2918e5fe03c8f65fef960215d56012a3b52ed42789ed35a
* Automatically transfer terms from the HAVING clause to the WHERE clause of andan2017-04-29
| | | | | | aggregate query in cases where the result of evaluating the term depends only one one or more of the GROUP BY expressions (and on no other inputs). FossilOrigin-Name: 5375a3ce56f1d993b13b469fe33ec7679948f53940f62a15ddbaeb8aaa26a22c
* Add the TK_IF_NULL_ROW opcode to deal with non-NULL result columns in thedrh2017-04-14
| | | | | result set of a view or subquery on the RHS of a LEFT JOIN that gets flattened. FossilOrigin-Name: 3a5860d86fadcf924316707918bf283d26c53b1473e5e67f5cff59d18c2a7742
* Make USE_FULLWARN=1 the default for MSVC and fix harmless compiler warnings.mistachkin2017-04-14
| | | FossilOrigin-Name: 6bf673767b8e5cedef1acff795cbe524fab8db2525c06424db4e038934a33936
* Fix a segfault that could occur if an indexed expression was used in adan2017-04-11
| | | | | comparison operation within the result-set of a SELECT statement. FossilOrigin-Name: d6bb7c42ff6309ce168ccdcf03b4cdabfccfc9e2a911d254ac7dc4fea4aa2bc1
* Proof of concept for the ability to use the expression columns in an indexdrh2017-04-07
| | | | | | on expressions in place of equivalent expressions in the result set or in the WHERE clause. This check-in compiles but is mostly untested. FossilOrigin-Name: a52ef2ad7c0e14b78b801f16a1f6ea8d8fa9ae5d7d810e18dd24c600b662a312
* Split off sqlite3DbFreeNN() from sqlite3DbFree() and use it in cases wheredrh2017-04-05
| | | | | we know that the argument to be freed is never NULL. FossilOrigin-Name: ad90e8bb5e47945607c8fb47b6ade8cfc52a9b684805cc40132629be0ecc14cc
* Save a few bytes and a few CPU cycles in sqlite3ExprListDelete() routine.drh2017-04-05
| | | FossilOrigin-Name: 9e6c939144a129b36bb119120442a4a021e00187783da211315d4bb13acd7c3a
* Remove a conditional made unreachable by the previous ExprList enhancement.drh2017-04-05
| | | FossilOrigin-Name: a1cf44763277b6c745b5b5509ca9129b6c3231608b4d1c8aec2815b64b5a2a07
* Combine the ExprList_item objects and the ExprList wrapper into a singledrh2017-04-05
| | | | | memory allocation, for improved performance and reduced footprint. FossilOrigin-Name: 2b6560ad88b92820c383bcdc1e30c06f8b081ef7c6d9b1af71d2bb76c83e35cd
* Fix a possible NULL pointer dereference in following an OOM errordrh2017-03-12
| | | | | in sqlite3ExprIsInteger(). Problem found by OSS-Fuzz. FossilOrigin-Name: 5ec655e8e817c1ed3bfb2e576745a7cef441494ad7baf1bf9f8895e98ac19c5a
* Remove an obsolete assert() in the IN operator code generation.drh2017-03-12
| | | FossilOrigin-Name: 18bf6aca2ac86478fd12d5020f3a41cfd2bd2dc3defe2298411f79ad308a6f73