aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
Commit message (Collapse)AuthorAge
...
* Alternative implementation of the comparison opcode speed-up ofdrh2021-03-28
| | | | | check-in [4a8805d9a66dc888] that should pass muster with UBSAN. FossilOrigin-Name: afb18f64541effaeaada2d72c7c91adfe5ec3e2b1418c0bc281083125fb5badb
* Improvements to distinct aggregates such that they can sometimes avoiddrh2021-03-24
|\ | | | | | | | | | | using an ephermeral table to test for duplicates if the column that is distinct is part of an index. FossilOrigin-Name: ef4ac0ddd297bbd38351410c5a387e1628561b3f1bec9e4c2c9d76fbe29f955a
| * Fix typos in comments and add test cases.dan2021-03-13
| | | | | | FossilOrigin-Name: 01312a3dbd92823af535dc618c68d95a2aa1cbee2501b0a9826eae3f09bec760
| * Merge latest trunk changes into this branch.dan2021-03-12
| |\ | | | | | | FossilOrigin-Name: 198bc510d64b5794559584ad5c9de41dc966dce4eb78be15b12adba43dfcb639
| * | Experimental optimization for distinct aggregates (e.g. "SELECT ↵dan2021-03-09
| | | | | | | | | | | | | | | count(DISTINCT <expr) FROM ..."). FossilOrigin-Name: eb919611fd2f255e4ad1fe7db633363793169f6cf99c650eaefa48c022eb5d22
* | | When doing schema updates, try to convert (incorrect) double-quoted stringsdrh2021-03-23
|\ \ \ | | |/ | |/| | | | | | | into (SQL-standard) single-quoted strings. FossilOrigin-Name: 0770470488e140fa21cb5097c26d58e21da85544af8b69faced1670bbc6d6089
* | | Add the ExprList.nAlloc column and use it to make the sqlite3ExprListAppend()drh2021-03-23
| | | | | | | | | | | | | | | routine much faster. FossilOrigin-Name: 1d3c4662c2f522ac695d97441324069f3fc65f3fa0b87194c7094dfb8cd549f2
* | | An alternative approach for fixing ticket [1c24a659e6d7f3a1].drh2021-03-14
|/ / | | | | FossilOrigin-Name: a2adae907a28e169e64cfe69d97d7b68cb94e6ba07d2dfa995e3fbc6672fafdd
* / Do not confuse the constant SQLITE_MAX_ATTACHED with the maximum number ofdrh2021-03-10
|/ | | | | | schemas. Add the new SQLITE_MAX_DB constant for the maximum number of schemas. [forum:/forumpost/a006d86f72|Forum post a006d86f72]. FossilOrigin-Name: 7b65fb9f7bd616f834633afd64b3448bf9ca2b6e4cc6d6c01e75d1d877c88a79
* Earlier detection of a misplaced ORDER BY or LIMIT clause in a compounddrh2021-03-04
| | | | | | | SELECT. This prevents problems in recursive CTEs with multiple recursive terms in which there is an ORDER BY or LIMIT clause on the last non-recursive term. FossilOrigin-Name: e893f88750ea64d45922429e022c585748974016404f2a2b7952f5a227865246
* Allow WHERE terms to be pushed down into sub-queries that contain window ↵dan2021-02-22
| | | | | functions, provided that the WHERE term is made up of entirely of constants and copies of expressions found in the PARTITION BY clauses of all window functions in the sub-query. FossilOrigin-Name: dac51f303bba1a0aac7768c688b0c134deb7641062cce2071d546f2d8f241dec
* Add the AS MATERIALIZED and AS NOT MATERIALIZED syntax that works like itdrh2021-02-22
| | | | | does in PostgreSQL. FossilOrigin-Name: a6bb272ec0c758ab069bfc07443624e0ea7910b1f23224ee078d050fa3ccf068
* Materialize any CTE that is used more than once.drh2021-02-21
| | | FossilOrigin-Name: ba59159fbe6b83fb6d79fbfee22d983768b0ebbaac7e99d2ac66c810e5e04100
* Rename the "struct SrcList_item" object to the more succinct "SrcItem".drh2021-02-21
| | | | | This is a symbolic change only. The logic is unmodified. FossilOrigin-Name: bfd5bf2c73110fcb36db9ba2a949ff516131fbd3e89325f88fe9f5c2b4ed87b2
* Break out the Cte object from the With object. This will make it simplerdrh2021-02-20
| | | | | | | to add new kinds of Cte objects (ex: DML statements) and/or MATERIALIZED keywords in the future. It brings trunk into closer alignment with the experimental as-materialize branch. FossilOrigin-Name: f03efe905d7b40fb25f9f78b874bb56c6d6ccacb60f86b3b199d430d5eade8d2
* Merge changes from trunk into the alter-table-drop-column branch.drh2021-02-18
|\ | | | | FossilOrigin-Name: 9ea640073f8809dfe2612ae1ea384a938b433f884c54d9e5aa3712de79397ac1
| * Improvement to the INSERT optimization of check-in [16ac213c57196361] sodrh2021-02-18
| | | | | | | | | | | | that it works with SQLITE_ENABLE_HIDDEN_COLUMN but is also easier to maintain and a little faster as well. FossilOrigin-Name: f985a78ecc0c6d9ff671c730a109d97dc781b06e47a0ab03f441cea5d021a4c3
| * Use the sqlite3ParserAddCleanup() mechanism to ensure that the AggInfodrh2021-02-17
| | | | | | | | | | | | structure associated with an aggregate query is deallocated, for a performance increase and size reduction. FossilOrigin-Name: 7a1399671fa10c64d5358cc4d364d24c643fe9dd8da923356462267ee7962f61
* | Fix various issues with the changes on this branch. Add test cases for the same.dan2021-02-17
| | | | | | FossilOrigin-Name: 10538ec6fc1642dfc2ca6cef06ce6cb9e124847b421ccf01f5842064fad379ab
* | Add experimental implementation of ALTER TABLE DROP COLUMN. Only some cases ↵dan2021-02-16
|/ | | | | work so far. FossilOrigin-Name: f0217937d7306fb595727e61e871e8b03d8c881d339a0865bfd0117d90d42e4e
* Avoid manifesting a CTE (or other view) multiple times when it is possible todrh2021-02-13
| | | | | reuse the first manifestation. FossilOrigin-Name: 9692f510803c9b9725abb687d7c10fbc0d5ed784479ec6f3fcc55925a87fe16d
* Remove unreachable code. Fix a shift UB problem introduced yesterdaydrh2021-02-05
| | | | | and discovered by OSSFuzz. FossilOrigin-Name: 078dbff04a95a001bbd8690ab08038fbb5506899df8290991b53fd1122a4c30c
* Snapshot. New design appears to work on a simple test case.drh2021-02-04
| | | FossilOrigin-Name: 8a65fbeecf3597e30853c5f0ccd9b8b46c508854fa521e58e0db279deebca7d4
* Preliminary changes for a new implementation of RETURNING that captures alldrh2021-02-04
| | | | | | | results in a buffer and plays them all back after the DML statement completes. This avoids problems with interleaved DML statements. This particular check-in is a non-functional work in progress. FossilOrigin-Name: 04b77d63216ce11b4e797946953bcde504fc005807c7a5ac757fbf47d78698dc
* Allow "*" wildcards in the RETURNING clause.drh2021-01-29
| | | FossilOrigin-Name: b0e3ae303db2a035583a05848ab7977e612d7e40c77e31ea9e0166de443c901f
* Working prototype.drh2021-01-29
| | | FossilOrigin-Name: b7ef4dc21f187ff4ff679e823782535188c3814aa6ce720b3a01c6d3ba4ef9f5
* Incorporate the sqlite3TriggerList() optimization from trunk. And movedrh2021-01-29
|\ | | | | | | | | | | the pReturning field to the uninitialized area in the Parse object, to save memset() time. FossilOrigin-Name: 29fbaf0e3eabda08500f350bc32e9f339e5732a65bfa62822eefb692a2ff0243
* | Merge recent enhancements from trunk.drh2021-01-27
|\| | | | | FossilOrigin-Name: 5fbcb208d24d45169fc53ad8738dd3545d9bbd26b7434e31afc7f6419cd4e958
| * Fix a problem caused by using an SQL variable in an OVER clause within a ↵dan2021-01-21
| | | | | | | | | | trigger program. FossilOrigin-Name: 4f676466e60ee2a420b7b2deace76f3a733ce1af278347428285715d9c67f022
| * Add a new optimizer disabling bit to close off the exists-to-in optimization,drh2021-01-15
| | | | | | | | | | for testing purposes. FossilOrigin-Name: a80c9a076d31729282004ca372913c9fdbfb6e74711fbb8c5dc12ee0ecba2b87
| * Expand the number of optimization-disable bits from 16 to 32. Use one ofdrh2021-01-13
| | | | | | | | | | | | the new bits to disable the min/max optimization, so that we can more easily verify that we get the same answer both with and within that optimization. FossilOrigin-Name: fd0c9a123b58b7b134ed67f26dbb4196b61e56227f078422cc7e9a3497054c2d
| * Further enhancements to the min/max optimization ofdrh2021-01-13
| | | | | | | | | | | | | | [/info/b8ba2f17f938c035|check-in b8ba2f17f938c035] to fix the performance regression identified by [forum:/forumpost/623f571482|forum post 623f571482]. FossilOrigin-Name: 188772a1dbaf066fbddd39c718fdd87478b19a920622f4640bcb79d4ef065331
* | Lexer and grammar rules for a RETURNING clause on DELETE/INSERT/UPDATE.drh2021-01-12
|/ | | | | | | | | | Actually making this work, though, will involve a lot more code which will likely slow down processing for the common case where there is no RETURNING clause. Furthermore, RETURNING seems to be of limited usefulness and it is not standard SQL. So we abandon it here. These experimental changes are parked in a branch as an historical reference. If circumstances changes, we might take up the cause again some day. FossilOrigin-Name: abf8da815646055df5b871d54b99994c1470182dee7952fc5fd627e4379406cb
* Fix a potential use-after-free following an OOM in sqlite3ParserAddCleanup()drh2021-01-12
| | | | | | and add a mechanism to detect situations where this might occur in the future. FossilOrigin-Name: 38ef8ab9830e12acd2c710e113939b1f8dced02612c6933c37a3c948a4030d0a
* Add a linked list of ParseCleanup objects to the end of a Parse object anddrh2021-01-11
| | | | | | | use that list as a place to put other sub-objects that need to be deallocated. Have a single such list for infrequently used sub-objects is more efficient than doing an a separate check for each kind of sub-object. FossilOrigin-Name: affa2b7b316941b8a6c4d0d1ff212c81a593faf1d05d129e14d2b70d73a25c59
* More detailed compile-time testing before attempting to use atomic loaddrh2021-01-09
| | | | | | intrinsics. See [forum:/forumpost/fc0237a39b30ac0a|forum post fc0237a39b30ac0a]. FossilOrigin-Name: 5204c2c4a7b73a64764b0d2d1d7c53709bb64e0d2685a829c7bf31af13bab5e7
* Size reduction and performance increase in sqlite3Prepare().drh2021-01-01
| | | FossilOrigin-Name: 41f45c8e894f48049325ccfef12cec0887b636bfad5d531a47628eb9e8612924
* Fix SQLITE_OMIT_WINDOWFUNC builds by moving declaration of ↵dan2020-12-22
| | | | | sqlite3ExpandSubquery out of "ifndef SQLITE_OMIT_WINDOWFUNC" block. FossilOrigin-Name: 9587fa8b29fc2f91d751a71b909f574014656f24d276b4974f47fcc18dbadcb8
* Fix problems with joining UNION ALL sub-queries against other sub-queries ↵dan2020-12-21
| | | | | that contain LEFT JOIN. FossilOrigin-Name: d554f710a5abbe64022f47a14ef67227c861a8f0991d85d240434e9a709cf8b8
* Always declare the sqlite3WhereTrace variable, even for non-debug builds.drh2020-12-20
| | | FossilOrigin-Name: 88d93ee380b6fd87474545f20ade874ba05c784c787ce9c45ebfcffed3795308
* Remove an unnecessary and incorrect #ifdef. Fix harmless compiler warnings.drh2020-12-16
| | | FossilOrigin-Name: 31cd1bbfa5b06723288d99d1cb423f88353bdef770b82e9103f71a796d66f660
* Enhance UPSERT so that it allows multiple ON CONFLICT clauses and doesdrh2020-12-14
|\ | | | | | | | | not require a conflict target for DO UPDATE. FossilOrigin-Name: 6b01a24daab1e5bcb0768ebf994368d941b1dfc217bf6b661211d900331e68cf
| * New test cases with corresponding bug fixes.drh2020-12-12
| | | | | | FossilOrigin-Name: f22c21a94ca4cad0217f91c1a5a275bc348cb6ba0f3a54c927533bc8d8c96a90
| * Logic is in place to handle multiple ON CONFLICT clauses, but it does not work.drh2020-12-11
| | | | | | | | | | | | Any use of ON CONFLICT will likely lead to memory faults. This is an incremental check-in to save my place. FossilOrigin-Name: 155142314feb007d526f8f67723636fd50dc52d1cd4d3a67dd93b105c9d5c2be
| * Use an iterator for the index loop in sqlite3GenerateConstraintChecks().drh2020-12-10
| | | | | | | | | | | | The idea is that this iterator can be enhanced to traverse the indexes in any order, as required by multi-index UPSERT. FossilOrigin-Name: 64a4a91ecc5dcde3fa07d3cf038c74b9ede63d36628ecfb35203a9dfbbfe113c
| * The DO UPDATE code generator searches for the correct ON CONFLICT clause todrh2020-12-10
| | | | | | | | | | use. FossilOrigin-Name: a47e35ee2d901baaa37e7229d190f934e1b0bd3510147cd4a2a49c4a1411416a
| * For upsert, the constraint check code generator uses a copy of the index listdrh2020-12-09
| | | | | | | | | | for the target table, which can potentially be reordered. FossilOrigin-Name: 3194c00c2c6a32bdfd5acc9fda5b38ae131d20cd3b7aea8512a41b2e76808f6a
| * Improved comments in sqliteInt.h. No changes to code.drh2020-12-09
| | | | | | FossilOrigin-Name: 8ccb8d1d55fa5aaf625c30f0e7c10aa403d79b5574dbdfa3fd0271a4e546f7e3
| * Enhance UPSERT parsing to allow multiple ON CONFLICT clauses. Only thedrh2020-12-08
| | | | | | | | | | | | very last clause may omit the conflict target, but the conflict target may now be omitted for the DO UPDATE resolution. FossilOrigin-Name: 2ca62f4c71df6544cb8039bdc80e3701d09697c38800534371f6d44532fcffae
* | Merge trunk changes into this branch.dan2020-12-10
|\ \ | | | | | | FossilOrigin-Name: 7337eed629b4537b8fc2dc87c3c71d0a664128a91fd00f3c5f18843505beee90