aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
Commit message (Collapse)AuthorAge
...
| * | Remove additional traces of the column cache.drh2018-08-04
| | | | | | | | | FossilOrigin-Name: db6052e9725368736abd19f14f97376582d35d07f543046d39991d767ed29851
| * | Completely remove the column cache logic, which has been a persistent sourcedrh2018-08-03
| | | | | | | | | | | | | | | | | | | | | of bugs for many years. We recent enhancements to the performance of the OP_Column opcode, the removing the column cache actually makes speed-check.sh run faster. It also saves about 1,800 bytes of code space. FossilOrigin-Name: 3f5f60cd7529330209027fdae8129cca420cec1050eae50a7750d0b715b56972
* | | Ensure that all expressions that are to be evaluated once at the start ofdrh2018-08-04
|/ / | | | | | | | | | | | | | | | | a prepared statement (the Parse.pConstExpr expressions) pass the sqlite3ExprIsConstantNotJoin() test. It is not sufficient to pass just the sqlite3ExprIsConstant() test as that would allow through column references that are bound to constants by the WHERE clause in the constant propagation optimization. This fixes a problem discovered by OSSFuzz. FossilOrigin-Name: 8bc7f84c39f913b0b0f5e9f5fd9d7dd8bda8422248c069712b6992c32c759a83
* | Do not allow a column reference that is converted into a constant by thedrh2018-07-28
| | | | | | | | | | | | | | WHERE-clause constant propagation optimization to be moved to the init-time constant expression list, as the table reference will not work there. This fixes a problem found by OSSFuzz. FossilOrigin-Name: d30b2a947313b146f29e2b53f0fd471409fda7938151241d3fb5863614f88999
* | Improvements to the parser to increase coverage. Fix the parser so thatdrh2018-07-27
| | | | | | | | | | | | at least one expresssion is required after PARTITION BY and within the list of expressions on VALUES(). FossilOrigin-Name: 02204f8b246c868846f39bd44f2e3bc0fab0275aa09ef3a0e5a8e3d58f484ca8
* | Performance improvement to sqlite3ExprCollSeq(). With this change, thedrh2018-07-27
| | | | | | | | | | performance of speed-check.sh is within 400,000 cycles of trunk. FossilOrigin-Name: a5f86f49b7d9e52546f234f7c3bcbac6b0f78aa55a71c44ca69e21bc31139f3e
* | Faster implementation of sqlite3IsBinary().drh2018-07-27
| | | | | | FossilOrigin-Name: be05d0db09f43cc3362c28273463d1d236af737a4f8a494cf1050da07ed0df47
* | Only run the constant propagation optimization on joins since that is thedrh2018-07-27
| | | | | | | | | | | | only scenario where it is useful. This saves prepare time for the common case of a simple query. FossilOrigin-Name: 598d608359005b13fa1151c6c69f2fd12ef3ab7f563a035fc4a6f3c569dc6c67
* | Constant propagation is now restricted to just the WHERE clause. Thedrh2018-07-27
| | | | | | | | | | | | | | mechanism is changed to take affinity and collation into account. This seems to give correct answers. But the search for constant propagation costs 4 million cycles in the speed test. FossilOrigin-Name: 82c67efb723dba387964f690cd459b420e59e3367d9589016597a76531596391
* | Generalize the constant propagation optimization so that it applies on everydrh2018-07-26
| | | | | | | | | | | | | | WHERE close, not just those that contain a subquery. This then demonstrates that the current implementation is inadequate since it does not take into account collating sequences. FossilOrigin-Name: 57eb2abd5b270d65be5e0f138f0d46899fa6091df3ba20b0ea7ef04244a15d48
* | Identify Select objects within a single statement using small sequentialdrh2018-07-10
| | | | | | | | | | | | integers rather than "0x%p". This is more readable and yields the same result on successive runs. FossilOrigin-Name: a7cdc5bc85e0edfcc38f920c2ce91599bcbfdb49522d88b08c64596546d13881
* | Fix a harmless warning about comment formatting in the previousdrh2018-07-10
| | | | | | | | | | | | check-in. Simplify the ORDER BY dereferencing logic so that it avoids unreachable branches. FossilOrigin-Name: 0f6ec605e131ab3d53b9df32af0a3207146a9abbd22dcabd6ef050b92f96735d
* | Assert that if two functions compare equal in every other way, then theydrh2018-07-10
| | | | | | | | | | | | must both have OVER clauses, or neither has an OVER clause. Use this fact to simplify expression comparison. FossilOrigin-Name: 52559ad58ce412af40f1f34e80bfe9fadc6a93f3ca0cfaf69f94d615bbb99831
* | Enhance the sqlite3ExprCompare() routine so that it knows to compare thedrh2018-07-10
| | | | | | | | | | OVER clause of window functions. FossilOrigin-Name: 0a7649afebc9349bf44a0e3588e81ab595ea85be1c70de08859ea76a7b271f62
* | Omit all window-function related code when building with SQLITE_OMIT_WINDOWFUNC.dan2018-06-22
| | | | | | FossilOrigin-Name: 5f04b016467342b5a796bf702ed25b621eb86f2961c1e703d276c93f2cb6aa89
* | Fix problems with using window functions in CREATE VIEW statements.dan2018-06-18
| | | | | | FossilOrigin-Name: 943bccd2a6bd4cf3e0534c1fa46885bfa2ba7b780ddcdff9f1ea4cbb3f04e786
* | Merge latest trunk changes into this branch.dan2018-06-14
|\ \ | | | | | | FossilOrigin-Name: 5cf5f1808a51f9c2cfc98dd49b4f1ce860b53e935287f89868ce2fdbace8eb06
| * | Add the OP_SetTabCol and OP_VerifyTabCol opcodes, only when compiling withdrh2018-06-11
| | | | | | | | | | | | | | | SQLITE_DEBUG, to do run-time verification of the column cache. FossilOrigin-Name: b37614a3670770919a7c7f8157c5fd6578d736447998640b52e5cef8174cadc2
* | | Clarify the relationship between a Window object and its associated Expr.dan2018-06-11
| | | | | | | | | FossilOrigin-Name: 0cd55e98a478740032f5569ddc00fa5b0e063e90db6e00ac7598c9b7c2fffeee
* | | Add support for the WINDOW clause.dan2018-06-08
| | | | | | | | | FossilOrigin-Name: 19c983b511f1c823fdfb051713681b4c779f02fa83b41189afca0a9b8b72048d
* | | Do not flatten sub-queries that contain window functions.dan2018-06-08
| | | | | | | | | FossilOrigin-Name: 236cb75bd1f0d5eb86aa5f52d8d548e7263c34633833dcea9dfc934f142113b8
* | | Merge latest trunk changes into this branch.dan2018-06-04
|\| | | | | | | | FossilOrigin-Name: 83d6416a868fac81a78c9507185a48d00920e4322276245e285946f760915f4a
| * | Add a comment to justify a goto statement. No code changes.drh2018-05-29
| |/ | | | | FossilOrigin-Name: f141d806476aabe592a15d83b72c9409d2cd6bd7f9cced1ea2513c134191430a
* | Fix minor problems on this branch.dan2018-05-19
| | | | | | FossilOrigin-Name: 19c2e4b2f164521eab84cb0a0e12984be9431eaedd001dd3671e9ea1a6212353
* | Evaluate multiple window functions in a single pass if they use the samedan2018-05-17
| | | | | | | | | | | | window definition. Add xValue callbacks for other built-in aggregate functions. FossilOrigin-Name: c9f0f140941660ff368e5bb5752d54feb1964b7a9eac986d4bfb8f24a1c20d86
* | Handle multiple window-functions in a single query.dan2018-05-17
| | | | | | FossilOrigin-Name: 35af0b750e70dcf0f343b115f4bbd0860a7e8064be204d4dfba1a43c22ff07b1
* | Start of experimental implementation of SQL window functions. Does not yetdan2018-05-16
|/ | | | | work. FossilOrigin-Name: 3781e520854808fe02ad3fe77dd11fc917448c58ff1fd79123289dd91937decd
* Optimizations to the new EQP framework.drh2018-05-03
| | | FossilOrigin-Name: 956fef361a795bd081d8e23ce4075dc8aafcee63ab7275d13b657b529d185b30
* Begin reengineering the EXPLAIN QUERY PLAN function to provide moredrh2018-05-02
| | | | | intuitive output. FossilOrigin-Name: 70b48a7972dfbb44af3ccd8ccd830e984bec88d80a78b3566a5de86a16e7fc14
* Prevent deep recursions on nested COLLATE operators.drh2018-04-28
| | | FossilOrigin-Name: 6e098ee415f1a530e17a942c9ba51d67c25a3ebff6b97377b7858d0b10bcec92
* Improved VDBE comment on the OP_Param opcode. No substantial changes.drh2018-04-26
| | | FossilOrigin-Name: 368c14da868a843767344f6cc17c499fddd83244c0510337ed9a918e64ee2413
* In EXPLAIN QUERY PLAN output, do not show an EXECUTE LIST SUBQUERY line fordrh2018-04-24
| | | | | | IN operators where the RHS is a list and not a subquery, since in that case there is no SUBQUERY to execute. FossilOrigin-Name: 8bc0207abdeeb3ffac003703e78826759f07994698f6cdf40c89c3443ba22a47
* Fix a problem in sqlite3ExprCompare() associated with UPSERT.drh2018-04-23
| | | FossilOrigin-Name: 67d0b2c15299dd20bca7254ecb33e71b5eee6024e2709bfdc36f877bf2a5679f
* Add the "sorter-reference" optimization, allowing SQLite to be configured sodan2018-04-18
|\ | | | | | | | | | | | | that some required values may be loaded from the database after external sorting occurs for SELECT statements with ORDER BY clauses that are not satisfied by database indexes. FossilOrigin-Name: ef74090a40ceaef2fd93a7613ec99a191ce986811c852e96f4a19719f18af4f0
| * Experimental change to "SELECT * FROM ... ORDER BY" processing to load somedan2018-04-14
| | | | | | | | | | column values from the db after sorting. FossilOrigin-Name: 9719cb46bbf501ce80f185159d594f593dd0b2639b9ef5a71a6c7b70046cb08d
* | Fix a problem in the sqlite3ExprCompare() function that caused twodrh2018-04-18
| | | | | | | | | | | | dissimilar expressions to match if they have the same "COLLATE name" at the outer layer. FossilOrigin-Name: fb16348a5bd52752098c9aeacc3281c4e1e8eb5a868d131ea6c3271dc4226b40
* | Add new testcase() macros and fix a bug that was revealed when trying todrh2018-04-18
| | | | | | | | | | cover all the new test cases. FossilOrigin-Name: 266a99f7c068aadbd08157d1d495a428109ad7a32d872f8026e8db0f89c40f91
* | TK_REGISTER expressions nodes are probably not constant. Make suredrh2018-04-17
| | | | | | | | | | sqlite3ExprIsConstant() knows this. FossilOrigin-Name: f3d91cad929cfbee8f621425f55b5f12e79567362cf8769a786adb3e1bbef214
* | Merge changes from trunk.drh2018-04-16
|\ \ | | | | | | FossilOrigin-Name: 54d96772e78b7f57d5b590aebe34a139ade73629aebe16677372650b33513b1d
| * | Reduce the size of the NameContext object by grouping seldom-used fieldsdrh2018-04-16
| |/ | | | | | | | | into a union. FossilOrigin-Name: dba3095feeeb55b5c0ebe33bdd4be8ba1f24478406685d3a042a69d9c380e742
* / Get the conflict-target clause parsing working correctly, with testdrh2018-04-13
|/ | | | | | cases. This change involves an enhancement to sqlite3ExprCompare() which needs to be reviewed on trunk prior to merging. FossilOrigin-Name: 5bf704256206f84b3db7a5d8523215604eeb218ef8db86316d1e43ecd7248d6a
* Fix a problem causing the LEFT JOIN strength reduction optimization to bedan2018-04-10
| | | | | | incorrectly applied in some cases where the WHERE clause of the query contains a filter expression of the form "lhs.x IS NOT ?". FossilOrigin-Name: 1fdaf2c34431adcac1c7ff29aae0623c4cbaa6a7f38e843c786bd407d8b3e730
* Fix a problem causing the LEFT JOIN strength reduction optimization to bedan2018-04-10
| | | | | | incorrectly applied in some cases where the WHERE clause of the query contains a filter expression of the form NOT(x AND y). Ticket [1e39b966]. FossilOrigin-Name: 38d319c153641ea4138fab2d5a47c31a86f57a071a1e1c299ca54c980cfb2b60
* Change the LEFT JOIN strength reduction optimization so that assumes thatdrh2018-04-03
| | | | | | virtual table constraints can be true even if terms within the constraint are NULL. This works around dodgy virtual table implementations. FossilOrigin-Name: cbb977fe1908431f3aad8e67668588b119e7d491724f2042af436f509a4f6623
* Add testcase() macros and improve comments in the LEFT JOIN strength reductiondrh2018-03-24
| | | | | optimization. FossilOrigin-Name: 5613457714dd74d6da8e387132a0d8e64980ba4a921a9f53773540b02c0ccec6
* Yet another fault in the sqlite3ExprImpliesNotNull() routine, causing errorsdrh2018-03-24
| | | | | | in the LEFT JOIN strength reduction optimization of check-in [dd568c27b1d76563]. FossilOrigin-Name: e88cf3d4df64097ebc19aae464b88d0faf9b7d4c30d057042b582d78327e7ad3
* Bug fix in the LEFT JOIN strength reduction optimization ofdrh2018-03-24
| | | | | | | check-in [dd568c27b1d76563]. The sqlite3ExprImpliesNotNull() routine was mistakenly assuming that a CASE expression must always be NULL if contained any reference to a variable that was NULL. FossilOrigin-Name: cf171abe954a5f25262161dd69f2e8cecdbf9446c3f6b298201507dbc743567e
* If terms of the WHERE clause require that the right table in a LEFT JOINdrh2018-03-20
| | | | | not be a null row, then simplify the LEFT JOIN into an ordinary JOIN. FossilOrigin-Name: 5b7abecc7ab8ccbbb8cb5e0f672e67625c2555ad03442efbf34cb395f5bb71a8
* Clean up comments and variable names prior to merge.drh2018-02-27
| | | FossilOrigin-Name: 6445519e91c4f98b4a9a45d5091d733c31497ebf0eb23a76edce3091f626035d
* Remove an unnecessary decision.drh2018-02-27
| | | FossilOrigin-Name: adcb4665490404e8da2de128dd5df9aeed8e08893649dedb6788ebb5d957b400