SQLite

All files named ”src/select.c”
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History for src/select.c

2025-06-03
17:46
[7a21df5db6] part of check-in [916dde1f40] Relax query flattener constraint (3b) and thereby allow flattening the RHS of a LEFT JOIN even if the RHS contains a virtual table. This is a performance optimization that would not normally be found on a patch branch, but downstream needs it and does not want to wait on the next full release. (check-in: [916dde1f40] user: drh branch: branch-3.50, size: 329077)
14:08
[b3179a5595] part of check-in [80dfcc313e] Merge latest trunk changes into this branch. (check-in: [80dfcc313e] user: dan branch: mistake, size: 329184)
2025-06-02
18:42
[122c496dcb] part of check-in [d6a8b1ea5c] Improve the accuracy of affinity and collating sequence analysis for NATURAL JOINs to the left of RIGHT JOINs where source tables are views or subqueries. (check-in: [d6a8b1ea5c] user: drh branch: branch-3.50, size: 329065)
18:34
[882d739e0d] part of check-in [f184d1d236] Improve the accuracy of affinity and collating sequence analysis for NATURAL JOINs to the left of RIGHT JOINs where source tables are views or subqueries. Initial problem report in forum post 829306db47. (check-in: [f184d1d236] user: drh branch: trunk, size: 329169)
2025-05-31
18:46
[56876401a4] part of check-in [a61da8169b] Cherrypick obscure (fuzzer-generated) RIGHT JOIN bug fixes from trunk. (check-in: [a61da8169b] user: drh branch: branch-3.50, size: 329091)
18:16
[9929e56e78] part of check-in [8d393ca07f] Fix an affinity problem caused by a USING or NATURAL JOIN on the LHS of a FULL JOIN. Forum post 5028c785b6. (check-in: [8d393ca07f] user: dan branch: trunk, size: 329195)
16:17
[d0dfddf0de] part of check-in [1ddaa92057] Relax query flattener constraint (3b) and thereby allow flattening the RHS of a LEFT JOIN even if the RHS contains a virtual table. This was previously disallowed by [9dbae1df75219e2a] as a performance optimization. It turns out that the constraint causes performance issues, and we do not have a record of any performance issue that it solves. (check-in: [1ddaa92057] user: drh branch: trunk, size: 329085)
09:44
[5145c03d21] part of check-in [a98a2f4935] Add some missing UNUSED_PARAMETER() annotations to squelch downstream build warnings when using -Wextra -pedantic. (check-in: [a98a2f4935] user: stephan branch: trunk, size: 329073)
2025-05-30
22:58
[fd56257d25] part of check-in [cf5b37b3a3] Follow-up to the previous: The same optimization suppression needs to happen if the left-hand side is coming from a LEFT JOIN. (check-in: [cf5b37b3a3] user: drh branch: trunk, size: 328981)
19:55
[571fff5cf4] part of check-in [60adc78a22] When synthesizing an ON constraint from a USING or NATURAL, if the left-hand side is coming from a RIGHT JOIN, be sure to set the EP_CanBeNull flag so that the optimizer knows to check for NULL even if the column has a NOT NULL constraint. Fix for the problem reported by forum post 4fc70203b61 (check-in: [60adc78a22] user: drh branch: trunk, size: 328827)
2025-05-19
16:45
[3390066254] part of check-in [9fec43d927] Merge the latest trunk changes into the begin-concurrent branch. (check-in: [9fec43d927] user: drh branch: begin-concurrent, size: 328749)
2025-05-16
18:19
[ee072fe205] part of check-in [036c97e36c] Improved version of the previous check-in. (check-in: [036c97e36c] user: drh branch: trunk, size: 328734)
17:30
[8bfa8978cc] part of check-in [955a026996] Fix the optimization of check-in [663f5dd32d9db832] that strives to avoid duplicate compuations in the GROUP BY clause so that it works even if the GROUP BY term is a subquery on the RHS of a LEFT JOIN. Problem found by dbsqlfuzz. Test cases in TH3. (check-in: [955a026996] user: drh branch: trunk, size: 328703)
2025-04-21
12:41
[87db7dddd5] part of check-in [2866119c75] Merge all recent trunk enhancements into the begin-concurrent branch. (check-in: [2866119c75] user: drh branch: begin-concurrent, size: 328583)
2025-04-14
19:43
[1a5956231f] part of check-in [92513f6bce] Improved estimate on the number of output rows in a recursive common table expression that uses the UNION operator. Follow-up to [f911f1c4977fbcae] and it's output row estimate changes associated with DISTINCT queries. (check-in: [92513f6bce] user: drh branch: trunk, size: 328568)
2025-04-10
14:53
[716a49f7f6] part of check-in [d82725dcae] Fix an obscure problem allowing the propagate-constants optimization to improperly substitute a column of a sub-query with NONE affinity. (check-in: [d82725dcae] user: dan branch: forum-0109bca824, size: 328263)
10:18
[effa93763d] part of check-in [20acd630b9] Remove unnecessary "www." prefixes on domain names in URLs. (check-in: [20acd630b9] user: drh branch: trunk, size: 328171)
2025-03-22
14:12
[ab35078d6b] part of check-in [cb5e024b6a] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [cb5e024b6a] user: drh branch: begin-concurrent, size: 328190)
2025-03-18
20:28
[c94f7fe33a] part of check-in [1a8f763c31] Fix two obscure logic problems that cause incorrect answers, found by a third-party fuzzer. (check-in: [1a8f763c31] user: drh branch: branch-3.49, size: 327794)
19:21
[bfe14cdfce] part of check-in [7101ccd533] Fix a problem that could occur when the RHS of an IN operator was a compound SELECT featuring an ORDER BY on a subquery that was flattened into one of the component SELECTs introduced by [baa83b460c677c21]. Problem reported in forum post 1e17219c88. (check-in: [7101ccd533] user: dan branch: trunk, size: 328175)
2025-03-15
20:25
[acccb64ac5] part of check-in [624225499c] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [624225499c] user: drh branch: begin-concurrent, size: 328155)
2025-03-14
18:10
[8c273248e3] part of check-in [6fd6b32d06] Make use of the flexible-array feature of C99, when available, to try to pacify -fsanitize=strict-bounds. This check-in fixes the core. There is more yet to do in FTS3, RTREE, and in FTS5. (check-in: [6fd6b32d06] user: drh branch: flex-array, size: 328140)
2025-03-10
10:39
[cf91234ef9] part of check-in [bae270b988] Disable the [d1ba200234f40b84|count-of-view optimization] if any subquery is DISTINCT, as the optimization does not work in that case. (check-in: [bae270b988] user: drh branch: branch-3.49, size: 327759)
10:32
[df63f64ef9] part of check-in [d7013b6393] Disable the [d1ba200234f40b84|count-of-view optimization] if any subquery is DISTINCT, as the optimization does not work in that case. Bug reported by forum post a860f5fb2e. (check-in: [d7013b6393] user: drh branch: trunk, size: 328164)
2025-03-03
15:53
[dd7cd5cbc5] part of check-in [051a6b159e] Merge all the latest trunk enhancements into the begin-concurrent branch. (check-in: [051a6b159e] user: drh branch: begin-concurrent, size: 327961)
2025-02-21
17:03
[a076f7db3a] part of check-in [d7729dbbf2] Detect when a UNIQUE or PRIMARY KEY on a WITHOUT ROWID table would need to use more than SQLITE_LIMIT_COLUMN columns and raise an error. Also include some unrelated compiler warning fixes. (check-in: [d7729dbbf2] user: drh branch: trunk, size: 327946)
2025-02-18
14:37
[2a72838671] part of check-in [3c87a6d195] Merge all the latest trunk enhancements into the begin-concurrent branch. (check-in: [3c87a6d195] user: drh branch: begin-concurrent, size: 327931)
2025-02-12
20:54
[db244d449f] part of check-in [85c108eb0f] An attempt to allow the DEFAULT keyword in the VALUES clause of an INSERT. This check-in does not work right. (check-in: [85c108eb0f] user: drh branch: default-in-values, size: 327934)
2025-02-09
19:49
[57893cc8b0] part of check-in [a93e3fe0ee] Performance and size optimization for the sqlite3ColumnIndex() routine. (check-in: [a93e3fe0ee] user: drh branch: trunk, size: 327916)
2025-02-08
16:16
[5c8ac3f0b7] part of check-in [11eb8f99e5] Put a 16-byte hash table for column names on each Table object, to speed up column name lookups. (check-in: [11eb8f99e5] user: drh branch: trunk, size: 327841)
2024-12-16
11:19
[96b4e6ed50] part of check-in [faef90eac3] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [faef90eac3] user: drh branch: begin-concurrent, size: 327556)
2024-12-12
20:39
[d07d187216] part of check-in [3c25c69c93] Increase the maximum number of arguments on an SQL function to 1000 with the capability to increase it further up to 32767 using a compile-time option. (check-in: [3c25c69c93] user: drh branch: cf8f1552-commit-instr, size: 327535)
15:11
[83e88fbb36] part of check-in [e8d7d68ba0] Increase the maximum number of arguments on an SQL function to 1000 with the capability to increase it further up to 32767 using a compile-time option. (check-in: [e8d7d68ba0] user: drh branch: trunk, size: 327541)
2024-12-09
11:12
[1c2b2321e1] part of check-in [289daf6cee] Fix an obscure problem with multiple outer joins, ON clauses and query flattening. Forum thread 5c8a069d23. (check-in: [289daf6cee] user: dan branch: forum-5c8a069d23-fix, size: 327539)
2024-12-07
23:29
[1b18b551ec] part of check-in [08cfa7e8b3] Merge the latest trunk fixes and enhancements into the bedrock branch. (check-in: [08cfa7e8b3] user: drh branch: bedrock, size: 327522)
21:14
[f0bf174557] part of check-in [e725fe5aec] Version 3.47.2 for begin-concurrent (check-in: [e725fe5aec] user: drh branch: begin-concurrent-3.47, size: 327522)
2024-12-02
19:32
[428f4aa864] part of check-in [e487d3b3c0] Ensure that the query flattener does not change an ON clause term to a WHERE clause term. (check-in: [e487d3b3c0] user: drh branch: branch-3.47, size: 327507)
17:21
[1334b0606d] part of check-in [bdd408a255] Ensure that the query flattener does not change an ON clause term to a WHERE clause term. Forum post 3f676b1196. Follow-up to [f1eae192315335d7]. (check-in: [bdd408a255] user: dan branch: trunk, size: 327507)
16:07
[c8165a8dff] part of check-in [578f76cfb2] Fix a harmless typo in debugging output. (check-in: [578f76cfb2] user: drh branch: trunk, size: 327518)
2024-10-05
15:51
[56d0108872] part of check-in [a92bb48a48] Merge latest trunk changes into this branch. (check-in: [a92bb48a48] user: dan branch: lateral-join, size: 328148)
2024-09-04
17:15
[979cf15e00] part of check-in [69b3791e17] Merge all the latest branch-3.46 fixes into the bedrock-3.46 branch. (check-in: [69b3791e17] user: drh branch: bedrock-3.46, size: 321155)
2024-08-29
23:24
[108baa344f] part of check-in [b05d30bec1] Merge all the latest trunk enhancements into the begin-concurrent branch. (check-in: [b05d30bec1] user: drh branch: begin-concurrent, size: 327533)
2024-08-26
23:32
[61fbaeaaae] part of check-in [f9c6cbc1d3] Earlier error detection while processing complex aggregate queries. dbsqlfuzz 5242c2f07f4aa031aa3c80461f18e9b7619ede9b (The previous check-in on this branch really should have been this cherrypick.) (check-in: [f9c6cbc1d3] user: drh branch: branch-3.46, size: 320612)
23:19
[801fd50ba4] part of check-in [faecd4505d] Early termination of updateAccumulators() after error detection. (check-in: [faecd4505d] user: drh branch: branch-3.46, size: 320550)
2024-08-21
17:38
[4b14337a27] part of check-in [6b024c85ef] Improved comments on byte-code subroutine calls to materialize subqueries. Should not affect production builds. (check-in: [6b024c85ef] user: drh branch: trunk, size: 327518)
12:01
[26bd0ce6e8] part of check-in [00cfbb9fa5] Add code comments for a "table-of-contents" and various milestone marks in the 1300+ line long sqlite3Select() function, to help improve readiability and maintainability. Comment changes only - no functional changes. (check-in: [00cfbb9fa5] user: drh branch: trunk, size: 327476)
10:37
[534eccfb8e] part of check-in [92c80af112] Fix a minor typo in a comment. (check-in: [92c80af112] user: drh branch: trunk, size: 324149)
2024-08-20
23:11
[44d135bbea] part of check-in [484bcd75bc] Refactor the SrcItem object to move fields associated with subqueries out into a separate object named Subquery. This reduces the size of the SrcItem object by about 1/3rd and provides improved performance. (check-in: [484bcd75bc] user: drh branch: trunk, size: 324150)
22:44
[c1c28650d3] part of check-in [4fa8235dd5] Fix a name resolution issue with CTEs. (check-in: [4fa8235dd5] user: drh branch: srcitem-opt, size: 324057)
20:01
[6f1651ca25] part of check-in [17699329aa] Remove unreachable code. (check-in: [17699329aa] user: drh branch: srcitem-opt, size: 324024)
19:09
[7addcd53d8] part of check-in [fd72d3400a] Tighter checking of access constraints on union members in SrcItem. Improved invariant checking. (check-in: [fd72d3400a] user: drh branch: srcitem-opt, size: 324142)
17:24
[9aa44e562f] part of check-in [3995c45fff] Fix a memory leak so that now all dev tests (including TH3) are passing. (check-in: [3995c45fff] user: drh branch: srcitem-opt, size: 324007)
2024-08-19
23:43
[7e907830b0] part of check-in [70f4973078] Earlier error detection while processing complex aggregate queries. dbsqlfuzz 5242c2f07f4aa031aa3c80461f18e9b7619ede9b (check-in: [70f4973078] user: drh branch: trunk, size: 321969)
22:48
[3e28489574] part of check-in [8ff5dda844] Refactor the SrcItem object so that information about subqueries is stored in a separately allocated Subquery object. This reduces the memory requirements for SrcItem and makes the code run faster. It also provides an expansion path for subquery processing that does not burden simple queries. The current checking mostly works, but there are still issues that need to be tracked down and fixed. (check-in: [8ff5dda844] user: drh branch: srcitem-opt, size: 323878)
2024-08-17
23:23
[10ff02352f] part of check-in [9f5aeef3cb] Give unique names to fields in the SrcItem object, to facilitate analysis of how those fields are used using "grep". (check-in: [9f5aeef3cb] user: drh branch: srcitem-opt, size: 322640)
19:46
[18325f3c24] part of check-in [a4c59ac3c6] Reduce the size of the SrcItem object by combining fields into a union. (check-in: [a4c59ac3c6] user: drh branch: srcitem-opt, size: 322328)
2024-08-01
00:02
[1b9163e39c] part of check-in [3b131bd9aa] Merge all the latest trunk enhancements into the begin-concurrent branch. (check-in: [3b131bd9aa] user: drh branch: begin-concurrent, size: 321891)
2024-07-31
23:46
[cb28a79bda] part of check-in [9084a4c872] Merge all the latest trunk enhancements into the exists-to-join branch. (check-in: [9084a4c872] user: drh branch: exists-to-join, size: 326947)
2024-07-22
00:46
[1f5f1663fe] part of check-in [4f0515138a] Allow LIMIT and OFFSET to contain variables from prior terms of the FROM clause in a LATERAL subquery. Forum post dfe2cd37ca3a9a80 (check-in: [4f0515138a] user: drh branch: lateral-join, size: 322486)
2024-07-21
18:03
[1fdd9e2d9b] part of check-in [6c14b94fb6] Assert added to ensure that LATERAL subqueries are materialized instead of implemented as a co-routine. (check-in: [6c14b94fb6] user: drh branch: lateral-join, size: 322440)
10:35
[c444923c96] part of check-in [31e175fcd0] Fix LATERAL subqueries so that they are able to reference other subqueries to their left that are implemented as co-routines. See Forum post dfe2cd37ca3a9a80. (check-in: [31e175fcd0] user: drh branch: lateral-join, size: 322400)
2024-07-20
17:38
[94ea1909c0] part of check-in [23d83a41ea] Fix rule (1c-ii) of the fromClauseTermCanBeCoroutine() decision so that it work with LATERAL. Add testcase() macros to verify bitmask conditions are all checked. (check-in: [23d83a41ea] user: drh branch: lateral-join, size: 322210)
14:06
[9224f6b9fb] part of check-in [874bc7bc25] Add testcase() macros to bitmap tests in the new code. (check-in: [874bc7bc25] user: drh branch: lateral-join, size: 321991)
08:31
[89eee19cf4] part of check-in [84b80233e7] Optimizations and improved comments. (check-in: [84b80233e7] user: drh branch: lateral-join, size: 321883)
01:19
[da8c817bc0] part of check-in [3c045a96bc] Experimental implementation of LATERAL JOIN. (check-in: [3c045a96bc] user: drh branch: lateral-join, size: 321862)
2024-07-05
10:03
[4b679ba292] part of check-in [557a14a24a] When constructing an ephermeral table to use as the right-hand side of an IN operator, also construct a Bloom filter to speed membership testing. (check-in: [557a14a24a] user: drh branch: bedrock-3.46, size: 321062)
2024-07-04
11:15
[6a95a2bffa] part of check-in [be77fe701c] Add comment using the name "predicate push-down optimization" to what we have also called "WHERE-clause push down". No changes to code. (check-in: [be77fe701c] user: drh branch: trunk, size: 321876)
2024-07-03
20:30
[46e4cca5fa] part of check-in [0bb306eb70] When constructing an ephermeral table to use as the right-hand side of an IN operator, also construct a Bloom filter to speed membership testing. (check-in: [0bb306eb70] user: dan branch: bedrock-3.45-in-bloom, size: 319416)
20:10
[c448e2c067] part of check-in [c10a1b99d4] Show the creation of IN-operator Bloom filters in the EXPLAIN QUERY PLAN output. (check-in: [c10a1b99d4] user: drh branch: in-bloom, size: 321821)
17:51
[ca249242cf] part of check-in [1933496539] Use a Bloom filter to improve performance of IN operators when the RHS of the IN operator is a subquery. (check-in: [1933496539] user: drh branch: in-bloom, size: 321695)
2024-06-28
17:14
[a1c8fadd45] part of check-in [fcb669cfaa] Do not convert an expression node that is already TK_REGISTER into a new TK_REGISTER. This is a follow-up to [663f5dd32d9db832] that fixes a bug discovered by dbsqlfuzz. (check-in: [fcb669cfaa] user: drh branch: trunk, size: 321293)
2024-06-27
14:54
[d92f158185] part of check-in [fc643f8a12] Merge the latest trunk enhancements into the exists-to-join branch. (check-in: [fc643f8a12] user: drh branch: exists-to-join, size: 326306)
2024-06-20
12:07
[72883bd7dd] part of check-in [8e3a1d2850] Do not attempt the exists-to-join optimization if the FROM clause is full. (check-in: [8e3a1d2850] user: drh branch: exists-to-join, size: 326121)
2024-06-14
23:13
[d26ac0a13b] part of check-in [13242289c5] Do not omit the ORDER BY clause from a recursive CTE just because the query that contains the CTE also contains an ORDER BY clause. Plus other changes imported from the recursive-cte-orderby-fix branch. (check-in: [13242289c5] user: drh branch: trunk, size: 321235)
17:16
[501d7fece0] part of check-in [5e700f2cc2] Do not omit the ORDER BY clause from a recursive CTE just because the outer query that uses the CTE also contains an ORDER BY clause. (check-in: [5e700f2cc2] user: drh branch: recursive-cte-orderby-fix, size: 326283)
2024-06-12
17:01
[757ea788e2] part of check-in [4666433cbd] Do not attempt the exists-to-join optimization for expressions from the ON clause of joins. (check-in: [4666433cbd] user: dan branch: exists-to-join, size: 326098)
2024-06-11
18:22
[decd594463] part of check-in [33a3f32785] Provide the ability to disable the exists-to-join optimization using SQLITE_TESTCTRL_OPTIMIZATIONS. Provide tree-trace output for the optimization. (check-in: [33a3f32785] user: drh branch: exists-to-join, size: 326032)
2024-06-10
19:45
[9c65721098] part of check-in [078537d057] Add missing calls to sqlite3exprSkipCollateAndLikely() to the enchancement on this branch. (check-in: [078537d057] user: dan branch: exists-to-join, size: 325721)
19:31
[b3fa60ba7a] part of check-in [f3009a6d7f] Fix a crash that could occur when the SELECT in an EXISTS(SELECT ...) used an unknown collation sequence. (check-in: [f3009a6d7f] user: dan branch: exists-to-join, size: 325655)
2024-06-08
18:13
[06146768a1] part of check-in [a6365c778f] Add extra tests for the changes on this branch. (check-in: [a6365c778f] user: dan branch: exists-to-join, size: 325646)
2024-06-07
21:00
[669cfc0392] part of check-in [972a33db0b] Experimental optimization to rewrite a SELECT with an EXISTS(...) expression in the WHERE clause as a join. (check-in: [972a33db0b] user: dan branch: exists-to-join, size: 325675)
2024-06-06
16:06
[cd4b49d6d8] part of check-in [b44f267671] Better optimize queries that use parameters in the LIMIT clause. (check-in: [b44f267671] user: drh branch: branch-3.28-var-in-limit, size: 244930)
15:03
[ea0b75fce4] part of check-in [e58cb304d1] Better optimize queries that use parameters in the LIMIT clause. (check-in: [e58cb304d1] user: drh branch: var-in-limit, size: 321050)
2024-06-03
18:04
[3b818d1b47] part of check-in [b37ac2d020] Address a corner-case associated with the call-function-once optimization of check-in [663f5dd32d9db832] that was causing a (harmless) use of an uninitialized bytecode register. dbsqlfuzz 8a44f675401a8b1f68a43bf813c4f4f72ad8f0ea (check-in: [b37ac2d020] user: drh branch: trunk, size: 321034)
2024-05-24
18:31
[cbdaf9cb2d] part of check-in [4555d66547] Ensure that queries like "SELECT indeterministic(a) FROM tbl GROUP BY 1" invoke the indeterministic function only once for each row of tbl. (check-in: [4555d66547] user: dan branch: group-by-consistency, size: 320872)
2024-05-21
15:17
[2ae41b3224] part of check-in [5c1c8651d1] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [5c1c8651d1] user: drh branch: begin-concurrent, size: 320534)
2024-05-15
23:36
[1a841c3897] part of check-in [3120c7c8a3] Back out the assert() fixes from [a9443dbfbe25e588] and [3afaeac56dff58db] (but keep the corresponding test cases) because they are both made obsolete by the previous fix on this branch. (check-in: [3120c7c8a3] user: drh branch: alter-table-fix, size: 320519)
2024-05-08
17:57
[ce81687d76] part of check-in [d030c87c4d] Rename a shadowed local var, as reported in forum post 2ba65af31. No functional changes. (check-in: [d030c87c4d] user: stephan branch: trunk, size: 320657)
2024-04-25
17:52
[04178566d0] part of check-in [bbdf22e3d9] Further improvements to the computation of affinity for compound subqueries: make sure that the selected affinity is compatible with a literal values in arms to the left of the arm that is used to determine affinity. (check-in: [bbdf22e3d9] user: drh branch: compound-subquery-affinity, size: 320651)
16:55
[f0f8f7fd60] part of check-in [b8ec8511b1] Back out the previous change on this branch. In its place: Determine the affinity of a subquery by the left-most arm of the subquery that has an affinity other than NONE. In other words, scan from left to right looking for an arm of the compound subquery with an affinity of BLOB, TEXT, INTEGER, or REAL and pick the first one found. Or stay with NONE if no arm has a defined affinity. Test cases added. (check-in: [b8ec8511b1] user: drh branch: compound-subquery-affinity, size: 320583)
2024-04-24
19:49
[39c5dc8b2f] part of check-in [779723ad79] An experimental minor tweak to the way affinities are computed for compound subqueries, when the actual affinity is ambiguous. (check-in: [779723ad79] user: drh branch: compound-subquery-affinity, size: 320421)
2024-04-15
14:18
[6043e3973a] part of check-in [3dda82e001] Merge all 3.45.3 changes into the begin-concurrent-3.45 subbranch. (check-in: [3dda82e001] user: drh branch: begin-concurrent-3.45, size: 319500)
2024-04-08
12:02
[c7d2945000] part of check-in [0f93b52c77] Merge the latest trunk enhancements, and especially the enhancement to the WHERE-clause push-down optimization, into the bedrock branch. (check-in: [0f93b52c77] user: drh branch: bedrock, size: 320436)
2024-04-07
10:27
[3c8e1b921e] part of check-in [3d5fb1ec7a] Add comments to note the name abiguity between the MySQL push-down optimization and the WHERE-clause push-down optimization. (check-in: [3d5fb1ec7a] user: drh branch: trunk, size: 320418)
2024-04-06
23:09
[51893b3e34] part of check-in [681dfe2dd6] Add comments to note the name abiguity between the MySQL push-down optimization and the WHERE-clause push-down optimization. (check-in: [681dfe2dd6] user: drh branch: wrong-branch, size: 320421)
18:30
[6208d6d4ac] part of check-in [8682931f9c] Do not allow changes to sqlite3ExprIsTableConstant() that support pushdown of subqueries interfere with the hash-join logic. (check-in: [8682931f9c] user: drh branch: pushdown-subquery, size: 319959)
11:59
[ccc33d6ac4] part of check-in [4120bc740a] Generalize the pushdown of IN right-hand sides to cover more SELECTs. (check-in: [4120bc740a] user: drh branch: pushdown-IN-table, size: 319959)
2024-04-02
18:31
[7f5f44a6c6] part of check-in [1f97086d62] Fix table-valued functions so that they will work as the right table in a LEFT JOIN. Ticket [2ae0c599b735d59e] (check-in: [1f97086d62] user: drh branch: branch-3.28, size: 244914)
2024-03-26
10:42
[41e2d88aa3] part of check-in [9b854e54b0] Merge all recent trunk enhancements into the begin-concurrent branch. (check-in: [9b854e54b0] user: drh branch: begin-concurrent, size: 319971)
2024-03-24
19:08
[8b9b78a587] part of check-in [7a3d0027f8] Fix the SQLITE_ALLOW_ROWID_IN_VIEW bug-compatibility option so that it works again. Add the SQLITE_CONFIG_ROWID_IN_VIEW sqlite3_config() value to optionally disable the bug-compatibility mode at start-time. Enable testing of SQLITE_ALLOW_ROWID_IN_VIEW. (check-in: [7a3d0027f8] user: drh branch: branch-3.45, size: 319485)
16:42
[8460ae29ed] part of check-in [b5d2dce18f] Do not automatically assume that ROWID is NOT NULL when compiled with SQLITE_ALLOW_ROWID_IN_VIEW. dbsqlfuzz 31b38eeb63a4e1562de665078f52b7b47a7543cf (check-in: [b5d2dce18f] user: drh branch: branch-3.44, size: 318587)
16:33
[15a2213477] part of check-in [80c4223098] Do not automatically assume that ROWID is NOT NULL when compiled with SQLITE_ALLOW_ROWID_IN_VIEW. dbsqlfuzz 31b38eeb63a4e1562de665078f52b7b47a7543cf (check-in: [80c4223098] user: drh branch: trunk, size: 319956)
2024-03-20
16:27
[ced6678ead] part of check-in [cd547c5004] Change EXPLAIN QUERY PLAN output to say "USE TEMP B-TREE FOR LAST TERM OF ORDER BY", or "LAST N TERMS OF ORDER BY", instead of "RIGHT PART OF ORDER BY". (check-in: [cd547c5004] user: dan branch: eqp-orderby, size: 319465)
11:04
[a65c2f5da3] part of check-in [acc08353e2] Fix the SQLITE_ALLOW_ROWID_IN_VIEW bug-compatibility option so that it works again. Add the SQLITE_CONFIG_ROWID_IN_VIEW sqlite3_config() value to optionally disable the bug-compatibility mode at start-time. Enable testing of SQLITE_ALLOW_ROWID_IN_VIEW. (check-in: [acc08353e2] user: drh branch: branch-3.44, size: 318096)
2024-03-19
23:01
[a83532bae4] part of check-in [5d412edc2e] Change the SQLITE_CONFIG_NO_ROWID_IN_VIEW configuration option to be just SQLITE_CONFIG_ROWID_IN_VIEW (without the "_NO_" in the middle) and give it the ability to turn the option on and off. Otherwise, it is difficult to test. (check-in: [5d412edc2e] user: drh branch: rowid-in-view, size: 319301)
14:21
[ac3689a3f5] part of check-in [7bc882897b] Improvements to the first check-in on this branch, causing less collateral damage. (check-in: [7bc882897b] user: drh branch: rowid-in-view, size: 319230)
13:31
[6d6301429c] part of check-in [8a6196ab29] When compiled with SQLITE_ALLOW_ROWID_IN_VIEW, rowid-in-view is on by default but can now be turned off using SQLITE_TESTCTRL_ROWID_IN_VIEW. Without the compile-time option, rowid-in-view is always off. (check-in: [8a6196ab29] user: drh branch: rowid-in-view, size: 319284)
02:30
[934eb6e543] part of check-in [7c46ff6402] First steps toward getting -DSQLITE_ALLOW_ROWID_IN_VIEW to work again. That compile-time option is untested, undocumented, and unsupported. But it was mentioned in the release notes for version 3.36.0, so I think that means we need to support it forever. (check-in: [7c46ff6402] user: drh branch: rowid-in-view, size: 319289)
2024-03-18
18:47
[b3786435c9] part of check-in [50b43b02da] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [50b43b02da] user: drh branch: begin-concurrent, size: 319195)
2024-03-16
19:36
[df2bf515fc] part of check-in [92afea3888] Activate the enhanced constant-expression for the [constant propagation optimization](/info/f4229707ac08d66c). (check-in: [92afea3888] user: drh branch: enhanced-expr-is-const, size: 319180)
13:18
[4a3abb346d] part of check-in [c9e0488c6c] Enhance the sqlite3ExprIsConstant() function so that it recognizes constant functions. So far the enhancement only applies to the multi-row VALUES clause, but it could possibly be applied in many other places. (check-in: [c9e0488c6c] user: drh branch: enhanced-expr-is-const, size: 319141)
2024-03-13
17:51
[95aae86e0a] part of check-in [238fa84a9a] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [238fa84a9a] user: drh branch: begin-concurrent, size: 319122)
2024-03-11
17:27
[2a12c6ed81] part of check-in [17d1f7cfab] Attempt to reduce the memory used by VALUES clauses in as many statements as possible, not just INSERT. This branch still has problems. (check-in: [17d1f7cfab] user: dan branch: exp-values-clause2, size: 319132)
2024-03-04
18:50
[69907af485] part of check-in [5d6797716d] Fix some problems with "VALUES(...) UNION ..." and similar on this branch. (check-in: [5d6797716d] user: dan branch: exp-values-clause, size: 319690)
2024-02-11
18:53
[43fabfc01b] part of check-in [bb31f9c447] Improved AggInfo tracing in debug builds. No changes to deliverable code. (check-in: [bb31f9c447] user: drh branch: trunk, size: 319107)
2023-12-28
13:40
[c581265a87] part of check-in [b3a2adfda7] Merge recent trunk enhancements into the begin-concurrrent branch. (check-in: [b3a2adfda7] user: drh branch: begin-concurrent, size: 318888)
2023-12-15
20:13
[f1a81ff4f8] part of check-in [da44257885] In the count-of-view optimization, deferring freeing obsolete parts of the parse tree, on the off-chance that some other part of the code might be holding a pointer to those parts. (check-in: [da44257885] user: drh branch: trunk, size: 318873)
2023-12-14
13:58
[f69e8e37c8] part of check-in [3536f4030e] Pass subtype information through the aggregate ORDER BY sorter for aggregate functions that use subtype information. (check-in: [3536f4030e] user: drh branch: agg-orderby-subtype, size: 318837)
2023-12-07
13:14
[9f55c9f330] part of check-in [451cef8609] Add ALWAYS() on branches added in [ec0ae4030968c782] that are always true. (check-in: [451cef8609] user: drh branch: trunk, size: 317933)
2023-12-06
21:05
[321c1becc4] part of check-in [b1c58f485f] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [b1c58f485f] user: drh branch: begin-concurrent, size: 317940)
18:25
[a5058ae542] part of check-in [ec0ae40309] Work around LLVM's newfound hatred of function pointer casts. Forum post 1a7d257346636292. (check-in: [ec0ae40309] user: drh branch: trunk, size: 317925)
2023-11-29
16:07
[3b78db8373] part of check-in [f9c6e6a710] Remove Window objects from the corresponding Select.pWin list when they are deleted, as they are, for example, when the ORDER BY clause is optimized out. (check-in: [f9c6e6a710] user: drh branch: branch-3.28, size: 244885)
2023-11-24
12:33
[f20b10969e] part of check-in [6d97426fff] Merge 3.44.2 changes into the begin-concurrent-3.44 sub-branch. (check-in: [6d97426fff] user: drh branch: begin-concurrent-3.44, size: 317990)
2023-11-23
11:59
[0a0da3e577] part of check-in [844e05ed82] Fix a incomplete assert() statement in sqlite3SubqueryColumnTypes(). (check-in: [844e05ed82] user: drh branch: mistake, size: 317923)
2023-11-22
15:29
[445aa9b5a7] part of check-in [7a1a114baf] Merge the 3.44.1 patches into a new sub-branch of begin-concurrent. (check-in: [7a1a114baf] user: drh branch: begin-concurrent-3.44, size: 317918)
2023-11-18
11:23
[85857bedd2] part of check-in [3afaeac56d] Another assertion fault fix, similar to [a9443dbfbe25e588]. dbsqlfuzz 2d9af4e94aca188e0092900eec711401c5d51687. (check-in: [3afaeac56d] user: drh branch: trunk, size: 317975)
2023-11-17
11:58
[b3e8bb88f7] part of check-in [a9443dbfbe] Fix an incorrect assert() associated with ALTER TABLE where an unknown aggregate function contains an ORDER BY clause. dbsqlfuzz e0900262dadd5c78c2226ad6a435c7f0255be2cd. (check-in: [a9443dbfbe] user: drh branch: trunk, size: 317903)
2023-11-10
20:55
[503331aca8] part of check-in [f1eae19231] Fix another problem with mixed join types and the RIGHT JOIN strength-reduction optimization. Forum post befdab472d. (check-in: [f1eae19231] user: dan branch: trunk, size: 317835)
15:03
[47797c57c5] part of check-in [530d10e93a] Fix an obscure problem with the join-strength-reduction optimization that could occur when mixing LEFT and RIGHT joins in the same query. Forum post 7f74ce0bee and separately post d64f0abe723ac98e. The problem was introduced by check-in [d747afda5683ca5f]. (check-in: [530d10e93a] user: dan branch: trunk, size: 317835)
2023-11-02
22:39
[8ebbc67478] part of check-in [268b5984a4] Mark a branch made always-true by the penultimate check-in with ALWAYS(). (check-in: [268b5984a4] user: drh branch: trunk, size: 317873)
2023-10-30
21:39
[37a7110225] part of check-in [9fa405eb5a] Merge the latest trunk changes into the begin-concurrent branch. (check-in: [9fa405eb5a] user: drh branch: begin-concurrent, size: 317880)
18:48
[a19daa26e9] part of check-in [3203256c02] Fix another comment typo. No code changes. (check-in: [3203256c02] user: drh branch: trunk, size: 317865)
17:56
[7753615c83] part of check-in [424ef9550a] Fix typo in a comment. No code changes. (check-in: [424ef9550a] user: drh branch: trunk, size: 317861)
2023-10-25
15:30
[64c9bc7494] part of check-in [c29ebcb0be] Add an ALWAYS on branch that was made always-true by the DISTINCT ORDER BY fix. (check-in: [c29ebcb0be] user: drh branch: trunk, size: 317863)
14:54
[845936a85d] part of check-in [d2dbbdf719] When doing a DISTINCT aggregate that contains an ORDER BY, only the arguments to the aggregate need to be distinct, not the ORDER BY terms. (check-in: [d2dbbdf719] user: drh branch: trunk, size: 317855)
2023-10-23
15:48
[69b729ba5b] part of check-in [c5ef898a79] Merge latest trunk changes into this branch. (check-in: [c5ef898a79] user: dan branch: begin-concurrent, size: 317749)
2023-10-19
20:06
[f9d8ece7f0] part of check-in [18e7c826f0] Remove a faulty assert() that was added just a few check-ins ago by [8b6fffb552c30f9c]. (check-in: [18e7c826f0] user: drh branch: trunk, size: 317734)
12:36
[28f136d35c] part of check-in [8b6fffb552] New assert() statements to help verify correctness of the ORDER BY aggregate code. (check-in: [8b6fffb552] user: drh branch: trunk, size: 317763)
2023-10-18
23:48
[21bee7bc4a] part of check-in [ddfa09c603] Changes for test coverage. (check-in: [ddfa09c603] user: drh branch: agg-orderby, size: 317705)
22:27
[9b6fd8e12e] part of check-in [b6d44427ec] Deal with an OOM condition while processing aggregate ORDER BYs. (check-in: [b6d44427ec] user: drh branch: agg-orderby, size: 317671)
22:03
[12733c8abd] part of check-in [16f3805514] Make sure all terms of the ORDER BY within an aggregate go through aggregate analysis. Do not attach an aggregate ORDER BY to a window function. (check-in: [16f3805514] user: drh branch: agg-orderby, size: 317652)
19:07
[80c5c95fcd] part of check-in [5a885139c4] Fix one minor error in order to get all legacy tests to pass. (check-in: [5a885139c4] user: drh branch: agg-orderby, size: 317405)
18:11
[dd0f0ed896] part of check-in [64c12a835b] ORDER BY on aggregates seem to work, at least for simple smoke tests. Lots more testing is needed though. Surely there are many bugs. (check-in: [64c12a835b] user: drh branch: agg-orderby, size: 317402)
2023-09-16
16:23
[7f9155185b] part of check-in [05107a0ae1] Fix minor code indentation inconsistencies. No function changes. (check-in: [05107a0ae1] user: drh branch: nested-from-rowid-expansion, size: 312778)
16:12
[41e0071749] part of check-in [9e9ff4ca3a] Fix a harmless compiler warning. (check-in: [9e9ff4ca3a] user: drh branch: nested-from-rowid-expansion, size: 312798)
2023-09-15
18:36
[5e9ff0eb38] part of check-in [59a1bbc69f] Allow expressions like "<tbl>.rowid" to refer to implicit rowid columns of tables in nested FROM clauses. (check-in: [59a1bbc69f] user: dan branch: nested-from-rowid-expansion, size: 312792)
2023-09-08
20:09
[50051b9148] part of check-in [c786798506] Merge patches queued for version 3.43.1 into the begin-concurrent-3.43 branch. (check-in: [c786798506] user: drh branch: begin-concurrent-3.43, size: 312026)
2023-08-31
18:00
[e9fb48546a] part of check-in [c84d5602ac] Do not disable unused columns in a UNION ALL sub-query if any component of the sub-query is DISTINCT. Problem introduced by [7c2d3406000dc8ac] and reported by forum post aeae62275ebbf584. (check-in: [c84d5602ac] user: dan branch: trunk, size: 312011)
2023-08-11
11:34
[996dda45d2] part of check-in [7cb2b4e35f] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [7cb2b4e35f] user: drh branch: begin-concurrent, size: 312022)
2023-08-07
16:15
[5f545a2c87] part of check-in [16cd2161e3] Changes so that sqlite3_vtab_nochange() works with "UPDATE ... FROM...". Use this to allow UPDATE on a contentless fts5 table if new values are supplied for all indexed columns. (check-in: [16cd2161e3] user: dan branch: fts5-contentless-delete, size: 312007)
2023-08-03
23:26
[0945ea9f5b] part of check-in [877ffece05] Merge the latest trunk enhancements into the bedrock branch. (check-in: [877ffece05] user: drh branch: bedrock, size: 311453)
2023-08-02
18:20
[5d94f21834] part of check-in [8e7a70b2bb] If a query has an ORDER BY clause that only refers to result columns of the left-most table and the left most table is a MATERIALIZED common table expresion, then attempt to push the ORDER BY clause down into the subquery. (check-in: [8e7a70b2bb] user: drh branch: order-by-push-down, size: 313559)
13:29
[abf48be202] part of check-in [f068f105fb] Remove a condition from query flattening that is now taken care of by the caller. Factor out the reverse_unordered_selects processing from the main loop of sqlite3WhereBegin() for performance. (check-in: [f068f105fb] user: drh branch: materialize-order-by, size: 311438)
12:39
[8a8b7117be] part of check-in [165b9bda24] Simplify the select.c logic that enforces the optimization fence around a MATERIALIZED common table expression. Do not allow the reverse_unordered_selects setting to affect a fenced CTE that itself has an ORDER BY clause. (check-in: [165b9bda24] user: drh branch: materialize-order-by, size: 311341)
11:06
[10ff496138] part of check-in [b7ef9796f5] Never flatten a CTE that is labeled MATERIALIZED. This is really something of a bug fix because the documentation says that a MATERIALIZED CTE is an optimization barrier. (check-in: [b7ef9796f5] user: drh branch: materialize-order-by, size: 311557)
00:09
[0ea15e379b] part of check-in [aa769ee747] When a query is inside an AS MATERIALIZED CTE, do not attempt the omit-ORDER-BY optimization. If the developer specifies MATERIALIZED, that means he wants the sort to actually happen. (check-in: [aa769ee747] user: drh branch: materialize-order-by, size: 311084)
2023-07-28
18:43
[0b7c7b8957] part of check-in [7407dda8b4] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [7407dda8b4] user: drh branch: begin-concurrent, size: 310964)
2023-07-18
17:29
[3328b8c758] part of check-in [050f773add] Enhance the sqlite3_stmt_explain() interface so that avoids unnecessary reprepare operations. (check-in: [050f773add] user: drh branch: sqlite3_stmt_explain, size: 310949)
15:06
[ad0a31b6aa] part of check-in [c2fba6a632] Experimental (untested, non-working) changes that try reduce the number of reprepares generated by sqlite3_stmt_explain(). I think I see an easier way to do this now, so I'm parking this experiment on a branch to pursue the new idea. (check-in: [c2fba6a632] user: drh branch: sqlite3-stmt-explain-opt1, size: 311172)
2023-07-08
19:00
[8425355cfb] part of check-in [3d0823c48e] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [3d0823c48e] user: drh branch: begin-concurrent, size: 311087)
2023-06-30
17:14
[3ab1186290] part of check-in [796eadcc50] Add support for sqlite3_stmt_scanstatus_v2() profiling of GROUP BY clauses that use a temp b-tree. (check-in: [796eadcc50] user: dan branch: scanstatus-exp, size: 311072)
2023-06-22
13:28
[411e67407a] part of check-in [5bd26fea6a] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [5bd26fea6a] user: drh branch: begin-concurrent, size: 310540)
2023-06-13
18:10
[383b9dba12] part of check-in [118fe60087] Improved sqlite3_error_offset() values for bare column errors on '*' and 'table.*' expressions in SELECT statements. (check-in: [118fe60087] user: drh branch: trunk, size: 310525)
2023-06-09
18:58
[5b2139b303] part of check-in [446ad162f7] Improved sqlite3_error_offset() values for bare column errors on '*' and 'table.*' expressions in SELECT statements. (check-in: [446ad162f7] user: drh branch: newbie-safe-aggregates, size: 310863)
13:08
[dc7daf795c] part of check-in [f587891134] Experimental change to add a per-connection option that raises an error if a bare column appears in an aggregate query. (check-in: [f587891134] user: drh branch: newbie-safe-aggregates, size: 310552)
2023-06-07
17:03
[1ddfe44501] part of check-in [8c291d9994] Fix straggler misspellings and tidy the custom dictionary. Also include pickups from forum post c61fb09afd. (check-in: [8c291d9994] user: larrybr branch: spell-check, size: 310214)
08:40
[d1d9e1e910] part of check-in [26c1bb4bd9] Add a C-source spell-checking facility. make misspell (on Nix) (check-in: [26c1bb4bd9] user: larrybr branch: spell-check, size: 310219)
2023-06-02
18:05
[a42b88d8bb] part of check-in [2d962b84dd] Restore the LEFT JOIN strength reduction that was partially lost in [d747afda5683ca5f] when strength reduction was generalized to all OUTER JOINs. (check-in: [2d962b84dd] user: drh branch: trunk, size: 310400)
2023-06-01
20:38
[0f9b9bfd0e] part of check-in [d747afda56] Generalize the LEFT JOIN strength reduction optimization so that it works for RIGHT and FULL JOIN as well. Rename it to the "OUTER JOIN strength reduction" optimization. (check-in: [d747afda56] user: drh branch: trunk, size: 310332)
2023-05-23
15:22
[acb558bb71] part of check-in [20c8a9247b] When converting an aggregate expression to AGG_COLUMN, be sure to remove the EP_Unlikely flag if it is present. (check-in: [20c8a9247b] user: drh branch: branch-3.42, size: 308914)
15:16
[899d531395] part of check-in [48e65f18b2] When converting an aggregate expression to AGG_COLUMN, be sure to remove the EP_Unlikely flag if it is present. Forum post fbfe330a2009d036. (check-in: [48e65f18b2] user: drh branch: trunk, size: 308970)
2023-05-17
13:21
[0937f89a8a] part of check-in [6dbd5b3cc8] Improved assertions on substExpr(). (check-in: [6dbd5b3cc8] user: drh branch: trunk, size: 308958)
2023-05-16
12:56
[ead092c26b] part of check-in [804bb138f5] Merge all 3.42.0 release changes into the begin-concurrent branch. (check-in: [804bb138f5] user: drh branch: begin-concurrent, size: 308917)
2023-05-15
02:06
[738c3a3d69] part of check-in [4902015dcf] As evidenced by forum post f3f546025a, the new RIGHT JOIN related restriction on the push-down optimization implemented by [da3fba18742b6e0b] also needs to apply to the automatic index (a.k.a. hash-join) optimization and to the Bloom filter optimization. Computation of the restriction is now moved into the sqlite3ExprIsSingleTableConstraint() routine. (check-in: [4902015dcf] user: drh branch: trunk, size: 308902)
2023-05-13
15:10
[7d7981de8a] part of check-in [d55ba8bb85] Merge the latest 3.42.0 beta changes into the bedrock branch. (check-in: [d55ba8bb85] user: drh branch: bedrock, size: 308832)
2023-05-11
18:03
[12aa3168be] part of check-in [607cfb5bc5] Fix a minor typo in a comment. No code changes. (check-in: [607cfb5bc5] user: drh branch: trunk, size: 308817)
2023-05-10
11:05
[46ff52b69d] part of check-in [5dae897431] Rename sqlite3IsTableConstraint() to sqlite3IsSingleTableConstraint() and improve its header comment, in an attempt to make the code easier to reason about. No functional changes - should generate identical machine code. (check-in: [5dae897431] user: drh branch: trunk, size: 308816)
00:33
[74cc112615] part of check-in [da3fba1874] New restriction on the push-down optimization to prevent an ON or USING clause on the left side of a RIGHT JOIN from being pushed down into a subquery that is on the right side of that RIGHT JOIN. Forum post a7d4be7fb6. This is similar to an earlier problem fixed at [1783655ea422185e]. Also add comments to describe previously undocumented push-down optimization restrictions. (check-in: [da3fba1874] user: drh branch: trunk, size: 308812)
2023-05-05
14:16
[f9333ef818] part of check-in [fece588b18] Updates to compile-time option usage and especially to the compile-time option test script in tool/omittest.tcl. (check-in: [fece588b18] user: drh branch: trunk, size: 307251)
2023-05-02
21:10
[79a6e11500] part of check-in [6f22c7679f] Update this branch with latest changes from trunk. (check-in: [6f22c7679f] user: dan branch: begin-concurrent, size: 307265)
2023-04-19
18:32
[f879cef11c] part of check-in [e3e7fb87d9] Remove unreachable legacy code. (check-in: [e3e7fb87d9] user: drh branch: trunk, size: 307250)
2023-04-18
14:17
[af040f3737] part of check-in [c37e76104b] Another fix to the indexed expressions in aggregate queries with GROUP BY enhancement of ticket 99378177930f87bd and implemented by check-in b9190d3da70c4171 to address a problem described by forum post f34e32d120. (check-in: [c37e76104b] user: drh branch: branch-3.41, size: 305064)
14:13
[4054886848] part of check-in [5acc3ef83e] Another fix to the indexed expressions in aggregate queries with GROUP BY enhancement of ticket [99378177930f87bd] and implemented by check-in [b9190d3da70c4171] to address a problem described by forum post f34e32d120, (check-in: [5acc3ef83e] user: drh branch: trunk, size: 307317)
2023-04-14
10:46
[01ef181eb6] part of check-in [de61bdc9b9] When setting the column types on a subquery, ensure that the COLFLAG_HASCOLL flag is cleared from column names from when the collating sequence name has been removed. (check-in: [de61bdc9b9] user: drh branch: branch-3.41, size: 305058)
10:40
[ad6f48e095] part of check-in [8d9dcd7cfd] When setting the column types on a subquery, ensure that the COLFLAG_HASCOLL flag is cleared from column names from when the collating sequence name has been removed. Forum post 6916dacf83. (check-in: [8d9dcd7cfd] user: drh branch: trunk, size: 307311)
10:35
[f803ac9541] part of check-in [90deb84486] Fix a cosmetic indentation issue. (check-in: [90deb84486] user: drh branch: trunk, size: 307313)
2023-04-13
18:49
[fa96f217be] part of check-in [cf651dee12] Fix an obscure issue with ALTER TABLE RENAME that comes up with triggers that have UPDATE statements that contain errors. (check-in: [cf651dee12] user: drh branch: branch-3.41, size: 305071)
18:44
[d0c7187b0f] part of check-in [c4845a7c5f] Fix an obscure issue with ALTER TABLE RENAME that comes up with triggers that have UPDATE statements that contain errors. Forum post ff3840145a. (check-in: [c4845a7c5f] user: drh branch: trunk, size: 307324)
2023-04-11
19:38
[93bb022122] part of check-in [e1ff83fa25] New #ifdef to enable building with -DSQLITE_OMIT_WINDOWFUNC. (check-in: [e1ff83fa25] user: drh branch: trunk, size: 307304)
2023-04-03
23:55
[9456359bcc] part of check-in [7ea98aba78] When translating arguments of aggregate functions into references to expression indexes, make sure to only translate them for the current aggregate when there are nested aggregates. (check-in: [7ea98aba78] user: drh branch: branch-3.41, size: 305051)
23:49
[df007d6032] part of check-in [898bfa1afd] When translating arguments of aggregate functions into references to expression indexes, make sure to only translate them for the current aggregate when there are nested aggregates. Forum post 409ebc7368. (check-in: [898bfa1afd] user: drh branch: trunk, size: 307266)
18:00
[6eef5a940e] part of check-in [af0f55cfcb] When changing a COLLATE expression node into TK_AGG_COLUMN because the nodes value is contained in an indexed expression, be sure to clear the EP_Collate property from the expression node. (check-in: [af0f55cfcb] user: drh branch: branch-3.41, size: 305044)
17:46
[2584199f36] part of check-in [cf6454ce26] When changing a COLLATE expression node into TK_AGG_COLUMN because the nodes value is contained in an indexed expression, be sure to clear the EP_Collate property from the expression node. Fix for the assertion faults reported by forum post e45108732c and forum post 44270909bb. (check-in: [cf6454ce26] user: drh branch: trunk, size: 307259)
2023-03-31
23:59
[4743128139] part of check-in [a8faea2842] Omit the the count-of-view optimization if there is a HAVING clause. (check-in: [a8faea2842] user: drh branch: branch-3.41, size: 304996)
23:48
[2fef08c063] part of check-in [babe2b5e59] Omit the the count-of-view optimization if there is a HAVING clause. This fixes a problem that originated with check-in [9322a7c21f1c22ba]. dbsqlfuzz 6a107e3055bd22afab31cfddabc2d9d54fcbaf69 (check-in: [babe2b5e59] user: drh branch: trunk, size: 307211)
2023-03-24
20:39
[1a65f39894] part of check-in [76b90f267c] Fix the handling of indexed expressions in an outer query that appear as corelated values inside an aggregate function within a subquery. (check-in: [76b90f267c] user: drh branch: branch-3.41, size: 304909)
20:35
[83812448cf] part of check-in [d8259877ea] Fix the handling of indexed expressions in an outer query that appear as corelated values inside an aggregate function within a subquery. Forum post 79cf371080. (check-in: [d8259877ea] user: drh branch: trunk, size: 307124)
2023-03-22
13:35
[33c55e9a6d] part of check-in [b7a144c499] Merge the 3.41.2 patches into the bedrock-3.41 subbranch of bedrock. (check-in: [b7a144c499] user: drh branch: bedrock-3.41, size: 304897)
2023-03-11
23:29
[9c6f537469] part of check-in [6d6d95fced] The cherry-pick merge at [371838562a675c1b] caused a performance regression for some queries, which is here fixed. (check-in: [6d6d95fced] user: drh branch: branch-3.41, size: 304882)
23:21
[64a4b48a14] part of check-in [dc9f025dc4] The check-in at [198b3e33dcfd74c7] caused a performance regression for some queries, which is here fixed. Problem reported by forum post b405033490fa56d9. (check-in: [dc9f025dc4] user: drh branch: trunk, size: 307097)
2023-03-10
12:47
[2403f61b48] part of check-in [2780cc9f8b] Merge the 3.41.1 patches into the bedrock branch. (check-in: [2780cc9f8b] user: drh branch: bedrock-3.41, size: 304818)
2023-03-09
13:58
[316c9bd757] part of check-in [cbbe8986ea] Merge count-of-view optimization fixes from trunk. But count-of-view is still off by default for this branch. (check-in: [cbbe8986ea] user: drh branch: branch-3.41, size: 304803)
2023-03-08
14:37
[5068552556] part of check-in [dc1033af4b] Keep the historical datatype ("INT", not "NUM") for a table created as follows: "CREATE TABLE t1 AS SELECT CAST(123 AS INT) AS value;". The use of FLEXNUM only occurs on compound queries. (check-in: [dc1033af4b] user: drh branch: branch-3.41, size: 304732)
14:28
[d4dd7843ce] part of check-in [6d5b589626] Change to [44135d6ea84f7ba6] that retains the historical datatype ("INT", not "NUM") for a table created as follows: "CREATE TABLE t1 AS SELECT CAST(123 AS INT) AS value;". The use of FLEXNUM only occurs on compound queries. (check-in: [6d5b589626] user: drh branch: trunk, size: 307018)
00:47
[0bbc1eb159] part of check-in [f45009533a] Fix a problem in the count-of-view optimization that can lead to incorrect bytecode. dbsqlfuzz 23d782160b71c3f8f535ccb2da313dfc8eb8c631. (check-in: [f45009533a] user: drh branch: trunk, size: 307012)
2023-03-07
19:39
[444a4a243c] part of check-in [a0e54fe205] A proposed change to [44135d6ea84f7ba6] that retains the historical datatype ("INT", not "NUM") for a table created as follows: "CREATE TABLE t1 AS SELECT CAST(123 AS INT) AS value;". (check-in: [a0e54fe205] user: drh branch: flexnum-proposed-fix, size: 306988)
2023-03-04
15:49
[c5c632f69a] part of check-in [b2ad89d3f0] Cherry-pick the agg-with-indexed-expr optimization fix from trunk. (check-in: [b2ad89d3f0] user: drh branch: branch-3.41, size: 304726)
15:36
[2f38b8424d] part of check-in [e069738769] Fix to check-in [b9190d3da70c4171] - the agg-with-indexed-expr optimization requested by ticket [99378177930f87bd] - that can cause an incorrect answer if an aggregate subquery has a GROUP BY clause, and that GROUP BY contains a term that is not in the result set, and the outer query makes use of expression indexes. Problem reported by forum post a68313d054. (check-in: [e069738769] user: drh branch: trunk, size: 306982)
2023-03-01
20:44
[d0d19c2409] part of check-in [371838562a] When flattening a view that is the right operand of a LEFT JOIN always insert the TK_IF_NULL_ROW expression nodes, even for TK_COLUMN expressions, as the TK_COLUMN might be a column from an outer query and hence still need to be NULLed out. (check-in: [371838562a] user: drh branch: branch-3.41, size: 304645)
20:23
[f6224c55bc] part of check-in [198b3e33dc] When flattening a view that is the right operand of a LEFT JOIN, using the optimization of check-in [41c27bc0ff1d3135], always insert the TK_IF_NULL_ROW expression nodes, even for TK_COLUMN expressions, as the TK_COLUMN might be a column from an outer query and hence still need to be NULLed out. This fixes the problem described by forum post 26387ea7ef. (check-in: [198b3e33dc] user: drh branch: trunk, size: 306901)
13:54
[1d9a7c3b60] part of check-in [abc3a38363] Do not attempt to apply the count-of-view optimization to a CTE. dbsqlfuzz ef8623915d843b150c159166ee4548c78cc6895a (check-in: [abc3a38363] user: drh branch: trunk, size: 306925)
2023-02-26
11:52
[1b0438b4ad] part of check-in [83a7f13edb] In the omit-unused-subquery-columns optimization, be sure to remove the EP_Skip and EP_Unlikely flags from the result set expressions that get nulled-out. dbsqlfuzz bf1d3ed6e0e0dd8766027797d43db40c776d2b15. Also fix an incorrect ".selecttrace" code block. (check-in: [83a7f13edb] user: drh branch: branch-3.28, size: 244859)
11:36
[230dc0601f] part of check-in [21aec65e5e] In the omit-unused-subquery-columns optimization, be sure to remove the EP_Skip and EP_Unlikely flags from the result set expressions that get nulled-out. dbsqlfuzz bf1d3ed6e0e0dd8766027797d43db40c776d2b15. (check-in: [21aec65e5e] user: drh branch: trunk, size: 306860)
2023-02-23
14:43
[a6a5cc0bbb] part of check-in [de6c5c6bb4] Fix harmless compiler warnings and a code indentation error. (check-in: [de6c5c6bb4] user: drh branch: trunk, size: 306810)
2023-02-22
21:47
[39ec68e3e8] part of check-in [a4aacdd323] Enable the count-of-view optimization by default. Enhancement request [eaed8e36ce888f1e]. (check-in: [a4aacdd323] user: drh branch: trunk, size: 306849)
21:11
[751d2f021c] part of check-in [7c2d340600] Avoid computing the values for unused result-set columns in subqueries. Performance optimization request [baa5bb76c35a124c]. (check-in: [7c2d340600] user: drh branch: trunk, size: 306979)
20:42
[f80d98f13f] part of check-in [aa6bd6dff7] Remove the push-down optimization restriction that was added by check-in [1ad41840c5e0fa70] because it is no longer needed after the enhancements to compound query processing in check-in [27655c9353620aa5] This resolves the performance regression reported by forum post bcc4375032. (check-in: [aa6bd6dff7] user: drh branch: trunk, size: 304316)
2023-02-21
21:19
[25b8637206] part of check-in [918aea50ed] Update the begin-concurrent branch to version 3.41.0 (check-in: [918aea50ed] user: drh branch: begin-concurrent, size: 304684)
12:42
[d44e78e103] part of check-in [cdbdc8013f] Yet another comment typo fix. No changes to working code. (check-in: [cdbdc8013f] user: drh branch: trunk, size: 304669)
2023-02-18
21:35
[f2be1c5134] part of check-in [6fb8bb2e8f] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [6fb8bb2e8f] user: drh branch: begin-concurrent, size: 304680)
2023-02-17
18:27
[5f6b393b77] part of check-in [29fc06465e] Do not allow the COUNTOFVIEW optimization to run if the count() contains a FILTER clause. dbsqlfuzz 4f8e0de6e272bbbb3e1b41cb5aea31e0b47297e3 (check-in: [29fc06465e] user: drh branch: trunk, size: 304665)
2023-02-16
21:01
[f8e57c3aec] part of check-in [ad6ac5d3e8] Fix an #ifdef that uses a different macro name from the main branch. (check-in: [ad6ac5d3e8] user: drh branch: branch-3.28, size: 244805)
19:04
[7549148775] part of check-in [57a4e91f43] Back-port omit-unused-subquery-column enhancements into the 3.28 branch. (check-in: [57a4e91f43] user: drh branch: branch-3.28, size: 244803)
18:04
[fa66a61608] part of check-in [6b1a1f374d] Provide an optimization-disable mask for this optimization. Do not do the optimization if the subquery is an aggregate or is distinct, but allow it to be an ephemeral subquery. Do not omit columns that are used in the ORDER BY of the subquery. (check-in: [6b1a1f374d] user: drh branch: omit-unused-subquery-columns, size: 307248)
15:54
[a723a35366] part of check-in [cc148503db] Do not perform the omit-unused-subquery-columns optimizations on a subquery that is DISTINCT, as that can lead to incorrect results. (check-in: [cc148503db] user: drh branch: omit-unused-subquery-columns, size: 306724)
14:29
[0af39e0071] part of check-in [0163b697dd] Do not compute result columns of subqueries that are never used. Make those columns NULL instead. This optimization potentially resolves the enhancement request described by [ticket baa5bb76c35a124c]. (check-in: [0163b697dd] user: drh branch: branch-3.28, size: 244191)
01:29
[d43c31813b] part of check-in [0c21b6a5f8] Do not compute unused result columns of subqueries. This optimization will potentially resolve the performance optimization request of [ticket baa5bb76c35a124c]. (check-in: [0c21b6a5f8] user: drh branch: branch-3.26, size: 244245)
2023-02-15
19:53
[98984bd8a2] part of check-in [77b220a724] Fix the subquery result column NULL-ifier so that it correctly handles subquery columns past the 63rd column. (check-in: [77b220a724] user: drh branch: omit-unused-subquery-columns, size: 306659)
17:53
[49d9336c41] part of check-in [5dec3cc022] Do not compute result columns of subqueries that are never used. Make those columns NULL instead. This optimization potentially resolves the enhancement request described by [ticket baa5bb76c35a124c]. (check-in: [5dec3cc022] user: drh branch: omit-unused-subquery-columns, size: 306652)
2023-02-02
14:27
[394c577f06] part of check-in [5a22010c35] Merge latest enhancments into this branch from branch wal2. (check-in: [5a22010c35] user: dan branch: begin-concurrent-pnu-wal2, size: 304600)
2023-02-01
15:41
[c3ce1b49cc] part of check-in [66f29c403d] Just because a CTE is used more than once, does not mean it should be tagged with M10d_Yes and thereby prohibited from participating in the query flattening optimization. See forum thread 1d571c02963. (check-in: [66f29c403d] user: drh branch: trunk, size: 304585)
2023-01-12
19:51
[d389ccdb96] part of check-in [0546165159] Fix sqlite3_prepare() so that it only invokes the progress handler on every N-th call to sqlite3ProgressCheck(), where N is the progress handler step count. Also fix faulty asserts exposed by the ability to interrupt in the middle of sqlite3_prepare(). (check-in: [0546165159] user: drh branch: progress-during-prepare, size: 304403)
13:25
[cb25679cf2] part of check-in [79636f2d80] Attempt to provide a mechanism to do early termination of long-running statement preparation by invoking the progress handler at strategic points during sqlite3_parpare(). This experiment shows that sqlite3_prepare() might leave the resulting prepared statement uninitialized following an interrupt. (check-in: [79636f2d80] user: drh branch: progress-during-prepare, size: 304405)
2023-01-10
19:57
[146222acbf] part of check-in [497a98363f] When computing the datatypes for columns in a view, use the same datatype name as the underlying table if such is available and is consistent with the computed affinity of the column. Forum thread 7fb1fe9dcf310ef5. (check-in: [497a98363f] user: drh branch: trunk, size: 304367)
2022-12-21
20:07
[e0ec5c22fe] part of check-in [0c198aee53] Update the begin-concurrent branch with the latest enhancements on trunk. (check-in: [0c198aee53] user: drh branch: begin-concurrent, size: 304233)
2022-12-20
01:48
[83de67e485] part of check-in [f113eebdbe] Do not use indexed expressions to replace the expression being indexed on a RIGHT JOIN as that leads to problems, as shown by dbsqlfuzz a644e70d7683a7ca59c71861a153c1dccf8850b9. (check-in: [f113eebdbe] user: drh branch: trunk, size: 304218)
2022-12-19
12:25
[4e80cb95a4] part of check-in [c8329967f3] Fix a minor problem with the printAggInfo() routine (used on during debugging). (check-in: [c8329967f3] user: drh branch: trunk, size: 304164)
2022-12-17
12:49
[03e79d37c5] part of check-in [b4281db4e4] Add NEVER/ALWAYS to branches that have become unreachable due to recent enhancements. (check-in: [b4281db4e4] user: drh branch: trunk, size: 304151)
2022-12-15
20:03
[c4f845e116] part of check-in [44135d6ea8] Create a new affinity called FLEXNUM that works like NUMERIC except that it never tries to convert integer to real or real to integer. The affinity is only used internally - it is not possible to create a table column with this affinity. This affinity is used on subqueries and views that are built off of a compound SELECT and where the datatype is controlled by a CAST expression. dbsqlfuzz c9ee6f9a0a8b8fefb02cf69de2a8b67ca39525c8 (check-in: [44135d6ea8] user: drh branch: trunk, size: 304136)
15:37
[a6c97f07b1] part of check-in [751e344f4c] Omit the columnTypeImpl() function from the build when SQLITE_OMIT_DECLTYPE is defined, because it is no longer used in that case. (check-in: [751e344f4c] user: drh branch: trunk, size: 304760)
13:45
[86ab35ea18] part of check-in [ddb260cc52] Fix harmless compiler warnings. (check-in: [ddb260cc52] user: drh branch: trunk, size: 304687)
2022-12-14
23:53
[6bfa72ad9b] part of check-in [c1d5261b22] Fix minor problems in the new sqlite3ExprDataType() function. (check-in: [c1d5261b22] user: drh branch: trunk, size: 304686)
17:52
[505b265ec6] part of check-in [ea278438b7] Merge all the latest trunk enhancements into the coroutines-exp2 enhancement branch. (check-in: [ea278438b7] user: drh branch: coroutines-exp2, size: 304588)
14:41
[3b72630ae4] part of check-in [6ebb178c6b] If the SELECT that implements a subquery or a VIEW or a CREATE TABLE AS is a compound with different result datatypes on two or more arms of the compound, then the overall column type becomes BLOB (ANY). (check-in: [6ebb178c6b] user: drh branch: refactor-subquery-types, size: 302769)
09:06
[d17d847e1e] part of check-in [fe5a77bcc4] Back out the part of the change in [88a05141c28e5ff1] that adds affinity to the materialization of a view, as the affinity can be undefined for a compound query. This passes all TCL tests, but shows failures in the TH3 tests derived from forum post 6f842bc5b2dadcb2, presumably because the WHERE clause of the query uses constraints of the form "source_crs_code='8675'" instead of "source_crs_code=8675". Perhaps further changes on this branch should reimplement affinity on joins in cases where the affinity is unambiguous. (check-in: [fe5a77bcc4] user: drh branch: refactor-subquery-types, size: 302314)
2022-12-13
16:59
[9e95a0a970] part of check-in [c6e3ff3969] Remove an unused variable from sqlite3SubqueryColumnTypes(). (check-in: [c6e3ff3969] user: drh branch: refactor-subquery-types, size: 302545)
16:55
[44fd33ce57] part of check-in [baf2c24133] Use standard datatype names for the column datatypes in views and subqueries. (check-in: [baf2c24133] user: drh branch: refactor-subquery-types, size: 302628)
15:54
[9b5fe65391] part of check-in [4dfb1b450b] Refactor the sqlite3SelectAddColumnTypeAndCollation() routine. Improved comments. Now called sqlite3SubqueryColumnTypes(). (check-in: [4dfb1b450b] user: drh branch: refactor-subquery-types, size: 302495)
00:51
[4ad0aa2b21] part of check-in [c43f433bca] Merge recent trunk changes into the coroutine-exp2 branch. (check-in: [c43f433bca] user: drh branch: coroutines-exp2, size: 304238)
2022-12-12
18:58
[39c4b0e23f] part of check-in [ece07d091c] If a subquery has a result column of the form "CAST(... AS NUMERIC)" then give that column no affinity rather than NUMERIC affinity. This is because casting to numeric preserves real values that could be integers but numeric affinity does not. By using no affinity on the column, we make the behavior consistent if the subquery is implemented as a co-routine or is materialized. (check-in: [ece07d091c] user: drh branch: cast-to-numeric, size: 302419)
2022-12-10
17:54
[9a68788303] part of check-in [b0e49aa81a] Ensure that the types and collation sequences of a view are taken from the leftmost component of compound SELECTs, even when column names are explicitly provided for the view. Possible fix for [679ed6a2]. (check-in: [b0e49aa81a] user: dan branch: tkt-679ed6a2, size: 301610)
2022-12-09
18:26
[d4df3eb74a] part of check-in [78723a9a7e] Remove the SQLITE_PREPARE_SAFEOPT flag. The name is obsolete and it is at the wrong level. Instead use the SF_UpdateFrom flags on the Select object. (check-in: [78723a9a7e] user: drh branch: coroutines-exp2, size: 303375)
2022-12-08
16:47
[6ec3f7a176] part of check-in [9243e850ae] Improved comments on the new co-routine logic. Fix a C++-ism in the code. Update test cases to accommodate the more aggressive use of co-routines. (check-in: [9243e850ae] user: drh branch: coroutines-exp2, size: 303308)
13:56
[02982768da] part of check-in [ea4306a03c] Do not use a co-routine on a subquery that is participating in a self-join. (check-in: [ea4306a03c] user: drh branch: coroutines-exp2, size: 302844)
2022-12-06
15:24
[cbb0ce9503] part of check-in [e2318a30bf] Simplified experimental changes to promote the use of co-routines. Less cruft than the coroutines-exp1 branch, but still does not work. Checked in as a work-in-progress. (check-in: [e2318a30bf] user: drh branch: coroutines-exp2, size: 302448)
11:41
[56162cde2f] part of check-in [d3f6a207fd] Support an SQLITE_SCANSTAT_NCYCLE statistic for "CO-ROUTINE" elements. (check-in: [d3f6a207fd] user: dan branch: trunk, size: 301556)
00:54
[f243554e94] part of check-in [e7d323c16e] Highly experimental (and non-working) changes aimed at increasing the number of occasions where a subquery can be implemented using a co-routine rather than being materialized. This is just saving work in progress. (check-in: [e7d323c16e] user: drh branch: coroutines-exp1, size: 301816)
2022-12-05
18:19
[321f29e431] part of check-in [41a0e05e8c] Add loops and rows counters to "USE TEMP B-TREE FOR ORDER BY" records. Also fix the sqliteHwtime() function so that it returns a 64-bit value. (check-in: [41a0e05e8c] user: dan branch: scanstatus_v2, size: 301088)
2022-12-03
18:16
[f6674cdcb8] part of check-in [365011ae8b] Add CYCLES scanstat measurement to "USE TEMP B-TREE FOR ORDER BY" lines. (check-in: [365011ae8b] user: dan branch: scanstatus_v2, size: 301030)
2022-12-02
20:32
[b1301741ae] part of check-in [5580083364] Enhance the sqlite3_stmt_scanstatus() API and add sqlite3_stmt_scanstatus_v2(). For creation of easier to read query performance reports. (check-in: [5580083364] user: dan branch: scanstatus_v2, size: 300241)
2022-11-28
20:08
[6983de0e6b] part of check-in [8d5b76593d] Fix harmless compiler warnings. (check-in: [8d5b76593d] user: drh branch: trunk, size: 300111)
2022-11-26
20:12
[c1eb8f3ee2] part of check-in [f11bb42292] Fix an incorrect assertion-fault in the "TREETRACE" debugging logic on select.c. The problem does not affect production builds. (check-in: [f11bb42292] user: drh branch: trunk, size: 300117)
2022-11-25
17:05
[934c374557] part of check-in [adbca3448e] Relax restriction (8) on the push-down optimization so that it only applies if one or more columns uses a collating sequence other than BINARY. See forum post 3824ced748baa808 and check-in [346a3b12b861ce7b]. (check-in: [adbca3448e] user: drh branch: trunk, size: 300124)
16:32
[e0a04b1082] part of check-in [09e1e42e0f] Fix #ifdefs so that restrictions (8) and (9) of the push-down optimization are still enforced even if compiled with SQLITE_OMIT_WINDOWFUNC. This fixes a bug introduced by check-in [346a3b12b861ce7b]. (check-in: [09e1e42e0f] user: drh branch: trunk, size: 299722)
16:10
[7dcab394ef] part of check-in [b9190d3da7] Improve the query planner such that it is able to make use of indexed expressions within an aggregate query with GROUP BY. This implements enhancement request [99378177930f87bd]. (check-in: [b9190d3da7] user: drh branch: trunk, size: 299684)
15:52
[bafe6424e9] part of check-in [1ad41840c5] Add restriction (9) to the push-down optimization: If the subquery is a compound then all arms of the compound must have the same affinity. dbsqlfuzz 3a548de406a50e896c1bf7142692d35d339d697f. (check-in: [1ad41840c5] user: drh branch: trunk, size: 294512)
13:26
[f29c90b070] part of check-in [e3e1b453dc] Remove a redundant assert() statement. (check-in: [e3e1b453dc] user: drh branch: agg-with-indexed-expr, size: 298968)
13:15
[40a7d7b49b] part of check-in [d2844f577b] Improve the robustness of the updateAccumulator() routine against OOM. (check-in: [d2844f577b] user: drh branch: agg-with-indexed-expr, size: 299003)
13:08
[6168029423] part of check-in [5200b84195] Improved comments. Add assert()s to verify that the AggInfo structure is unchanged after registers have been assigned. (check-in: [5200b84195] user: drh branch: agg-with-indexed-expr, size: 298950)
2022-11-24
23:35
[c1cf437e18] part of check-in [939cb47025] Correctly deal with IF-NULL-ROW operators when dealing with indexed expressions in aggregates. (check-in: [939cb47025] user: drh branch: agg-with-indexed-expr, size: 298407)
15:04
[6df5dd2a04] part of check-in [3a901e88c8] Add NEVER() and ALWAYS() macros on branches that are believed to be unreachable. (check-in: [3a901e88c8] user: drh branch: agg-with-indexed-expr, size: 298352)
01:40
[7fcbbc0db9] part of check-in [e6c20f61de] Add explanatory comment to the new optimization. And add a test case. (check-in: [e6c20f61de] user: drh branch: agg-with-indexed-expr, size: 298344)
2022-11-23
18:51
[f253214cbd] part of check-in [8dcf9f2031] Aggregates with GROUP BY now make use of expressions on indexes. This code works and gets the correct answer for the test case in the ticket. Lots more testing and documentation is needed, however. (check-in: [8dcf9f2031] user: drh branch: agg-with-indexed-expr, size: 297967)
17:56
[8ac7f73d40] part of check-in [84c06023f4] This attempt at modifying AggInfo to make use of indexed expressions does not work. It gets an incorrect answer for the test case shown in the ticket. (check-in: [84c06023f4] user: drh branch: agg-with-indexed-expr, size: 296571)
14:13
[1d3f8a5b51] part of check-in [23145fe999] Further foundation prep work prior to starting to flesh-out the optimizeAggregateUseOfIndexedExpr() routine. (check-in: [23145fe999] user: drh branch: agg-with-indexed-expr, size: 296314)
2022-11-22
20:58
[6f5403b8f1] part of check-in [f8932e04d4] Merge enhancements and fixes from trunk. (check-in: [f8932e04d4] user: drh branch: agg-with-indexed-expr, size: 294963)
20:37
[dfc504356e] part of check-in [d85bb724fd] Add the stub function: optimizeAggregateUsingIndexedExpr(). The hope is that we can fill this in with a routine that does useful optimizations. (check-in: [d85bb724fd] user: drh branch: agg-with-indexed-expr, size: 294841)
19:51
[35c2b1b4d8] part of check-in [070634781a] Merge trunk fixes and enhancements into the agg-with-indexed-expr branch. (check-in: [070634781a] user: drh branch: agg-with-indexed-expr, size: 293883)
19:49
[4c48373abb] part of check-in [8036445a36] Rename the SELECTTRACE macro to TREETRACE, so that is corresponds to the new CLI command. Renumber all of the bits in the bitmask used to enable various kinds of tracing, and add a trace bitmap decoder in sqliteInt.h. Changes to debugging logic only. No (intentional) changes to production code. (check-in: [8036445a36] user: drh branch: trunk, size: 293796)
15:43
[cf17743a69] part of check-in [dc5bd34963] Since the memory registers used by the columns and functions of an AggInfo object are sequential, it is not neecessary to remember each register separately. We can simply remember the first one and do the math when others are needed. (check-in: [dc5bd34963] user: drh branch: agg-with-indexed-expr, size: 293901)
14:31
[27822fc0fe] part of check-in [d79c58ef08] Omit the unnecessary AggInfo.mnReg field. (check-in: [d79c58ef08] user: drh branch: agg-with-indexed-expr, size: 294574)
14:10
[32d4f232ee] part of check-in [4475799d5b] Factor out the allocation of registers for aggregates into a separate subroutine. (check-in: [4475799d5b] user: drh branch: agg-with-indexed-expr, size: 294421)
13:33
[0f78363cb9] part of check-in [cba837eae9] This is the first in what is anticipated to be a long sequence of incremental changes aimed at improving aggregate query processing, and in particular helping aggregate queries take better advantage of indexes on expression. The end goal is to resolve ticket [99378177930f87bd], though it remains to be seen whether or not I can get there with this approach. (check-in: [cba837eae9] user: drh branch: agg-with-indexed-expr, size: 293749)
2022-11-21
17:40
[3fc60a8f0b] part of check-in [dc33cfbede] Split out the debugging code that dumps an AggInfo object into a separate subroutine called printAggInfo() so that it can be invoked interactively during debugging. No changes to production code. (check-in: [dc33cfbede] user: drh branch: trunk, size: 293814)
2022-11-14
12:44
[363bef2cd0] part of check-in [5ba588e7eb] Merge 3.40.0 rc1 into the begin-concurrent branch. (check-in: [5ba588e7eb] user: drh branch: begin-concurrent, size: 293705)
2022-11-07
15:23
[9886d6669f] part of check-in [e377c0a1ef] Fix an obsolete comment. (check-in: [e377c0a1ef] user: drh branch: trunk, size: 293690)
2022-11-04
18:33
[8f376b7881] part of check-in [b361ee983c] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [b361ee983c] user: drh branch: begin-concurrent, size: 293695)
2022-11-01
01:07
[12cb5162e6] part of check-in [1b8a128832] Do not flatten a UNION ALL subquery where the column affinities do not match on all arms. Force that subquery to be materialized. (check-in: [1b8a128832] user: drh branch: tkt-57c47526, size: 293680)
00:52
[0c4d77f94a] part of check-in [b6692de374] Enforce column affinity on the materialization of a subquery or view. (check-in: [b6692de374] user: drh branch: tkt-57c47526, size: 293057)
2022-10-26
21:14
[8a709a8e19] part of check-in [346a3b12b8] Disable the push-down optimization for sub-queries that are INTERSECT, UNION or EXCEPT compounds. dbsqlfuzz a34f455c91ad75a0cf8cd9476841903f42930a7a. This corrects an issue that was introduce 12 days earlier by [ed14863dd72e35fa]. (check-in: [346a3b12b8] user: dan branch: trunk, size: 292826)
2022-10-24
21:58
[90883c8b0d] part of check-in [80fbb30f28] This check-in attempts to make the SrcItem object smaller by combining the zDatabase and pSchema fields into a single union. It mostly works, but there are some issues, and the performance savings is minimal. So it is side-tracked onto this dead-end branch. (check-in: [80fbb30f28] user: drh branch: failed-opt-attempt, size: 292434)
13:50
[cd8413de73] part of check-in [3d1992de47] Improve the ability of the query planner to recognize covering indexes even on tables with more than 63 columns and where the index is over columns beyond the 63rd column. (check-in: [3d1992de47] user: drh branch: branch-3.28, size: 242099)
2022-10-22
23:09
[e5b6f930f0] part of check-in [f6d09c5a0d] More frequently send the complete SELECT statement into sqlite3WhereBegin() so that it can more accurately determine index coverage. (check-in: [f6d09c5a0d] user: drh branch: covering-index-enh, size: 292203)
2022-10-21
20:12
[22905c05a1] part of check-in [5dd7858820] Begin transitioning the fixed-length (64-bit) bitmap used to keep track of the subset of columns of a table that are used by a query into a more general structure that can work with wide tables. Experimental. (check-in: [5dd7858820] user: drh branch: column-set, size: 292206)
2022-10-19
11:58
[3f7238ebb3] part of check-in [e3648a07f5] Fix references to "SrcList_item" in comments as that object has since [bfd5bf2c73110fcb] (2021-02-21) been called "SrcItem". Comment changes only. No changes to code. (check-in: [e3648a07f5] user: drh branch: trunk, size: 292203)
2022-10-14
19:30
[b795f31a32] part of check-in [ed14863dd7] Fix a problem with using the push-down optimization on compound SELECTs where component SELECTs use different collation sequences. dbsqlfuzz 11516f050100243e5a845f5a2b48a90ed2efaf2e. This problem appears to go all the way back to the beginning of the push-down optimization in check-in 6df18e949d367629 in SQLite 3.8.11. (check-in: [ed14863dd7] user: dan branch: trunk, size: 292223)
2022-09-30
13:29
[321a529476] part of check-in [ba2539f6de] Merge all recent trunk enhancements into the begin-concurrent branch. (check-in: [ba2539f6de] user: drh branch: begin-concurrent, size: 291559)
2022-09-20
18:18
[bb18acf4ed] part of check-in [852b385a5d] Remove code that has been previously commented out. (check-in: [852b385a5d] user: drh branch: flattener-omit-restriction-29, size: 291544)
16:57
[57813f5b8d] part of check-in [19270577ad] Is the query flattener restriction 29 (do not allow both EP_InnerON and EP_OuterON constraints on the same FROM clause term) really necessary? This branch explores what happens if we omit that restriction. This is an effort to address the performance regression reported by forum post 96b9e5709cf47cda that is caused by flattener restriction 29. (check-in: [19270577ad] user: drh branch: flattener-omit-restriction-29, size: 292758)
2022-09-19
19:25
[dcfd2df77e] part of check-in [2647d73bb1] Clarify comments that describe query flattener restrictions associated with outer joins. No code changes. (check-in: [2647d73bb1] user: drh branch: trunk, size: 293036)
17:41
[b3ceb6bca1] part of check-in [8032db4ade] Fix a minor comment typo. No changes to code or documentation. (check-in: [8032db4ade] user: drh branch: trunk, size: 293230)
2022-09-05
12:39
[3e8041f760] part of check-in [31304de83e] Version 3.39.3 patches applied to the begin-concurrent branch. (check-in: [31304de83e] user: drh branch: begin-concurrent-3.39, size: 293309)
2022-09-01
14:33
[fea5ae2625] part of check-in [8403c0d5d6] Defer deleting a transient SELECT statement associated with a flattening of one arm of a compound SELECT until after the parse has completed. (check-in: [8403c0d5d6] user: drh branch: branch-3.39, size: 293294)
13:51
[d69dfb5b08] part of check-in [1c4157c71c] Defer deleting a transient SELECT statement associated with a flattening of one arm of a compound SELECT until after the parse has completed. This is a follow-up and enhancement to check-in [6e6b3729e0549de0] in response to an assertion fault reported by Chromium. (check-in: [1c4157c71c] user: drh branch: trunk, size: 293229)
2022-08-31
14:40
[b2fc1c7f48] part of check-in [5f93239a8c] Do not attempt the OP_Count optimization on queries with HAVING clauses. This fixes a problem exposed by [2cf373b10c9bc4cb]. (check-in: [5f93239a8c] user: drh branch: branch-3.39, size: 293232)
2022-08-22
15:42
[af6dfc9ab6] part of check-in [7eac6136ab] Merge all recent trunk enhancements into the begin-concurrent branch. (check-in: [7eac6136ab] user: drh branch: begin-concurrent, size: 293182)
02:00
[ccce37e7fb] part of check-in [e5eaa80e81] Add the new internal interface sqlite3DbNNFreeNN(db,ptr) where both the db and ptr parameters are guaranteed to be non-NULL. Use this where appropriate to save more than 2 million CPU cycles on the standard performance test. (check-in: [e5eaa80e81] user: drh branch: trunk, size: 293167)
2022-08-04
17:17
[d66bc50c33] part of check-in [5e1db87cfa] Fix a problem with the query optimizer for LIMIT/OFFSET queries when underlying query is a UNION ALL and both arms of the UNION ALL are subqueries with an ORDER BY clause. (check-in: [5e1db87cfa] user: drh branch: branch-3.39, size: 293215)
17:15
[4750fbe9d8] part of check-in [6c806f64bb] Fix a problem with the query optimizer for LIMIT/OFFSET queries when underlying query is a UNION ALL and both arms of the UNION ALL are subqueries with an ORDER BY clause. This bug was reported at forum post 6b5e9188f0657616. The problem was introduced in 2015 (SQLite version 3.9.0) by check-in [4b631364354068af]. See also ticket [b65cb2c8d91f6685]. (check-in: [6c806f64bb] user: drh branch: trunk, size: 293120)
2022-07-26
15:32
[76708e3a8c] part of check-in [2bda4fca06] Make sure IF_NULL_ROW expressions receive a separate slot in the sorter used to implement GROUP BY. (check-in: [2bda4fca06] user: drh branch: flatten-left-join, size: 293036)
14:37
[7d385fbf6b] part of check-in [e717e029bd] Improved AggInfo.aCol debugging output, intended to debug a problem with LEFT JOIN flattening into an aggregate query with GROUP BY. (check-in: [e717e029bd] user: drh branch: flatten-left-join, size: 293001)
01:20
[2219591ff1] part of check-in [f48bd8f85d] Performance optimization: avoid unnecessary calls to computeLimitRegisters(). (check-in: [f48bd8f85d] user: drh branch: trunk, size: 292773)
2022-07-25
15:54
[a9516e1453] part of check-in [816da9a893] Allow subqueries on the right-hand side of a LEFT JOIN to be flattened even if they contain a GROUP BY clause. (check-in: [816da9a893] user: drh branch: flatten-left-join, size: 292757)
11:19
[5d1f58fad2] part of check-in [dbe522b011] If the LHS of a LEFT JOIN is flattened into an aggregate parent query, avoid executing OP_IfNullRow on an unopened cursor by disallowing the index-only optimization. (Later:) Does not work if automatic indexes are disabled. (check-in: [dbe522b011] user: dan branch: nonworking-flatten-left-join, size: 292952)
2022-07-15
15:24
[a5bff2d563] part of check-in [2be8fa158e] Fix harmless compiler warnings seen with MSVC. (check-in: [2be8fa158e] user: mistachkin branch: branch-3.39, size: 293131)
2022-07-14
01:49
[92bfb2f082] part of check-in [b88d6c4b81] When applying the omit-ORDER-BY optimization, defer deleting the AST of the deleted ORDER BY clause until after code generation ends. (check-in: [b88d6c4b81] user: drh branch: branch-3.39, size: 293121)
01:48
[45b93eee3c] part of check-in [f22f95b838] When applying the omit-ORDER-BY optimization [85ddaf1b59a19cbd], defer deleting the AST of the deleted ORDER BY clause until after code generation ends. Fix for CVE-2022-3039. Test case in TH3. (check-in: [f22f95b838] user: drh branch: trunk, size: 292863)
2022-07-13
16:06
[716d552232] part of check-in [cf9ed7f2e1] The query flattener should not run if the subquery is a compound that contains a RIGHT JOIN in any arm and the subquery is not the first element of the outer query. Otherwise, prior elements of the outer query will not have the JT_LTORJ flag set. Fix for the problem reported in forum post 174afeae5734d42d. (check-in: [cf9ed7f2e1] user: drh branch: branch-3.39, size: 293048)
15:52
[01e5099d4f] part of check-in [274e244c85] The query flattener should not run if the subquery is a compound that contains a RIGHT JOIN in any arm and the subquery is not the first element of the outer query. Otherwise, prior elements of the outer query will not have the JT_LTORJ flag set. Fix for the problem reported in forum post 174afeae5734d42d. (check-in: [274e244c85] user: drh branch: trunk, size: 292790)
2022-07-08
11:55
[061b628dd1] part of check-in [99afb3f41b] Remove an obsolete statement from a comment. No changes to code. (check-in: [99afb3f41b] user: drh branch: trunk, size: 292032)
2022-07-06
23:50
[3c6558bb06] part of check-in [61e2094afb] Fix harmless compiler warnings seen with MSVC. (check-in: [61e2094afb] user: mistachkin branch: trunk, size: 292131)
2022-07-01
21:03
[fee45b7866] part of check-in [566b7842ee] Do not attempt the OP_Count optimization on queries with HAVING clauses. This fixes a problem exposed by [2cf373b10c9bc4cb]. (check-in: [566b7842ee] user: dan branch: trunk, size: 292121)
2022-06-25
19:43
[aa89ca7cf9] part of check-in [2cf373b10c] Allow flattening of a subquery that is the right operand of a LEFT JOIN in an aggregate query as long as there is no GROUP BY clause. (The GROUP BY clause will interfere with the operation of the TK_IF_NULL_ROW expression nodes.) (check-in: [2cf373b10c] user: drh branch: trunk, size: 292104)
2022-06-24
14:55
[2d2a7636b6] part of check-in [5ae706a401] Merge 3.39.0 release candidate 1 changes into the begin-concurrent branch. (check-in: [5ae706a401] user: drh branch: begin-concurrent, size: 292305)
2022-06-23
20:56
[8b62787f69] part of check-in [641dfb9182] Reintroduce flattener constraint (3c), but this time make it apply only if the outer query holds a GROUP BY, not if the outer query is an aggregate. (check-in: [641dfb9182] user: drh branch: flatten-left-join, size: 292024)
15:15
[0e07ed5e7d] part of check-in [f8fe936ad4] Add back the ability to flatten a LEFT JOIN subquery - previously removed due to ticket [cad1ab4cb7b0fc344]. (check-in: [f8fe936ad4] user: drh branch: flatten-left-join, size: 291982)
12:36
[2db8bbf13f] part of check-in [5fa00959eb] Minor correction to a comment. No code changes. (check-in: [5fa00959eb] user: drh branch: trunk, size: 292290)
2022-06-22
15:55
[ede9acfd0b] part of check-in [5c9133ef43] More comment fixes. No changes to code. (check-in: [5c9133ef43] user: drh branch: trunk, size: 292290)
2022-06-21
12:54
[9b81259e75] part of check-in [1f57584102] When doing a push-down of a WHERE clause into an aggregate subquery that has no FROM clause, do not convert the WHERE clause into a HAVING clause as should normally be done for an aggregate, but leave it as a WHERE clause. We will use a different approach to address forum post 1a7fea4651. (check-in: [1f57584102] user: drh branch: backout, size: 292356)
2022-06-20
17:04
[baadb1b3fd] part of check-in [e615dbe02c] Do not allow an ON clause to references tables to its right if there is a RIGHT or FULL join anywhere in the query. Other RDBMSes prohibit this always, but SQLite must allow ON clauses to reference tables to their right for legacy compatibility, unless there is a RIGHT or FULL join someplace in the query, in which case there is no legacy to support. (check-in: [e615dbe02c] user: drh branch: trunk, size: 292287)
12:42
[e3181898cc] part of check-in [fb0a23b678] The fix at [cab9b4cccd13bf0a] was incomplete, as demonstrated by forum post 57bdf2217d. This check-in should complete the fix. (check-in: [fb0a23b678] user: drh branch: trunk, size: 292068)
2022-06-16
13:37
[fe52e588e4] part of check-in [221e07ed78] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [221e07ed78] user: drh branch: begin-concurrent, size: 291493)
2022-06-13
12:42
[ee3113de67] part of check-in [b1be2259e2] Do not remove the EP_CanBeNull flag from expressions during a LEFT JOIN strength reduction if the query also contains a RIGHT JOIN. Fix for the problem identified by [forum/forumpost/b40696f50145d21c|forum post b40696f50145d21c]. (check-in: [b1be2259e2] user: drh branch: trunk, size: 291478)
2022-06-10
11:28
[66ef4e23fe] part of check-in [cab9b4cccd] Do not allow constant propagation between WHERE-clause terms and ON-clause terms as this can confuse RIGHT JOIN. Fix for the problem reported by forum post 8e4c352937e82929. (check-in: [cab9b4cccd] user: drh branch: trunk, size: 290996)
2022-06-08
17:48
[5f2dfc578e] part of check-in [8c9e2d6315] Improved comments on the new query flattener restriction of the previous check-in. Also a NEVER() macro on an unreachable branch. (check-in: [8c9e2d6315] user: drh branch: trunk, size: 290872)
15:30
[0271d9099d] part of check-in [c585d6a467] Add restriction (29) to the query flattener - do not allow flattening that would leave both EP_InnerON and EP_OuterON constraints on the same join term. (check-in: [c585d6a467] user: drh branch: right-join-query-flattener, size: 290206)
2022-06-07
13:09
[37d984cb3e] part of check-in [3f45007d54] Fix the query flattener to deal with a RIGHT JOIN corner case described by forum post 323f86cc30. (check-in: [3f45007d54] user: drh branch: trunk, size: 289531)
2022-06-02
16:26
[8b98d3e551] part of check-in [2a952c7738] Fix a problem with flattening and window functions causing an "IS <column>" to be transformed to "IS TRUE" or "IS FALSE" when <column> is a view or sub-select expression that is the literal value "TRUE" or "FALSE". (check-in: [2a952c7738] user: dan branch: trunk, size: 289468)
2022-05-28
14:25
[1fe2f931b7] part of check-in [d6f6ee5cbc] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [d6f6ee5cbc] user: drh branch: begin-concurrent, size: 289295)
2022-05-27
18:06
[7a4c5023d6] part of check-in [3492fe8a21] Mark an always-true conditional as ALWAYS(). (check-in: [3492fe8a21] user: drh branch: trunk, size: 289280)
2022-05-25
02:32
[a0dca0b4a3] part of check-in [a124e4f96f] An attempt to get UPDATE FROM working when the FROM clause contains a RIGHT or FULL JOIN. (check-in: [a124e4f96f] user: drh branch: update-from-right-join, size: 289246)
2022-05-21
18:03
[4f13d01141] part of check-in [16bf350683] Defer materializing a view or subquery until the materialization is actually needed, so that if it is not needed, not useless work is performed. (check-in: [16bf350683] user: drh branch: deferred-materialize, size: 288797)
15:54
[7a6a028b6a] part of check-in [34d7045b2c] Fix a typo in a comment. (check-in: [34d7045b2c] user: drh branch: deferred-materialize, size: 288830)
15:12
[ab5c8eaf73] part of check-in [cebd4fd606] Use the newer OP_BeginSubrtn opcode instead of OP_Integer to start the subroutine used to matrialize a view. This does not change execution but does make the byte code a little easier to read. (check-in: [cebd4fd606] user: drh branch: deferred-materialize, size: 288830)
2022-05-13
14:52
[74060a09f6] part of check-in [1ffea07ff9] Improved names for flags on the Expr object: EP_FromJoin becames EP_OuterON and EP_InnerJoin becomes EP_InnerON. (check-in: [1ffea07ff9] user: drh branch: trunk, size: 288812)
2022-05-10
15:55
[5096a2e8ab] part of check-in [8f9355028b] Fix a harmless UBSAN warning. (check-in: [8f9355028b] user: drh branch: trunk, size: 288843)
12:00
[8d2d39df8e] part of check-in [f65bd76760] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [f65bd76760] user: drh branch: begin-concurrent, size: 288862)
00:24
[cd17de0cab] part of check-in [c6c3115f3a] Simplified "hidden" and "no-expand" handling in the *-expander. (check-in: [c6c3115f3a] user: drh branch: trunk, size: 288847)
2022-05-09
16:29
[6c0fba59d2] part of check-in [387c852375] Add ALWAYS() on two unreachable branches in the * expander. (check-in: [387c852375] user: drh branch: trunk, size: 288973)
12:59
[625865ad9f] part of check-in [d2717348f4] Simplify a branch in the "*" expansion logic. New test case for an INSTEAD OF trigger on a RIGHT and FULL outer join. (check-in: [d2717348f4] user: drh branch: trunk, size: 288957)
2022-05-03
16:18
[151adca2c9] part of check-in [c19c3c4869] Fix a typo in a comment. (check-in: [c19c3c4869] user: drh branch: right-join, size: 288973)
2022-05-02
20:49
[727e718482] part of check-in [5341d4bbe9] Organize the various flag bits of the ExprList_item object into a substructure so that the whole lot can be copied all at once. Faster and smaller code. (check-in: [5341d4bbe9] user: drh branch: right-join, size: 288976)
20:04
[0c54305ca9] part of check-in [158b80bed6] Improved comments. (check-in: [158b80bed6] user: drh branch: right-join, size: 288877)
19:59
[41a371b025] part of check-in [6f9c0b07aa] Name resolution and "*" wildcard expansion for parenthesized FROM clauses seems to work the same as PG. The code is chaos, however, and needs some cleanup. (check-in: [6f9c0b07aa] user: drh branch: right-join, size: 288878)
2022-04-28
17:35
[b319bfcdf6] part of check-in [c86804917e] Tweaks to the name resolution on parenthesized joins. A small number of tests fail now due to extra columns appearing in the expansion of "*". (check-in: [c86804917e] user: drh branch: right-join, size: 288393)
12:52
[be3da92c2b] part of check-in [3fd9706bba] Merge trunk enhancements into the right-join branch. (check-in: [3fd9706bba] user: drh branch: right-join, size: 288327)
2022-04-27
13:00
[fdb54f5185] part of check-in [5590f0a4e6] Merge version 3.38.3 fixes onto the begin-concurrent-wal2-3.38 branch. (check-in: [5590f0a4e6] user: drh branch: begin-concurrent-wal2-3.38, size: 278302)
2022-04-25
21:21
[ba0cd3d264] part of check-in [4fbb9ffe72] Fix a problem with automatic indexes introduced by check-in [664b461bb5063d980] and reported by forum post 0d3200f4f3bcd3a3. (check-in: [4fbb9ffe72] user: drh branch: branch-3.38, size: 278287)
20:47
[cc1a758140] part of check-in [05917bfa02] Do not allow the push-down optimization on the right table of a RIGHT JOIN. (check-in: [05917bfa02] user: drh branch: autoindex-fix, size: 287127)
20:38
[0ee60363b0] part of check-in [10bf0e6138] The pushDownWhereTerms() routine should be using sqlite3ExprIsTableConstraint(), not sqlite3ExprIsTableConstant(). This fixes many problems, but still an error persists in join7.test. (check-in: [10bf0e6138] user: drh branch: autoindex-fix, size: 287069)
19:40
[e5772fb9c1] part of check-in [7ca3456c00] Failed first attempt to fix a problem with automatic indexes introduced by check-in [664b461bb5063d980] and reported by forum post 0d3200f4f3bcd3a3. I thought that I had tested this prior to check-in and that it worked. But after checking it in, I find that there are many test failures. (check-in: [7ca3456c00] user: drh branch: autoindex-fix, size: 287076)
14:59
[ea203cd4f5] part of check-in [c0f9ebab54] Add a new optimizer disabling bit to disable just the UNION ALL branch of the query flattener. (check-in: [c0f9ebab54] user: drh branch: trunk, size: 287199)
2022-04-23
14:30
[7236f3c4c1] part of check-in [f6ab67965b] Fix an operator typo - This indicates that the branch needs further investigation and verification. (check-in: [f6ab67965b] user: drh branch: right-join, size: 288330)
07:29
[3b3f8d2c51] part of check-in [3a6b0db451] Fix minor problems with the new join table name resolution logic. (check-in: [3a6b0db451] user: drh branch: right-join-colnames, size: 288331)
2022-04-22
23:18
[18c2b25560] part of check-in [c3a427575f] Add the ability to access the USING columns of the right or left tables of an OUTER JOIN even if the OUTER JOIN is in parentheses. Prototype code only. (check-in: [c3a427575f] user: drh branch: right-join-colnames, size: 288088)
18:07
[92b3b25043] part of check-in [9425d79cb4] Make use of the "%!S" format when running ExplainSubquery. (check-in: [9425d79cb4] user: drh branch: trunk, size: 287130)
17:36
[7b641cd9ca] part of check-in [a2d3ee9242] Improve EXPLAIN QUERY PLAN output and comments on bytecode listings by distinguishing between "subquery" and "join" and using consistent names across EQP and bytecode. (check-in: [a2d3ee9242] user: drh branch: trunk, size: 287264)
16:15
[0d0a82875c] part of check-in [8d631a6b9e] Honor the MATERIALIZED keyword on a common table expression by not flattening the CTE into an outer query. (check-in: [8d631a6b9e] user: drh branch: trunk, size: 287144)
12:46
[cbfe750ec7] part of check-in [d942530a65] Minor simplification to the result-set wildcard expander for SF_NestedFrom. (check-in: [d942530a65] user: drh branch: right-join, size: 286987)
2022-04-21
13:11
[51e8b778ab] part of check-in [cd8272fc2a] Avoid materializing columns of SF_NestedFrom subqueries that are never used. Other code improvements manually imported from the right-join-paren branch. (check-in: [cd8272fc2a] user: drh branch: right-join, size: 286663)
12:11
[bad047ff04] part of check-in [6b326b3bcf] Further attempts to get name resolution to work correctly with parenthisized FROM clauses. Work-in-progress. Lots of crashes and wrong answers. (check-in: [6b326b3bcf] user: drh branch: right-join-paren, size: 287827)
01:49
[66f0c568a9] part of check-in [959b718214] Attempting to improve name resolution for parenthesized FROM clauses. Only partially working. (check-in: [959b718214] user: drh branch: right-join-paren, size: 287610)
2022-04-20
21:58
[4b10a6b722] part of check-in [07906e3c4f] Try to avoid materializing unused columns when processing a parenthesized FROM clause. (check-in: [07906e3c4f] user: drh branch: right-join-paren, size: 286835)
18:12
[8978bab868] part of check-in [ba04142e09] Small correction to the new bUsed logic of sqlite3ProcessJoin(). (check-in: [ba04142e09] user: drh branch: right-join, size: 286382)
16:26
[88f00d5b9b] part of check-in [1118655f4d] Comment fixes and improvements in sqlite3ProcessJoin(). (check-in: [1118655f4d] user: drh branch: right-join, size: 286362)
15:07
[df2bea1b4c] part of check-in [0da2232624] Improved tracking of nested SELECT objects used to implement parenthensized FROM terms. (check-in: [0da2232624] user: drh branch: right-join, size: 286048)
2022-04-19
23:00
[708edcf157] part of check-in [d5ceaef3fc] Merge the ALTER TABLE fix from trunk. (check-in: [d5ceaef3fc] user: drh branch: right-join, size: 285206)
20:47
[2df3b525ac] part of check-in [24755fd065] Fix a problem in ALTER TABLE with handling "table.*" expressions within SELECT statements in triggers. (check-in: [24755fd065] user: dan branch: trunk, size: 280877)
18:23
[6fa15ee07a] part of check-in [63b8f8aec2] Fix a NULL-pointer dereference that can occur on an aggregate query that uses FULL JOIN. dbsqlfuzz 496a35dd4eefcd7935aaaeb0c69056bf49785d28. (check-in: [63b8f8aec2] user: drh branch: right-join, size: 284991)
15:56
[50051eee5a] part of check-in [b966d52437] Mark an unreachable "just-in-case" branch as unreachable. (check-in: [b966d52437] user: drh branch: right-join, size: 284957)
2022-04-18
23:20
[459cea7ae6] part of check-in [837322aa95] Fix the query flattener so that it does not flatten a RIGHT or FULL JOIN into any position of the outer query other than the first. (check-in: [837322aa95] user: drh branch: right-join, size: 284950)
09:59
[6544e02167] part of check-in [0ccb224e13] Leave sqlite3ProcessJoin() early if an OOM is encountered in the NATURAL to USING converter. This avoids NULL pointer dereferences further along in the code. (check-in: [0ccb224e13] user: drh branch: right-join, size: 284659)
00:04
[fcfa9e7806] part of check-in [e62156b696] When converting a NATURAL JOIN into a JOIN USING, make sure to insert the name correctly into the IdList even if it is a wierd quoted name. (check-in: [e62156b696] user: drh branch: right-join, size: 284624)
2022-04-17
18:46
[1d0c3aece7] part of check-in [9fd3f22e22] Further improvements to USING() processing for RIGHT and FULL JOINs. All currently known issues are now resolved. Performace is improved. (check-in: [9fd3f22e22] user: drh branch: right-join, size: 284496)
2022-04-16
22:57
[0af8c196a4] part of check-in [9ffc2b2319] Fix the USING to ON translation so that it works correctly for a sequence of two or more joins where one of the joins to the right-hand side of the list is a RIGHT or FULL JOIN. (check-in: [9ffc2b2319] user: drh branch: right-join, size: 285758)
18:33
[3074a36194] part of check-in [a7babf7541] Additional SELECT trace logic: Show the tree after result-set wildcard expansion but before name resolution. (check-in: [a7babf7541] user: drh branch: right-join, size: 283932)
12:40
[d273657c29] part of check-in [5bfb862419] RIGHT JOIN USING now appears to work the same as PG-14. Legacy tests pass. (check-in: [5bfb862419] user: drh branch: right-join, size: 283753)
2022-04-15
18:30
[d36cf25d63] part of check-in [91530990e0] When expanding "*" in the result set of a SELECT, do not attach a table name to columns that are in subsequent USING clauses. (check-in: [91530990e0] user: drh branch: right-join-using, size: 283693)
17:08
[820941d6c8] part of check-in [8378e1e0d2] The sqlite3ProcessJoin() routine converts a NATURAL JOIN into a JOIN USING so that henceforth the NATURAL keyword can be ignored. (check-in: [8378e1e0d2] user: drh branch: right-join, size: 282752)
15:15
[b785c8d0dc] part of check-in [b925f72b6f] Add the "3" in the name of the sqlite3ProcessJoin() function. (check-in: [b925f72b6f] user: drh branch: right-join, size: 282751)
2022-04-12
20:20
[d48e4ddfd0] part of check-in [6125905015] Ensure that the JT_LTORJ bit in the SrcItem.fg.jointype is preserved during query flattening. (check-in: [6125905015] user: drh branch: right-join, size: 282749)
18:40
[31148fafdf] part of check-in [ab0a0562dd] For the bad join type error message "unknown or unsupported join type" remove the "or unsupported" clause, because we now support all valid join types. (check-in: [ab0a0562dd] user: drh branch: right-join, size: 282704)
2022-04-11
20:15
[fdec126045] part of check-in [8e02cdf5b1] The query flattener must add TK_IF_NULL_ROW opcodes on substituted values that land on the left operand of a RIGHT JOIN, just as it already does for the right operand of a LEFT JOIN. (check-in: [8e02cdf5b1] user: drh branch: right-join, size: 282719)
14:43
[67d793d9d3] part of check-in [7ef3e99a73] Do not attempt the LEFT JOIN strength reduction optimization on a FULL JOIN. (check-in: [7ef3e99a73] user: drh branch: right-join, size: 281306)
12:38
[41d1b171d1] part of check-in [0f6f61c366] Make a distinction between (1) WHERE clause constraints, (2) ON/USING constraints on outer joins, and (3) ON/USING clause constraints on inner joins. Formerly, there was no distinctionb between 1 and 3, but RIGHT JOIN needs to know the difference. Make RIGHT JOIN aware of this difference and add test cases. (check-in: [0f6f61c366] user: drh branch: right-join, size: 281289)
11:59
[178edb7fc4] part of check-in [5be5ede5cc] Fix some comments that refer to LEFT JOIN that should refer to OUTER JOIN. No changes to code. (check-in: [5be5ede5cc] user: drh branch: right-join, size: 281050)
11:48
[360720df7d] part of check-in [29927926eb] Merge the Expr.w.iJoin name change from trunk into the right-join branch. (check-in: [29927926eb] user: drh branch: right-join, size: 281055)
11:25
[5ac7c08646] part of check-in [e8c00442d2] Rename the Expr.w.iRightJoinTable to just Expr.w.iJoin, so that the words "RightJoin" in the former name do not lead readers to believe that this has something to do with RIGHT JOINs in particular. (check-in: [e8c00442d2] user: drh branch: trunk, size: 280722)
10:38
[e889b6a0fe] part of check-in [ccb61fb1f3] Ensure that the JT_LTORJ flag is preserved when flattening a subquery that is on the left side of a RIGHT JOIN. (check-in: [ccb61fb1f3] user: drh branch: right-join, size: 281185)
00:21
[451df0c744] part of check-in [5aa0c9ea9c] Do not allow query flattening nor the push-down optimization on the right operand of a RIGHT JOIN. (check-in: [5aa0c9ea9c] user: drh branch: right-join, size: 281088)
2022-04-10
23:01
[4b67f6d827] part of check-in [cf00ebfc4b] Revisit [f84b2beca7197589]: disallow co-routine implementations of tables that are to the left of a RIGHT JOIN, to avoid other complications. (check-in: [cf00ebfc4b] user: drh branch: right-join, size: 280785)
19:51
[3d723c58ce] part of check-in [f84b2beca7] When the left-most table of a RIGHT JOIN is implemented as a co-routine, make sure all its columns are flushed to NULL when it finishes so that they appear to be NULL during the RIGHT JOIN post-processing. (check-in: [f84b2beca7] user: drh branch: right-join, size: 280826)
2022-04-08
19:20
[cfa1056495] part of check-in [415abd6731] Preliminary code to support RIGHT JOIN. Everything seems to work, except that the code to compute the unmatched rows for the RIGHT JOIN has not yet been added, so the result of a RIGHT JOIN is currently the same as an INNER JOIN. (check-in: [415abd6731] user: drh branch: right-join, size: 280696)
15:11
[7c106b3f36] part of check-in [48f2e5a1fb] Improved explanation and commentary on the sqlite3JoinType() routine. One of the error messages changes slightly, but besides that everything works the same. (check-in: [48f2e5a1fb] user: drh branch: trunk, size: 280852)
2022-04-07
01:11
[d6c04eb933] part of check-in [158156a3e3] Improved technique for parsing the ON and USING clauses of a join is faster and uses less memory. (check-in: [158156a3e3] user: drh branch: trunk, size: 278532)
2022-04-06
18:30
[c3dab5fb5d] part of check-in [84c239a071] Improvements to the display of AST for DML statements. (check-in: [84c239a071] user: drh branch: trunk, size: 278585)
11:08
[bf46b8fb1f] part of check-in [393fa32e18] Rename debugging defines and variables from SELECTTRACE to TREETRACE (and similar) since the functionality has how expanded to include data structures beyond SELECT statements. Should not affect deliverable builds. (check-in: [393fa32e18] user: drh branch: trunk, size: 278430)
2022-03-17
18:03
[c366c05e48] part of check-in [0c5be14aac] Updates a comment and an assert(). (check-in: [0c5be14aac] user: drh branch: vtab-distinct-ordered, size: 278486)
2022-03-16
12:06
[16453eff42] part of check-in [11f4508895] Experimental change to have sqlite3_vtab_distinct() return 3 to indicate that results should sorted and duplicates may be removed. (check-in: [11f4508895] user: dan branch: vtab-distinct-ordered, size: 278472)
2022-03-12
14:47
[e249a7b214] part of check-in [aa8b5e9558] Merge the latest trunk enhancements, including the 3.38.1 patches plus additional performance enhancements, into the begin-concurrent branch. (check-in: [aa8b5e9558] user: drh branch: begin-concurrent, size: 278389)
2022-02-25
11:30
[4890a3cfee] part of check-in [3934601329] Fix unimportant typos in comment text. (check-in: [3934601329] user: drh branch: trunk, size: 278374)
2022-02-15
20:18
[9f660188ff] part of check-in [94838f16ba] Merge the latest trunk changes into the begin-concurrent branch. (check-in: [94838f16ba] user: drh branch: begin-concurrent, size: 278389)
2022-02-05
21:49
[3baa9dd8cf] part of check-in [32a3a53b62] Record the position of many identifiers in the parse using the new Expr.w.iOfst field. This is done with the idea of providing offset results for sqlite3_error_offset() for a more kinds of errors, though that part is not yet implemented. (check-in: [32a3a53b62] user: drh branch: trunk, size: 278374)
2022-02-04
17:40
[23af49702c] part of check-in [85054a8691] Merge trunk enhancements into the begin-concurrent branch. (check-in: [85054a8691] user: drh branch: begin-concurrent, size: 278357)
2022-01-27
16:14
[a6d2d4bed2] part of check-in [74fa5757ee] Give the virtual table xBestIndex method access to (some) OFFSET and LIMIT clauses. (check-in: [74fa5757ee] user: drh branch: vtab-limit-offset, size: 278342)
2022-01-25
15:20
[760d9f28db] part of check-in [dae81f45d2] Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: [dae81f45d2] user: drh branch: begin-concurrent, size: 278350)
2022-01-24
16:47
[5799f5b15e] part of check-in [1f7fa46126] Remove many redundant checks for sqlite3.mallocFailed now that any OOM should cause Parse.nErr to be non-zero. (check-in: [1f7fa46126] user: drh branch: trunk, size: 278335)
12:48
[70cdf84cdc] part of check-in [ad7aace761] Make sure the sqlite3OomFault() routine sets an error in the Parse object if there is a Parse object active and linked to the database connection. (check-in: [ad7aace761] user: drh branch: trunk, size: 278195)
2022-01-20
12:58
[ab57172554] part of check-in [ab160e8bae] Fix harmless scan-build warnings. (check-in: [ab160e8bae] user: drh branch: trunk, size: 278178)
2022-01-17
19:17
[df53cc54f9] part of check-in [02daae7a67] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [02daae7a67] user: drh branch: begin-concurrent, size: 278170)
2022-01-12
20:31
[a4a23a70f0] part of check-in [9282bcde30] When the result of a subquery is to be stored in a register and that subquery has an ORDER BY clause and an OFFSET, NULL out the destination register before starting the ORDER BY so that the register will be set correctly even if the OFFSET is larger than the number of output rows. Fix for the problem reported in forum post 0ec80f12d02acb3f. (check-in: [9282bcde30] user: drh branch: trunk, size: 278155)
2021-12-30
17:46
[342e096c27] part of check-in [f2887e018b] Remove unnecessary conditionals around the ORDER BY resolver calls in multiSelectOrderBy(). (check-in: [f2887e018b] user: drh branch: trunk, size: 278055)
00:37
[bc13036736] part of check-in [bb8522fe0d] When implementing a multi-way compound SELECT using merge, try to balance the merge tree. (check-in: [bb8522fe0d] user: drh branch: trunk, size: 278116)
2021-11-27
14:45
[7e8082835f] part of check-in [c5f2ad1942] Merge version 3.37.0 into the begin-concurrent branch. (check-in: [c5f2ad1942] user: drh branch: begin-concurrent, size: 277541)
2021-11-26
17:10
[a7a3d9f54e] part of check-in [eb878c01f3] Improved defenses against integer overflow when computing the size of a memory allocations. No bugs were fixed here. But perhaps future bugs will be prevented. (check-in: [eb878c01f3] user: drh branch: trunk, size: 277526)
15:08
[335db0c2e0] part of check-in [1489b196ce] Fixes to internal comments. No changes to code or documentation. (check-in: [1489b196ce] user: drh branch: trunk, size: 277521)
2021-11-22
16:14
[9e70ca5f58] part of check-in [8f3e68424a] Merge the latest trunk changes into the begin-concurrent branch. (check-in: [8f3e68424a] user: drh branch: begin-concurrent, size: 277513)
2021-11-15
14:11
[187e57a53c] part of check-in [e30917278c] Fix a problem causing the count(*) optimization to be misapplied in some cases where an aggregate sub-query uses a count() expression that is aggregated against the outer query. (check-in: [e30917278c] user: dan branch: trunk, size: 277498)
2021-11-12
14:39
[7fa20486dd] part of check-in [5995dd4de4] Improved handling of OOM while reallocating a column name to add type information. dbsqlfuzz 5a195b4233649e49e0aa34f1b743ca192d85b198 (check-in: [5995dd4de4] user: drh branch: trunk, size: 277454)
2021-11-09
15:06
[1f188fd3aa] part of check-in [2d0c8f3099] Merge all recent trunk enhancements into the begin-concurrent branch. (check-in: [2d0c8f3099] user: drh branch: begin-concurrent, size: 277340)
2021-11-08
16:38
[ac16dee42a] part of check-in [6f4369666e] Add assert()s that verify that cursor numbers on subqueries are always greater than outer cursor numbers. Except, this is not always true in the presence of query flattening. We might need to relax that constraint. This branch will probably become a dead-end. For now it is saved for reference. (check-in: [6f4369666e] user: drh branch: well-ordered-cursors, size: 277437)
2021-11-05
11:52
[b4b3a0f32e] part of check-in [2927185be8] Remove an incorrect NEVER() reported at forum post 5bbabfb7ce. Also use this opportunity to improve the isSimpleCount() function with better formatting, an expanded header comment, and some extra assert() and textcase() macros. (check-in: [2927185be8] user: drh branch: trunk, size: 277325)
2021-10-21
14:13
[8c2341a980] part of check-in [ae4eed0b7e] Merge recent trunk enhancements into begin-concurrent branch. (check-in: [ae4eed0b7e] user: drh branch: begin-concurrent, size: 276822)
2021-10-12
18:05
[32d25b5af6] part of check-in [7cfc839e5f] Fix an incorrect assert() in SQLITE_ENABLE_SORTER_REFERENCES logic - a new assert() introduced 5 days ago by [87e2f5eb436fc448]. (check-in: [7cfc839e5f] user: drh branch: trunk, size: 276807)
2021-10-09
16:00
[9eab80721a] part of check-in [35a9de2c97] Detect any attempt to use an INDEXED BY clause on a CTE and report an error. (check-in: [35a9de2c97] user: drh branch: trunk, size: 276782)
2021-10-07
23:04
[2367906fef] part of check-in [9b91fbcfcc] New assert() statements to protect the u1 and u2 unions of SrcList. (check-in: [9b91fbcfcc] user: drh branch: trunk, size: 276725)
20:46
[56069fb5fa] part of check-in [87e2f5eb43] Protect access to the Expr.y union using nearby assert()s and branches. (check-in: [87e2f5eb43] user: drh branch: trunk, size: 276617)
17:43
[6164779bda] part of check-in [8eaa1d4a98] Protect all accesses to the Expr.x union using nearby assert()s and branches. (check-in: [8eaa1d4a98] user: drh branch: trunk, size: 276419)
13:40
[6b33d8197d] part of check-in [9af863f065] Protect all accesses to the FuncDef.u and Expr.u unions using nearby assert()s or branches. (check-in: [9af863f065] user: drh branch: trunk, size: 276116)
2021-10-04
22:34
[c49365e313] part of check-in [32f33f3569] Fix harmless static-analyzer warnings. (check-in: [32f33f3569] user: drh branch: trunk, size: 276016)
13:18
[c4f14e9aaa] part of check-in [6604a08596] Fix harmless static analyzer warnings. (check-in: [6604a08596] user: drh branch: trunk, size: 275939)
11:54
[586b6adc13] part of check-in [4f5ef7aa4c] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [4f5ef7aa4c] user: drh branch: begin-concurrent, size: 275926)
2021-10-01
21:01
[916d18b586] part of check-in [94b59691ee] Fix harmless compiler warnings. (check-in: [94b59691ee] user: drh branch: trunk, size: 275911)
2021-09-30
18:42
[47a6e97bb0] part of check-in [6e791a24ce] Fix a problem with view handling in SQLITE_OMIT_VIRTUAL_TABLE builds. (check-in: [6e791a24ce] user: dan branch: trunk, size: 275928)
2021-09-13
18:16
[030c3d0732] part of check-in [83a83475c5] Add assert() statements to refute forum post 9f4e7f58fbb66ddd. (check-in: [83a83475c5] user: drh branch: trunk, size: 275927)
2021-08-24
17:07
[b2c48dfc02] part of check-in [c7f0813cab] Correctly preserve the collating sequence for a column when changing its datatype. Fix for the problem reported by forum post 36be3d3a08da9d92. Test cases in TH3. (check-in: [c7f0813cab] user: drh branch: trunk, size: 275739)
2021-08-21
16:42
[cf72265a34] part of check-in [600f1991e5] Defer deleting subqueries in the compound-SELECT code generator until the end of code generation, in order to avoid deleting expressions out from under the aggregation function sanity checking assert()s that occur near the end of SELECT code generation. This fixes the assertion fault described by forum post cfcb4b461d. The problem goes back to check-in [6e6b3729e0549de0]. (check-in: [600f1991e5] user: drh branch: trunk, size: 275780)
2021-08-11
13:48
[0577308f09] part of check-in [a7ce29a6ef] Do not apply the push-down optimization to CTE subqueries that will be reused in other contexts in where the same optimization is unlikely to be valid. Fix for the bug reported by forum post d496c3d29bc93736. (check-in: [a7ce29a6ef] user: drh branch: trunk, size: 275687)
13:19
[082fe06fd0] part of check-in [b1926cc0ab] Improved comment on the OP_OpenDup used to get a new cursor for a reused materialized CTE. (check-in: [b1926cc0ab] user: drh branch: trunk, size: 275646)
2021-08-09
18:21
[7706c492da] part of check-in [b88b632830] Merge recent trunk enhancemenets into the begin-concurrent branch. (check-in: [b88b632830] user: drh branch: begin-concurrent, size: 275621)
2021-08-05
15:27
[63077c0243] part of check-in [832ac4c1ee] Store the collating sequence name for each column of a table as an extension to the column name, for an additional savings in the heap space needed to hold the schema. (check-in: [832ac4c1ee] user: drh branch: trunk, size: 275606)
2021-08-03
16:31
[c265649aed] part of check-in [8d806cf93c] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [8d806cf93c] user: drh branch: begin-concurrent, size: 275572)
2021-08-02
18:03
[5204112462] part of check-in [8b781dcaf6] Refactor field names in the Column object, zCnName and zCnColl, to make them unique and thus easier to find amid all the other code. (check-in: [8b781dcaf6] user: drh branch: trunk, size: 275557)
16:41
[2b25a79706] part of check-in [bbb6759bcf] Refactor the Table object to reduce its memory footprint. (check-in: [bbb6759bcf] user: drh branch: trunk, size: 275527)
2021-07-28
02:04
[99c36dd4e7] part of check-in [e9719f975f] Fix a harmless uninitialized variable read that occurs after an error associated with a subquery that uses DISTINCT. Found by a fuzzer. (check-in: [e9719f975f] user: drh branch: trunk, size: 275491)
2021-07-21
15:42
[3896009f30] part of check-in [60695359dc] Improved robustness of cursor renumbering in the UNION ALL flattener when operating on vector assignments of an UPDATE FROM. dbsqlfuzz 417d2b053b9b3c9edaf22dd515564f06999e029c (check-in: [60695359dc] user: drh branch: trunk, size: 275465)
2021-07-20
14:57
[bc9767ab49] part of check-in [1e35cc6d5c] Avoid a malfunction that could occur if the same correlated column reference appears in both the GROUP BY and the HAVING clause of a sub-select. dbsqlfuzz a779227f721a834df95f4f42d0c31550a1f8b8a2. (check-in: [1e35cc6d5c] user: dan branch: trunk, size: 275125)
2021-07-16
01:19
[0c783511b5] part of check-in [e31c588865] Get the "omit ORDER BY in FROM-clause subqueries" optimization working for the core test cases. (check-in: [e31c588865] user: drh branch: omit-subquery-order-by, size: 274613)
2021-07-15
19:29
[cc61c6b866] part of check-in [ef97c3e7c3] Attempt to omit ORDER BY clauses from FROM-clause subqueries if those ORDER BY clauses do not affect the output. See forum thread 2d76f2bcf65d256a for discussion. This can help the query flattener in some cases, resulting in faster query plans. The current implemention does not always work. (check-in: [ef97c3e7c3] user: drh branch: omit-subquery-order-by, size: 274120)
2021-07-13
15:30
[a75028a3d3] part of check-in [d2e6722037] Remove two incorrect assert() statements from the logic used to derive column names and types from subqueries. This allows the SQL associated with CVE-2020-13871 (ticket [c8d3b9f0a750a529]) to be tested. (check-in: [d2e6722037] user: dan branch: branch-3.28a, size: 242090)
2021-07-12
15:00
[381500d018] part of check-in [bcd014c473] Fix a defect in the query-flattener optimization identified by ticket [8f157e8010b22af0]. This fix is associated with CVE-2020-15358. (check-in: [bcd014c473] user: dan branch: branch-3.32a, size: 250695)
14:38
[4cbf5e611c] part of check-in [9e001b635f] Fix a defect in the query-flattener optimization identified by ticket [8f157e8010b22af0]. This fix is associated with CVE-2020-15358. (check-in: [9e001b635f] user: dan branch: branch-3.28a, size: 242273)
2021-07-05
11:27
[1c1230aaa4] part of check-in [740cb43025] Allow sub-queries in the FROM clause of an UPDATE...FROM statement to access the object being updated without using an alias, as is required in the parent query. (check-in: [740cb43025] user: dan branch: trunk, size: 273076)
2021-06-17
17:29
[3e7dcf9289] part of check-in [59303e69c3] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [59303e69c3] user: drh branch: begin-concurrent, size: 272533)
2021-06-14
20:08
[4fa607bab6] part of check-in [c09d90eec2] Fix an ALTER TABLE problem with handling infinite loops of CTEs in the database schema. (check-in: [c09d90eec2] user: dan branch: trunk, size: 272518)
12:23
[c586ad02fe] part of check-in [d81996340a] Update this branch with latest trunk changes. (check-in: [d81996340a] user: dan branch: begin-concurrent, size: 272489)
2021-06-12
17:45
[371cf15116] part of check-in [6796b7a248] An alternative approach to the use-after-free problem. (check-in: [6796b7a248] user: drh branch: alternative-oom-fix, size: 272474)
2021-06-10
19:37
[fd121048cb] part of check-in [5079b5d58f] Fix an assert() added by the previous commit that could fail with some database schemas. (check-in: [5079b5d58f] user: dan branch: alter-table-cte-fix-1, size: 272329)
19:08
[f242ba8a86] part of check-in [32e3ecfc8b] Fix problems with ALTER TABLE and schemas that contain views with complex CTEs. (check-in: [32e3ecfc8b] user: dan branch: alter-table-cte-fix-1, size: 272352)
14:36
[96d8a8c19d] part of check-in [8658a64d41] Improved robustness following OOM in the constant propagation optimization. dbsqlfuzz 001a20255c0df7495c21df62a20ea5b51e22c390. (check-in: [8658a64d41] user: drh branch: trunk, size: 272118)
2021-06-08
12:22
[f0c7f050b8] part of check-in [33babdb582] Add an assert() to prevent the value of the SQLITE_VTABRISK macros from being changed in a way that would break logic. (check-in: [33babdb582] user: drh branch: trunk, size: 271855)
2021-05-27
14:09
[2f4429e0b0] part of check-in [d61a875df4] Improved comment on the prpagateConstants() routine. No changes to executable code. (check-in: [d61a875df4] user: drh branch: trunk, size: 271783)
2021-05-26
23:10
[f2d664297f] part of check-in [9be208a6d7] Improvements to the constant-propagation optimization in order to better deal with unusual affinities. See forum post 6a06202608 for more detail. (check-in: [9be208a6d7] user: drh branch: trunk, size: 271052)
19:52
[d5c307553e] part of check-in [f17dec40a0] Minor optimization to opcode comparison logic in the fixes to the constant-propagation optimization on this branch. (check-in: [f17dec40a0] user: drh branch: constant-propagation-fix, size: 271689)
18:51
[c4cb9151f2] part of check-in [389ec669f4] Avoid assuming that an expression like "x=10" in a WHERE clause implies that CASE(x AS TEXT)=='10'. (check-in: [389ec669f4] user: dan branch: constant-propagation-fix, size: 271655)
18:46
[90e68ce982] part of check-in [f30fb19ff7] Take care that the code is not generated for the same Select object more than once, as transformations that apply during the first pass might cause problems for the second pass. dbsqlfuzz 836b625cd8a41809ef80fc7ebaa6554357bcb463. (check-in: [f30fb19ff7] user: drh branch: trunk, size: 269347)
2021-05-23
17:47
[531612539a] part of check-in [c2066dde53] Do not push a WITH clause onto the processing stack if prior errors have occurred. dbsqlfuzz 6b7a144674e215f06ddfeb9042c873d9ee956ac0. (check-in: [c2066dde53] user: drh branch: trunk, size: 269984)
2021-05-21
21:49
[dd81ee4c1a] part of check-in [94225d6939] If there are errors in a nested CTE, be sure to abandon processing. Do not continue since the parse tree may have been left in a goofy state which could cause use-after-free and segfaults. See forum post aa4a7a3980 for an example. (check-in: [94225d6939] user: drh branch: trunk, size: 269950)
15:33
[52ed98f39e] part of check-in [0dba9010ad] Merge all recent trunk changes into the begin-concurrent branch. (check-in: [0dba9010ad] user: drh branch: begin-concurrent, size: 269829)
2021-05-20
17:15
[8f9ecc60f9] part of check-in [f7dcc4b519] Ensure that objects within view definitions are not incorrectly resolved to CTEs that are part of the statement using the view. (check-in: [f7dcc4b519] user: dan branch: trunk, size: 269814)
00:44
[3ca67cb4f1] part of check-in [5614279daf] Replace [0f0959c6f95046e8] with a new and better solution that also fixes the CTE name resolution problem described in forum post 8590e3f6dc. Test cases for both problems added. (check-in: [5614279daf] user: drh branch: trunk, size: 269558)
2021-05-19
12:17
[09acd5a12c] part of check-in [699c33990a] Improved column name and column type determination for the RETURNING clause. (check-in: [699c33990a] user: drh branch: trunk, size: 269236)
2021-05-18
19:10
[acf228163e] part of check-in [4a55f72542] In the MULTI-INDEX OR query plan, code for sub-expressions can sometimes be generated twice. But for some subqueries, generating code off of the same tree twice causes problems. So now MULTI-INDEX OR makes a copy of the sub-expressions it uses to avoid code-generating them more than once. dbsqlfuzz 9ebd2140e7206ff724e665f172faea28af801635. (check-in: [4a55f72542] user: drh branch: trunk, size: 269222)
2021-05-17
16:20
[0ba381ae7f] part of check-in [4c6cd54a8d] Fix problems with refering to CTEs from within sub-selects in PARTITION BY or ORDER BY clauses of window frame definitions. Also a problem with renaming a column when the schema contains a trigger containing a correlated sub-select within a window frames PARTITION BY or ORDER BY clause. (check-in: [4c6cd54a8d] user: dan branch: trunk, size: 268781)
2021-05-14
14:26
[c380cca3ae] part of check-in [e994c9f29f] Attempt the constant propagation optimization on any WHERE clause that has a top-level AND operator, even if the query is not a join. This is an attempt to partially address the concern raised in forum post 830d37b928. (check-in: [e994c9f29f] user: drh branch: trunk, size: 268804)
2021-04-26
21:23
[57dbb27e0d] part of check-in [f80d7bb2c3] Fix the UNION ALL flattener optimization so that it works better with recursive CTEs. dbsqlfuzz 88ed5c66789fced139d148aed823cba7c0926dd7 (check-in: [f80d7bb2c3] user: drh branch: trunk, size: 268773)
2021-04-20
12:14
[bc08a79364] part of check-in [a61c0e6b78] In the sqlite3SelectDup() routine, do not do an incomplete duplication due to OOM. This in turn requires several new NEVER() and ALWAYS() macros for unreachable branches. (check-in: [a61c0e6b78] user: drh branch: trunk, size: 268666)
2021-04-19
20:36
[2c4f892573] part of check-in [3e863cd093] Improvement to check-in [d564d8882ef18b55] to detect the OOM fault even if it occurs deep down inside the duplicated expression. (check-in: [3e863cd093] user: drh branch: trunk, size: 268658)
15:05
[8b466a1c0d] part of check-in [d564d8882e] In the query flattener, avoid invalidating an expression if an OOM occurs. This prevents problems in higher-level routines that might not check for the OOM after processing a subquery. dbsqlfuzz fb70fa8602421f87673e0670b0712ff2b5240ea0 (check-in: [d564d8882e] user: drh branch: trunk, size: 268589)
2021-04-17
14:42
[ab7dcf61ff] part of check-in [62efe2eee3] Fix cases where code in expr.c was failing to handle OOM failures that occurred while processing sub-select expressions. (check-in: [62efe2eee3] user: dan branch: trunk, size: 268614)
2021-04-12
12:02
[ed07c4ad9c] part of check-in [a4e3f13329] Avoid an assert() failure when a compound scalar sub-select is, due to a "WHERE (sub-select) AND (... OR ...)" clause, coded twice by the code generator. (check-in: [a4e3f13329] user: dan branch: trunk, size: 268533)
2021-04-08
20:29
[47f6d9e119] part of check-in [0e4789860b] Fix a use-after-free error that could occur when processing "SELECT aggregate(DISTINCT <expr>)..." queries. (check-in: [0e4789860b] user: dan branch: trunk, size: 268461)
2021-04-07
18:17
[b426e9e2fb] part of check-in [a2ddb89b20] Do not allow the use of rowid for views and subqueries unless compiled with -DSQLITE_ALLOW_ROWID_IN_VIEW. (check-in: [a2ddb89b20] user: drh branch: trunk, size: 268398)
17:32
[a270ad51cd] part of check-in [1f3f7e4bf3] Merge latest trunk changes into this branch. (check-in: [1f3f7e4bf3] user: dan branch: begin-concurrent-pnu, size: 268080)
15:45
[df6863a0e1] part of check-in [14b1d56ef8] Also prohibit the use of rowid from a subquery. Add the SQLITE_ALLOW_ROWID_IN_VIEW compile-time option to restore legacy behavior in case somebody actually needs it. (check-in: [14b1d56ef8] user: drh branch: no-rowid-on-view, size: 268338)
13:20
[e0521ed254] part of check-in [c22e47c77a] Unnecessary local variable initialization to fix a harmless compiler warning. (check-in: [c22e47c77a] user: drh branch: trunk, size: 268065)
2021-04-03
19:23
[06df4a2a94] part of check-in [0dcf808ddf] Fix a crash in handling queries of the form "SELECT aggregate(DISTINCT tbl.col) FROM ... LEFT JOIN tbl ...". Fixes a problem introduced by [ef4ac0ddd297bbd3]. (check-in: [0dcf808ddf] user: dan branch: trunk, size: 268005)
2021-04-02
20:29
[2bc2bac7de] part of check-in [9842084230] Merge latest trunk changes into this branch. (check-in: [9842084230] user: dan branch: begin-concurrent, size: 267978)
2021-03-26
13:31
[bdcfed8ae9] part of check-in [988da36c86] Merge from 3.35.3 into the begin-concurrent branch. (check-in: [988da36c86] user: drh branch: begin-concurrent, size: 263405)
2021-03-24
23:30
[2d7a1f3d9f] part of check-in [54b41915ed] Remove old testcases() macros. Also remove surplus end-of-line whitespace. (check-in: [54b41915ed] user: drh branch: trunk, size: 267963)
19:44
[22b0309a33] part of check-in [037ca79e60] Comment improvements to on the distinct-agg optimization. Show a line in the EQP output when using an ephemeral table to implement DISTINCT on an aggregate. (check-in: [037ca79e60] user: drh branch: trunk, size: 268062)
17:28
[9109ca4a31] part of check-in [ef4ac0ddd2] Improvements to distinct aggregates such that they can sometimes avoid using an ephermeral table to test for duplicates if the column that is distinct is part of an index. (check-in: [ef4ac0ddd2] user: drh branch: trunk, size: 267848)
2021-03-20
15:11
[fe0a11d7cf] part of check-in [50fbd53260] Revise tests cases to align with the new EXPLAIN QUERY PLAN output. (check-in: [50fbd53260] user: drh branch: eqp-improvements, size: 263318)
2021-03-19
19:09
[5095a9f76e] part of check-in [d192d73775] Merge enhancements from trunk. (check-in: [d192d73775] user: drh branch: eqp-improvements, size: 263324)
13:53
[734cf12e42] part of check-in [d72d865d3e] Correlated CTEs should not generate a materialization subroutine. If they need to be materialized, each use case must be materialized separately. dbsqlfuzz 01b8355086998f0a452cb31208e80b9d29ca739a. (check-in: [d72d865d3e] user: drh branch: trunk, size: 263390)
13:00
[f8ef902398] part of check-in [6f8faec022] Improved labeling of EXPLAIN QUERY PLAN output. Many test failures due to the different output format. (check-in: [6f8faec022] user: drh branch: eqp-improvements, size: 263158)
2021-03-18
20:04
[72b2a58bf6] part of check-in [114d9780ae] Add a NEVER() on a branch that was made unreachable by the "circular reference" fix. (check-in: [114d9780ae] user: drh branch: trunk, size: 263224)
18:25
[bbad9e0daf] part of check-in [9981223618] Fix a problem causing spurious "<cte>: circular reference" errors to be reported when there is actually a different error in the SQL statement. (check-in: [9981223618] user: dan branch: trunk, size: 263217)
2021-03-17
14:29
[e9c9c78567] part of check-in [9520bed2bd] If there are already 500 or more simple SELECTs in a query, do not add more by flattening UNION ALL sub-queries into parent join queries. (check-in: [9520bed2bd] user: dan branch: trunk, size: 263052)
2021-03-13
18:23
[1a436834b6] part of check-in [0817cf2ec0] Fix a memory leak in the new code on this branch. (check-in: [0817cf2ec0] user: dan branch: distinct-agg-opt, size: 267501)
2021-03-12
21:09
[05c83f086a] part of check-in [c05ed2a8a9] Fix a crash in new code on this branch. (check-in: [c05ed2a8a9] user: dan branch: distinct-agg-opt, size: 267502)
18:33
[bc60b2b509] part of check-in [198bc510d6] Merge latest trunk changes into this branch. (check-in: [198bc510d6] user: dan branch: distinct-agg-opt, size: 266095)
18:24
[be01e5eab0] part of check-in [3bca003cd2] Attempt to use an index for DISTINCT aggregate queries that have GROUP BY clauses. (check-in: [3bca003cd2] user: dan branch: distinct-agg-opt, size: 266015)
2021-03-11
18:52
[bfcf53e991] part of check-in [79d44ebd53] Update this branch with latest changes from trunk. (check-in: [79d44ebd53] user: dan branch: begin-concurrent, size: 262986)
2021-03-09
19:32
[fc904a7aa7] part of check-in [c3c8691121] Extra comments and testcase() macros associated with the new sqlite3ParserAddCleanup() mechanism. No changes to release builds. (check-in: [c3c8691121] user: drh branch: trunk, size: 262971)
16:47
[7741bb3b31] part of check-in [ef2f0cf21b] Add missing comment to new routine in select.c. (check-in: [ef2f0cf21b] user: dan branch: distinct-agg-opt, size: 264662)
16:06
[b51fbd795e] part of check-in [eb919611fd] Experimental optimization for distinct aggregates (e.g. "SELECT count(DISTINCT <expr) FROM ..."). (check-in: [eb919611fd] user: dan branch: distinct-agg-opt, size: 264105)
2021-03-05
18:33
[fb1851222c] part of check-in [83dab8b358] Modify the SQLITE_DBCONFIG_ENABLE_VIEW option so that it always permits TEMP views, just as SQLITE_DBCONFIG_ENABLE_TRIGGER always permits TEMP triggers. (check-in: [83dab8b358] user: drh branch: trunk, size: 262891)
14:08
[297724a06f] part of check-in [90c6b9fcb0] Fix the processing of implied LIMIT clauses when flattening a compound query. (check-in: [90c6b9fcb0] user: drh branch: trunk, size: 262828)
2021-03-04
16:32
[c213c99cfb] part of check-in [20d7dc120d] Remove a branch made unreachable by check-in [e893f88750ea64d4]. (check-in: [20d7dc120d] user: drh branch: trunk, size: 262833)
16:03
[ec87ae50ab] part of check-in [e893f88750] Earlier detection of a misplaced ORDER BY or LIMIT clause in a compound 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. (check-in: [e893f88750] user: drh branch: trunk, size: 262874)
14:18
[1a7931e67f] part of check-in [9768e7db62] Fix a crash that could occur if a sub-select inside an EXISTS expression features an ORDER BY clause containing one or more window functions. (check-in: [9768e7db62] user: dan branch: trunk, size: 263007)
2021-03-03
19:17
[78afdb6f14] part of check-in [acdafef836] Merge recent trunk changes into the begin-concurrent branch. (check-in: [acdafef836] user: drh branch: begin-concurrent, size: 262905)
14:07
[0e242e141c] part of check-in [27a0388ad6] Fix a harmless assertion fault resulting from [6e6b3729e0549de0] that was discovered by dbsqlfuzz. Enhance .selecttrace output to show omitted ORDER BY clauses. New dbsqlfuzz test cases added. (check-in: [27a0388ad6] user: drh branch: trunk, size: 262890)
2021-02-26
20:14
[7cf048e52f] part of check-in [5ecd842555] Attempt to optimize "x IS NULL" and "x IS NOT NULL" expressions when x is a column with a NOT NULL constraint. (check-in: [5ecd842555] user: dan branch: ifnull-opt, size: 262572)
2021-02-22
20:56
[5d66f394af] part of check-in [dac51f303b] Allow WHERE terms to be pushed down into sub-queries that contain window 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. (check-in: [dac51f303b] user: dan branch: window-functions-pushdown, size: 262475)
11:07
[09f1506736] part of check-in [b66a495708] Fix inverted logic regarding the materialization hint on the push-down optimization. (check-in: [b66a495708] user: drh branch: as-materialize-redux, size: 260281)
03:04
[be6b8ee55b] part of check-in [a6bb272ec0] Add the AS MATERIALIZED and AS NOT MATERIALIZED syntax that works like it does in PostgreSQL. (check-in: [a6bb272ec0] user: drh branch: as-materialize-redux, size: 260281)
2021-02-21
23:44
[cc8df79d58] part of check-in [ba59159fbe] Materialize any CTE that is used more than once. (check-in: [ba59159fbe] user: drh branch: as-materialize-redux, size: 259935)
21:04
[b3277dc42a] part of check-in [bfd5bf2c73] Rename the "struct SrcList_item" object to the more succinct "SrcItem". This is a symbolic change only. The logic is unmodified. (check-in: [bfd5bf2c73] user: drh branch: trunk, size: 258524)
01:19
[94031cbbca] part of check-in [0d2c992f36] Simplified resolution of CTE names. Slightly faster and about 100 bytes of code smaller. (check-in: [0d2c992f36] user: drh branch: trunk, size: 258716)
2021-02-20
21:20
[fc2ed90b5e] part of check-in [554b286ac2] Performance improvement in resolving the INDEXED BY index name for the common case where there is no INDEXED BY clause. (check-in: [554b286ac2] user: drh branch: trunk, size: 258472)
12:47
[1078af8a2e] part of check-in [7a90571e0a] Merge changes from trunk. (Later:) Abandon this line of development. See the as-materialize-redux branch. (check-in: [7a90571e0a] user: drh branch: as-materialize, size: 259281)
2021-02-18
22:47
[371a5c95d4] part of check-in [9ea640073f] Merge changes from trunk into the alter-table-drop-column branch. (check-in: [9ea640073f] user: drh branch: alter-table-drop-column, size: 258462)
15:45
[aa04743ede] part of check-in [f985a78ecc] Improvement to the INSERT optimization of check-in [16ac213c57196361] so that it works with SQLITE_ENABLE_HIDDEN_COLUMN but is also easier to maintain and a little faster as well. (check-in: [f985a78ecc] user: drh branch: trunk, size: 258448)
2021-02-17
21:13
[8acabad7dd] part of check-in [7a1399671f] Use the sqlite3ParserAddCleanup() mechanism to ensure that the AggInfo structure associated with an aggregate query is deallocated, for a performance increase and size reduction. (check-in: [7a1399671f] user: drh branch: trunk, size: 258389)
20:19
[825c2bfea3] part of check-in [0cd5e2f9ce] Merge trunk changes into this branch. (check-in: [0cd5e2f9ce] user: dan branch: alter-table-drop-column, size: 258164)
2021-02-16
20:43
[4bd3b7d21d] part of check-in [f0217937d7] Add experimental implementation of ALTER TABLE DROP COLUMN. Only some cases work so far. (check-in: [f0217937d7] user: dan branch: alter-table-drop-column, size: 257806)
20:01
[d009aafcd9] part of check-in [7c03ce49b7] New SELECTTRACE macros more clearly deliniate when the query planner is invoked in the middle of PRAGMA vdbe_addoptrace output. (check-in: [7c03ce49b7] user: drh branch: trunk, size: 258150)
16:32
[847bdf40d4] part of check-in [bf0fd9b23a] Trying to get the new AS MATERIALIZE syntax of CTEs to work. There are still performance and memory management issues. This is a WIP check-in. (check-in: [bf0fd9b23a] user: drh branch: as-materialize, size: 258611)
00:48
[0612a4097f] part of check-in [78dcddd969] Change the syntax from "GENERATED AS" to "AS MATERIALIZED" so as to match the syntax of PostgreSQL 12+. (check-in: [78dcddd969] user: drh branch: with-generated-as, size: 258382)
2021-02-13
23:46
[cf08d39bf4] part of check-in [186ec18b24] If the GENERATED keyword occurs before the AS keyword in a common table expression (CTE) definition, then that CTE becomes an "optimization barrier". For now, that means the CTE is always materialized. It also means that query flattener or pushdown optimizations that cross the CTE boundary are omitted. (check-in: [186ec18b24] user: drh branch: with-generated-as, size: 258358)
21:01
[9415f7aa05] part of check-in [15692ec02b] Add a test-control that allows setting a LIKE pattern for common table expression names such that CTEs with matching names become an optimization barrier - They are not flattened and are implemented by materialization. (check-in: [15692ec02b] user: drh branch: optbarrier-test-ctrl, size: 258222)
16:39
[9b4c84fd27] part of check-in [9692f51080] Avoid manifesting a CTE (or other view) multiple times when it is possible to reuse the first manifestation. (check-in: [9692f51080] user: drh branch: trunk, size: 257792)
14:26
[e0668a378b] part of check-in [e4f8a79fd8] Fix a problem in the unreleased union-all flattening enhancement (check-in: [e4f8a79fd8] user: dan branch: trunk, size: 257691)
2021-02-04
11:14
[14d7315897] part of check-in [e1eb621319] Work toward handling interleaved RETURNING statements. Trunk does not handle that case correctly. This branch is a partial implementation of ideas that might, however. (check-in: [e1eb621319] user: drh branch: interleaved-returning, size: 257824)
2021-01-20
15:10
[f17dbddf90] part of check-in [cc0e582854] Incorporate the 3.34.1 patches into the reuse-schema branch. (check-in: [cc0e582854] user: drh branch: reuse-schema-3.34, size: 254546)
2021-01-19
20:09
[847062694a] part of check-in [30a4c32365] Fix a problem handling sub-queries with both a correlated WHERE clause and a "HAVING 0" clause where the parent query is itself an aggregate. The problem was apparently introduced by check-in [6e6b3729e0549de0] (check-in: [30a4c32365] user: drh branch: branch-3.34, size: 254715)
2021-01-13
19:28
[738cb74618] part of check-in [fd0c9a123b] Expand the number of optimization-disable bits from 16 to 32. Use one of 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. (check-in: [fd0c9a123b] user: drh branch: minmax-opt-exp, size: 257652)
15:23
[083c9bcc6b] part of check-in [188772a1db] Further enhancements to the min/max optimization of check-in b8ba2f17f938c035 to fix the performance regression identified by forum post 4050026ab8. (check-in: [188772a1db] user: drh branch: minmax-opt-exp, size: 257594)
11:44
[74655feb1b] part of check-in [db0ecfe664] In the .selecttrace output, show the ORDER BY clause added by the Min/Max optimization. (check-in: [db0ecfe664] user: drh branch: trunk, size: 257699)
2021-01-12
15:30
[a9c38abfba] part of check-in [38ef8ab983] Fix a potential use-after-free following an OOM in sqlite3ParserAddCleanup() and add a mechanism to detect situations where this might occur in the future. (check-in: [38ef8ab983] user: drh branch: parse-cleanup, size: 257520)
2021-01-11
20:37
[b7281a798e] part of check-in [affa2b7b31] Add a linked list of ParseCleanup objects to the end of a Parse object and 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. Edit: Now possible to have use-after-free following an OOM. (check-in: [affa2b7b31] user: drh branch: parse-cleanup, size: 257437)
2020-12-29
16:48
[971e5b1ee1] part of check-in [5774318e73] Add an ALWAYS on an always-true conditional in the cursor renumbering logic of the UNION ALL flattener. Edit: turns out this change is incorrect and the conditional is reachable after all. See the nearby trunk check-in for test cases. (check-in: [5774318e73] user: drh branch: mistake, size: 257411)
2020-12-22
16:23
[85c7cec9a4] part of check-in [f62f983b56] Fix a problem handling sub-queries with both a correlated WHERE clause and a "HAVING 0" clause where the parent query is itself an aggregate. The problem was apparently introduced by check-in [6e6b3729e0549de0] (check-in: [f62f983b56] user: dan branch: trunk, size: 257398)
14:54
[8626f34077] part of check-in [82884438e3] Simplification to the aggregate-function analysis error detection logic at the end of sqlite3Select(). (check-in: [82884438e3] user: drh branch: trunk, size: 257359)
2020-12-21
19:50
[610ca95524] part of check-in [d554f710a5] Fix problems with joining UNION ALL sub-queries against other sub-queries that contain LEFT JOIN. (check-in: [d554f710a5] user: dan branch: trunk, size: 257461)
2020-12-18
18:04
[deeed19d21] part of check-in [63c5cfb9ae] Fix for the previous fix in the case where a UNION ALL sub-query is joined against some other compound query. (check-in: [63c5cfb9ae] user: dan branch: union-all-flattener, size: 257325)
16:13
[7282b1a0fc] part of check-in [c510377b0b] When flattening UNION ALL subqueries into a join query, ensure that separate cursor numbers are used for each segment of the newly flattened query. (check-in: [c510377b0b] user: dan branch: union-all-flattener, size: 257339)
2020-12-17
17:17
[a9c7607d8f] part of check-in [dc0937ce9d] Fix a part of the header comment for flattenSubquery(). (check-in: [dc0937ce9d] user: dan branch: union-all-flattener, size: 254142)
16:48
[f80a208164] part of check-in [5d6dc29d5f] Add test cases and minor fixes to this branch. (check-in: [5d6dc29d5f] user: dan branch: union-all-flattener, size: 254143)
2020-12-16
20:00
[85f02c7d6b] part of check-in [00e4bf74d3] Allow sub-queries that use UNION ALL to be flattened, even if the parent query is a join. Still some problems on this branch. (check-in: [00e4bf74d3] user: dan branch: union-all-flattener, size: 254106)
2020-12-14
16:26
[4ce2b008a7] part of check-in [a1708e8457] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [a1708e8457] user: drh branch: begin-concurrent, size: 254522)
2020-12-04
01:17
[c9b68506e5] part of check-in [d36d6f2923] Alternative implementation of ".selecttrace" and ".wheretrace" that uses a test-control rather than global variables. (check-in: [d36d6f2923] user: drh branch: traceflags-test-control, size: 254507)
2020-11-26
11:37
[fe64564a94] part of check-in [ddb97eeef7] Update this branch with latest changes from trunk. (check-in: [ddb97eeef7] user: dan branch: begin-concurrent, size: 254691)
2020-11-08
20:44
[31387e56f5] part of check-in [76d2eb86e1] Use NEVER and ALWAYS macros to confirm that the return value from sqlite3ExprSkipCollateAndLikely() is never NULL in some of its use cases. (check-in: [76d2eb86e1] user: drh branch: trunk, size: 254676)
2020-11-02
00:40
[507c541942] part of check-in [6646d7898c] Fix an another OSS-Fuzz discovered assertion fault due to ALTER TABLE and strange triggers. (check-in: [6646d7898c] user: drh branch: trunk, size: 254653)
2020-10-19
20:49
[645aa47fb8] part of check-in [75a0288871] Fix an incorrect table ref-count in the new recursive CTE logic that might result in a reference to freed memory following a syntax error. (check-in: [75a0288871] user: drh branch: trunk, size: 254673)
01:23
[aabd90874b] part of check-in [5481fa8c79] Allow multiple recursive terms in the compound SELECT of a recursive CTE. This facilitates writing a query to find find the connected components of an undirected graph. (check-in: [5481fa8c79] user: drh branch: cte-enhancement, size: 254673)
2020-09-30
15:36
[0d9ce195bf] part of check-in [69f9eb7343] In the query flattener when substituting expression Y in place of expression X, if X is marked has having come from an ON or USING clause of a LEFT JOIN, then be sure that all subexpressions of Y, not just the root node of Y, are similarly marked. Otherwise, if Y is an AND operator, it will be split up during WHERE clause analysis and the subexpressions will not get the special treatment needed by LEFT JOIN ON/USING clauses. Fix for ticket [66e4b0e271c47145]. (check-in: [69f9eb7343] user: drh branch: trunk, size: 253135)
2020-09-17
00:46
[6c3f7d6029] part of check-in [7d2b590d3a] DISTINCT may not be ignored inside a UNION ALL common table expression. Fix for ticket [c51489c3b8f919c5] (check-in: [7d2b590d3a] user: drh branch: trunk, size: 253179)
2020-08-19
23:32
[233e884d7d] part of check-in [871f2ddcfb] Do not skip over TK_IF_NULL_ROW operators when bypassing TK_COLLATE operators. Fix to check-in [ac31edd3eeafcef4] which was itself a fix for ticket [45f4bf4eb4ffd788]. (check-in: [871f2ddcfb] user: drh branch: trunk, size: 253269)
2020-08-10
21:16
[02c5b12ca8] part of check-in [ed4c742c4e] Merge recent trunk enhancements into begin-concurrent. (check-in: [ed4c742c4e] user: drh branch: begin-concurrent, size: 253279)
2020-08-08
17:02
[510fdf819f] part of check-in [5ecd03a27b] Change the name of sqlite3SelectTrace to sqlite3_unsupported_selecttrace. (check-in: [5ecd03a27b] user: dan branch: trunk, size: 253264)
2020-07-30
19:19
[52f6532499] part of check-in [e8a6651539] Merge latest trunk changes into this branch. (check-in: [e8a6651539] user: dan branch: begin-concurrent, size: 253110)
17:37
[d977d463bd] part of check-in [96e3dba2ed] Fix compiler warnings in MSVC. (check-in: [96e3dba2ed] user: drh branch: trunk, size: 253095)
2020-07-29
16:18
[781c973d92] part of check-in [a80ae2c98b] Dozens and dozens of typo fixes in comments. This change adds no value to the end product and is disruptive, so it is questionable whether or not it will ever land on trunk. (check-in: [a80ae2c98b] user: drh branch: typos, size: 253091)
2020-07-23
14:27
[9ccea209a9] part of check-in [dd39418ee4] Merge fixes from trunk. (check-in: [dd39418ee4] user: drh branch: larger-databases, size: 253090)
14:12
[860ee5f1a7] part of check-in [6a3111cd06] An ORDER BY clause can slip into an SRT_Upfrom query via the query flattener, even without the SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option. So always enable the code to deal with that case. (check-in: [6a3111cd06] user: drh branch: trunk, size: 253090)
2020-07-22
13:38
[0e75d64091] part of check-in [9ce1710aad] Continuing work toward supporting unsigned 32-bit page numbers. (check-in: [9ce1710aad] user: drh branch: larger-databases, size: 253193)
2020-07-20
18:07
[39c6b63d99] part of check-in [5cc200939d] Fix a corner-case error in the new UPDATE FROM logic helpfully discovered by OSSFuzz. (check-in: [5cc200939d] user: drh branch: trunk, size: 253193)
13:11
[835a86f106] part of check-in [de2a908124] Faster column name lookup in the columnIndex() routine using hashing. (check-in: [de2a908124] user: drh branch: trunk, size: 252857)
2020-07-17
18:07
[ee84981a34] part of check-in [587ded6035] Use #ifdef to omit code that is only reachable when the SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option is used. (check-in: [587ded6035] user: drh branch: update-from, size: 252774)
16:31
[d338c9b9e1] part of check-in [d90a37e930] Make it an error to repeat the target object/alias of an UPDATE statement in its FROM clause. (check-in: [d90a37e930] user: dan branch: update-from, size: 252671)
2020-07-15
11:00
[a48570f614] part of check-in [53b8b507a1] Update this branch with changes from trunk. (check-in: [53b8b507a1] user: dan branch: update-from, size: 251924)
2020-07-14
22:20
[5293c60dd3] part of check-in [81e6450980] Now appears to work. All legacy tests pass. Need to add new tests, however. (check-in: [81e6450980] user: drh branch: minmax-opt-exp, size: 250980)
01:03
[d9f067b2dd] part of check-in [6144387238] Merge latest changes from trunk. This branch still does not work. (check-in: [6144387238] user: drh branch: minmax-opt-exp, size: 250788)
2020-07-13
18:04
[01d1daa982] part of check-in [5ee3c27e20] Merge latest trunk changes with this branch. (check-in: [5ee3c27e20] user: dan branch: update-from, size: 251957)
2020-07-10
21:43
[2a5099399d] part of check-in [1e87da9c93] Remove unnecessary code from the window functions implementation. (check-in: [1e87da9c93] user: drh branch: trunk, size: 251013)
19:09
[14d212b940] part of check-in [4a64c16fb7] An attempt to get the Min/Max optimization working with IN constraints. Not currently working. (check-in: [4a64c16fb7] user: drh branch: minmax-opt-exp, size: 251310)
2020-07-01
14:07
[860daa0559] part of check-in [2094da753f] Fix a problem with VM code generated for some aggregate SELECT statements that feature min()/max() aggregates both with and without FILTER clauses. (check-in: [2094da753f] user: dan branch: trunk, size: 251535)
2020-06-29
16:30
[bc25f48e49] part of check-in [1b426603f0] Do not run resetAccumulator() after a malloc failure. (check-in: [1b426603f0] user: drh branch: trunk, size: 251327)
2020-06-19
15:24
[10ab055a83] part of check-in [7a876209a6] Extend the refactoring into extensions. Clean up stray newlines. (check-in: [7a876209a6] user: drh branch: trunk, size: 251299)
2020-06-17
12:37
[bbd52d8405] part of check-in [d55b8e7993] Merge miscellaneous fixes from trunk into the 3.32 branch. (check-in: [d55b8e7993] user: drh branch: branch-3.32, size: 251333)
2020-06-15
13:51
[6ddd86a727] part of check-in [10fa79d00f] Fix a defect in the query-flattener optimization identified by ticket [8f157e8010b22af0]. (check-in: [10fa79d00f] user: drh branch: trunk, size: 251301)
2020-06-13
21:24
[1a791ad41c] part of check-in [cc1fffdedd] Avoid deleting expression nodes in the flattener code, as they may be referenced by AggInfo objects further up the stack. Ticket [e367f31901ea8700] (check-in: [cc1fffdedd] user: dan branch: trunk, size: 251390)
2020-06-11
16:04
[929e1c0db3] part of check-in [98cea4a32b] Add a new assert() to the SELECT processing. (check-in: [98cea4a32b] user: drh branch: trunk, size: 251272)
15:53
[4cf6adb522] part of check-in [32a88bdd4b] Avoid rewriting compound SELECT statements that use a different collation sequence for ORDER BY and record processing a second time if they contain window functions. Fix for [b706351c]. (check-in: [32a88bdd4b] user: dan branch: trunk, size: 251071)
15:47
[954e6ef69e] part of check-in [50b4a1c7f4] Avoid rewriting compound SELECT statements that use a different collation sequence for ORDER BY and record processing a second time if they contain window functions. Fix for [b706351c]. (check-in: [50b4a1c7f4] user: dan branch: mistake, size: 251070)
00:57
[733ae255f1] part of check-in [30c6d895b5] Provide the ability to use the SELECTTRACE() debugging macro outside of the select.c source file. Use this to add a new SELECTTRACE() entry in window.c for improved tracing of window-function parse-tree rewriting. (check-in: [30c6d895b5] user: drh branch: trunk, size: 250637)
2020-06-10
11:01
[62ad2c28c1] part of check-in [d31850fe50] Ensure that the "push-down" optimization does not push constraints down into compound queries if any of the component queries uses window functions. (check-in: [d31850fe50] user: dan branch: branch-3.32, size: 250870)
11:01
[fbdbf6d55e] part of check-in [7e2833fb2b] Disable AggInfo consistency checks when unwinding after an OOM. (check-in: [7e2833fb2b] user: dan branch: branch-3.32, size: 250805)
10:58
[b7bbec203c] part of check-in [094dcfe779] Ensure that the "push-down" optimization does not push constraints down into compound queries if any of the component queries uses window functions. (check-in: [094dcfe779] user: dan branch: trunk, size: 250928)
03:07
[4daa7ac633] part of check-in [65179814aa] Disable AggInfo consistency checks when unwinding after an OOM. (check-in: [65179814aa] user: drh branch: trunk, size: 250863)
2020-06-09
14:56
[0944abec9a] part of check-in [9a4cc1dbf2] Crazy experimental change to refcount the AggInfo objects. (check-in: [9a4cc1dbf2] user: drh branch: refcount-agginfo, size: 250671)
13:38
[a1f5efdbbf] part of check-in [a53bdd311c] Give the expression pointer fields of AggInfo distinctive names in order to simplify tracking of all their uses. (check-in: [a53bdd311c] user: drh branch: trunk, size: 250842)
11:59
[1301808307] part of check-in [b5711b4eea] Improved tree-view debugging output for aggregate functions. (check-in: [b5711b4eea] user: drh branch: trunk, size: 250826)
2020-06-08
12:49
[bafed8a4f2] part of check-in [44a58d6cb1] When an Expr object is changed and that Expr is referenced by an AggInfo, then also update the AggInfo. Also, persist all AggInfo objects until the Parse object is destroyed. This is a new fix for ticket [c8d3b9f0a750a529]. (check-in: [44a58d6cb1] user: drh branch: branch-3.32, size: 250784)
2020-06-07
20:18
[fb79ed71f8] part of check-in [3c840b4df3] AggInfo objects might be referenced even after the sqlite3Select() function that created them has exited. So AggInfo cannot be a stack variable. And it must not be freed until the Parse object is destroyed. (check-in: [3c840b4df3] user: drh branch: persist-agginfo, size: 250794)
17:33
[6eb5d0c524] part of check-in [7682d8a768] Alternative fix to ticket [c8d3b9f0a750a529]: Prior to deleting or modifying an Expr not that is referenced by an AggInfo, modify the AggInfo to get its own copy of the original Expr. (check-in: [7682d8a768] user: drh branch: persist-agginfo, size: 250858)
00:51
[0133ae3684] part of check-in [765bbcce1d] Extra steps to ensure that queries that involve both window functions and aggregate functions are processed correctly by sqlite3WindowRewrite(). Fix for ticket [e5504e987e419fb0]. (check-in: [765bbcce1d] user: drh branch: branch-3.32-early-winfunc-rewrite, size: 251135)
00:43
[090f3968a4] part of check-in [a6c2147cc6] Extra steps to ensure that queries that involve both window functions and aggregate functions are processed correctly by sqlite3WindowRewrite(). Fix for ticket [e5504e987e419fb0]. (check-in: [a6c2147cc6] user: drh branch: early-winfunc-rewrite-dev, size: 251100)
2020-06-06
20:48
[cb56760cad] part of check-in [05418b2a4a] Merge multiple changes from trunk to address concerns with window-function parse-tree rewriting. (check-in: [05418b2a4a] user: drh branch: branch-3.32-early-winfunc-rewrite, size: 250702)
19:54
[34c441aa24] part of check-in [0e021887a1] Fix a possible ASAN violation inside of debug-only code following an OOM. (check-in: [0e021887a1] user: drh branch: early-winfunc-rewrite-dev, size: 250667)
18:34
[4dbe6dc14d] part of check-in [03b32be44d] In the query flattener, defer deleting content until after associated Parse object is destroyed, in case some of the deleted expressions have been collected for use by sAggInfo. (check-in: [03b32be44d] user: drh branch: early-winfunc-rewrite-dev, size: 250624)
14:58
[a63301ffc2] part of check-in [3926ff1725] Remove an incorrect assert() added earlier today. (check-in: [3926ff1725] user: drh branch: early-winfunc-rewrite-dev, size: 249658)
14:44
[d6cc890f0d] part of check-in [2cddb24e91] When rewriting the parse-tree for window functions, ensure that the inserted subqueries have an accurate SF_Aggregate bit set. This change also coincidentally fixes ticket [0899cf62f597d7e7], even thought that was not the issue we were working on at the time. (check-in: [2cddb24e91] user: drh branch: early-winfunc-rewrite-dev, size: 249705)
13:29
[89d5630c99] part of check-in [3de19ee22a] Avoid no-op calls to sqlite3SelectPrep() when processing sqlite3Select() for subqueries. This simplifies the ".selecttrace" debugging output. (check-in: [3de19ee22a] user: drh branch: early-winfunc-rewrite-dev, size: 249699)
2020-06-05
15:56
[cba1c0e3d2] part of check-in [79eff1d038] Do parse-tree transformations required for window functions prior to running aggregate function analysis. Fix for ticket [c8d3b9f0a750a529]. (check-in: [79eff1d038] user: drh branch: branch-3.32-early-winfunc-rewrite, size: 249622)
14:53
[1708c0ef6b] part of check-in [2011e83213] Ensure that the "push-down" optimization does not push constraints down into compound queries if any of the component queries uses window functions. (check-in: [2011e83213] user: dan branch: early-winfunc-rewrite, size: 249632)
14:25
[cff4a9aee8] part of check-in [13ffedab9b] ALWAYS() and NEVER() macros added due to unreachable branches arising from the previous check-in. (check-in: [13ffedab9b] user: drh branch: early-winfunc-rewrite, size: 249567)
14:10
[1204f18a11] part of check-in [fe702aa08c] Move the parse tree rewrite for window functions earlier in the process, before sqlite3ExprAnalyzeAggregates() has run. Add new assert()s to verify that aggregate analysis always remains valid until the end of SELECT processing. (check-in: [fe702aa08c] user: drh branch: early-winfunc-rewrite, size: 249559)
2020-05-25
17:27
[f92fe19c23] part of check-in [5e08e36067] Merge version 3.32.1 into the begin-concurrent branch. (check-in: [5e08e36067] user: drh branch: begin-concurrent, size: 249927)
01:31
[39a00a8bc8] part of check-in [d4bf60f464] Attempt to work around a false-positive warning in the CGo compiler. (check-in: [d4bf60f464] user: drh branch: cgo-warning-workaround, size: 249922)
2020-05-24
03:01
[e2a5954868] part of check-in [dac438236f] Move some utility Walker callbacks into the walker.c source file, as they seem to belong there better. (check-in: [dac438236f] user: drh branch: trunk, size: 249912)
02:05
[7fe2902639] part of check-in [f7e5a68a7e] Improvements to parse-tree tracing logic. No changes in deliverable code. (check-in: [f7e5a68a7e] user: drh branch: trunk, size: 250624)
2020-05-18
15:41
[23d31a8bb7] part of check-in [9e4a7b3ed8] Merge latest trunk changes into this branch. (check-in: [9e4a7b3ed8] user: dan branch: begin-concurrent, size: 250625)
2020-05-08
18:22
[ee4b02ad80] part of check-in [0d23a0b209] Fix the count-optimization so that it honors the NOT INDEXED clause. (check-in: [0d23a0b209] user: drh branch: trunk, size: 250610)
2020-05-01
15:04
[1720bff216] part of check-in [2100b2c8f3] Merge recent trunk enhancements. (check-in: [2100b2c8f3] user: drh branch: approximate-analyze, size: 250538)
2020-04-29
20:11
[51882f7b24] part of check-in [b717dc3c5f] Fix problems with using LIMIT and FROM clauses as part of single UPDATE statement. (check-in: [b717dc3c5f] user: dan branch: update-from, size: 251556)
17:41
[88ffd4e1a2] part of check-in [823ba94e29] Fix various bugs in new feature on this branch. (check-in: [823ba94e29] user: dan branch: update-from, size: 251035)
2020-04-27
20:55
[7e56a58673] part of check-in [f353a1a613] Allow a FROM clause in UPDATE statements. (check-in: [f353a1a613] user: dan branch: update-from, size: 250728)
2020-04-25
15:01
[c310de94bf] part of check-in [ac31edd3ee] Ensure affinity is not discarded from a view column if the view appears on the rhs of a LEFT JOIN. Fix for [45f4bf4e]. (check-in: [ac31edd3ee] user: dan branch: trunk, size: 250612)
2020-04-09
18:29
[150b1ce2b9] part of check-in [92f71a88c4] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [92f71a88c4] user: drh branch: begin-concurrent, size: 250590)
15:01
[af16360d8b] part of check-in [17901ea6a1] Merge trunk enhancements into the approximate-analyze branch. (check-in: [17901ea6a1] user: drh branch: approximate-analyze, size: 250501)
2020-04-06
18:16
[ab4eb1aee1] part of check-in [1e4b6a9398] Performance improvement for column name lookup. (check-in: [1e4b6a9398] user: drh branch: trunk, size: 250575)
2020-04-04
00:29
[ac24b7ddd0] part of check-in [43612157f8] In the push-down optimization, do not substitute columns that have previously been identified as being constant by the propagate-constants optimization. Fix for ticket [51166be0159fd2ce]. Also, avoid factoring out constant expressions on the LHS of an IN(...) operator, as the IN(...) operation may affect the affinity of these values. Fix for [fd1bda016d1]. (check-in: [43612157f8] user: drh branch: branch-3.31, size: 249203)
00:15
[7aa91ab374] part of check-in [70c44811d1] In the push-down optimization, do not substitute columns that have previously been identified as being constant by the propagate-constants optimization. Fix for ticket [51166be0159fd2ce] (check-in: [70c44811d1] user: drh branch: trunk, size: 250533)
2020-04-03
13:39
[f57c72267d] part of check-in [b64674919f] Do not suppress errors when resolving references in an ORDER BY clause belonging to a compound SELECT within a view or trigger within ALTER TABLE. Fix for ticket [a10a14e9b4ba2]. Also, in the event of a semantic error in an aggregate query, early-out the resetAccumulator() function to prevent problems due to incomplete or incorrect initialization of the AggInfo object. Fix for ticket [af4556bb5c285c08]. (check-in: [b64674919f] user: drh branch: branch-3.31, size: 249155)
13:19
[fd38aa7f87] part of check-in [4a302b42c7] In the event of a semantic error in an aggregate query, early-out the resetAccumulator() function to prevent problems due to incomplete or incorrect initialization of the AggInfo object. Fix for ticket [af4556bb5c285c08]. (check-in: [4a302b42c7] user: drh branch: trunk, size: 250485)
2020-03-31
18:41
[ef8626664c] part of check-in [c705ce266a] Merge recent enhancements from trunk. (check-in: [c705ce266a] user: drh branch: approximate-analyze, size: 250382)
2020-03-21
23:10
[6908c059e4] part of check-in [5d14a1c4f2] Fix to the recomputation of the colUsed field added by check-in [a9bb71ba708ba722]. This fixes ticket [5829597ac43811e3]. (check-in: [5d14a1c4f2] user: drh branch: trunk, size: 250456)
14:05
[ba6d286edb] part of check-in [2383aa2cb8] Merge updates from trunk. (check-in: [2383aa2cb8] user: drh branch: explain-improvements, size: 250528)
00:05
[cb7588bfe9] part of check-in [a9bb71ba70] Recompute the set of columns used for each table when the table is involved in query flattening. (check-in: [a9bb71ba70] user: drh branch: trunk, size: 250510)
2020-03-19
21:17
[128d9d6996] part of check-in [3cf7537b5e] Initial code for a proposed new sqlite3_stmt_mode() API. This is an incomplete snapshot of a work-in-progress. (check-in: [3cf7537b5e] user: drh branch: sqlite3_stmt_mode, size: 249156)
2020-03-17
13:41
[04a4138c64] part of check-in [a9bfa47aee] Remove the SQLITE_OMIT_BTREECOUNT option. Btree count is required. (check-in: [a9bfa47aee] user: drh branch: approximate-analyze, size: 249064)
2020-03-16
18:52
[49d46acea0] part of check-in [38e3dd389d] Fix handling of window functions in aggregate queries that have no GROUP BY clause. Also remove a faulty assert causing the error reported in [618156e3]. (check-in: [38e3dd389d] user: dan branch: trunk, size: 249138)
2020-02-27
16:21
[c94eec317c] part of check-in [951b39ca74] Fix harmless compiler warnings from MSVC. (check-in: [951b39ca74] user: drh branch: trunk, size: 249164)
15:07
[ba2280da7e] part of check-in [5972677793] Optimization for "SELECT min(x) FROM tbl" where "x" is indexed and NOT NULL. This also allows similar queries on NOT NULL virtual table columns to be optimized. (check-in: [5972677793] user: dan branch: trunk, size: 249160)
2020-02-23
17:34
[466f573805] part of check-in [c431b3fd8f] Fix a problem with ALTER TABLE for views that have a nested FROM clause. Ticket [f50af3e8a565776b]. (check-in: [c431b3fd8f] user: drh branch: trunk, size: 249100)
2020-02-20
14:08
[59ba85dce4] part of check-in [a67cf5b7d3] Early-out on the INTERSECT query processing following an out-of-memory error. This fixes a potential null pointer dereference found by sakura(@eternalsakura13) of Alpha Team, Qihoo 360. (check-in: [a67cf5b7d3] user: drh branch: trunk, size: 249079)
2020-02-13
22:12
[9e5b357f1c] part of check-in [c9a8defcef] Fix problems in the constant propagation optimization that were introduced by check-in [1c3e5c20a9e6f501]. Fix for ticket [1dcb4d44964846ad] (check-in: [c9a8defcef] user: drh branch: trunk, size: 249055)
2020-02-07
19:44
[28defa337b] part of check-in [bcf876e67e] During byte-code generation, strive to avoid jumps that merely jump to the following instruction. (check-in: [bcf876e67e] user: drh branch: trunk, size: 249135)
2020-01-22
20:56
[f677c53adb] part of check-in [bbbc2881b9] Merge version 3.31.0 (check-in: [bbbc2881b9] user: drh branch: begin-concurrent, size: 249141)
2020-01-21
16:23
[3f7aecf64b] part of check-in [934ee8bdb4] Fix a problem with using views in SQLITE_OMIT_VIRTUAL_TABLE builds. Also some test case fixes required for the same builds. (check-in: [934ee8bdb4] user: dan branch: trunk, size: 249126)
14:42
[5924f8df8f] part of check-in [c7e29458a7] Fix an assert() that could fail in SQLITE_MUTATION_TEST builds following an error in a query that uses CTEs. (check-in: [c7e29458a7] user: dan branch: trunk, size: 249086)
2020-01-17
19:14
[1b787876c0] part of check-in [7584e4b649] Fix #ifdefs so it compiles cleanly with all SQLITE_OMIT compile-time options. Update compile-time option testing. (check-in: [7584e4b649] user: drh branch: trunk, size: 249070)
2020-01-16
17:53
[28211b0eee] part of check-in [52206488f3] New testcase() macros in select.c, for coverage of the change from two check-ins ago. (check-in: [52206488f3] user: drh branch: trunk, size: 248957)
16:12
[3e3a7ba46c] part of check-in [1bc783da63] Do not allow the constant-propagation optimization to apple to ON/USING clause terms as it does not help and it might cause downstream problems. (check-in: [1bc783da63] user: drh branch: trunk, size: 248842)
2020-01-15
13:34
[d9ce0406c4] part of check-in [95ba2f50fd] Merge fixes and enhancements from trunk into begin-concurrent. (check-in: [95ba2f50fd] user: drh branch: begin-concurrent, size: 248845)
2020-01-09
20:44
[924b61cef5] part of check-in [5720924cb0] Merge in the untrusted-schema enhancements. See doc/trusted-schema.md for details. (check-in: [5720924cb0] user: drh branch: trunk, size: 248830)
20:33
[c88a3597da] part of check-in [edbf911fde] Fix a harmless compiler warning. (check-in: [edbf911fde] user: drh branch: trunk, size: 248517)
13:08
[0ae5299e59] part of check-in [d662129a60] Simplified error message for the unsafe use of a virtual table. (check-in: [d662129a60] user: drh branch: new-security-options, size: 248838)
2020-01-08
13:08
[fbae5d6db6] part of check-in [5962921fce] Merge recent changes from trunk. (check-in: [5962921fce] user: drh branch: new-security-options, size: 248857)
04:36
[de96e8a24d] part of check-in [1c3e5c20a9] Simplification of the logic in the constant-propagation optimization. (check-in: [1c3e5c20a9] user: drh branch: trunk, size: 248525)
01:43
[63ef2d193f] part of check-in [6db1c3498f] Fix the constant propagation optimization so that it does not try to propagate constant expressions that have affinity. Ticket [82ac75ba0093e5dc] (check-in: [6db1c3498f] user: drh branch: trunk, size: 248306)
00:39
[bff6f4e1b0] part of check-in [ee0bc7ede0] Fix a misworded comment. No code changes. (check-in: [ee0bc7ede0] user: drh branch: trunk, size: 248233)
2020-01-07
18:10
[a2be95ccf2] part of check-in [3d87ff312e] Enforce SQLITE_VTABRISK restrictions. (check-in: [3d87ff312e] user: drh branch: new-security-options, size: 248631)
2020-01-06
17:06
[80d1aac701] part of check-in [1409758f72] Ensure the SF_Aggregate flag on a SELECT statement is set if a DISTINCT is transformed to a GROUP BY. Ticket [9c944882]. (check-in: [1409758f72] user: dan branch: trunk, size: 248299)
2020-01-03
13:55
[64bf450dc0] part of check-in [4889cbf898] Ensure that when a Select object is reset a new, empty, SrcList is allocated. (check-in: [4889cbf898] user: dan branch: trunk, size: 248266)
02:20
[6a2d755e06] part of check-in [ff9492d3ff] When generating the name of a view (or common table expression) because the SQL does not specify a name, avoid the names "true" and "false" which might be confused for the boolean literals of the same name, leading to an inconsistent abstract syntax tree. (check-in: [ff9492d3ff] user: drh branch: trunk, size: 248202)
2020-01-02
21:41
[8791103f21] part of check-in [bd57e6d923] Merge the latest enhancements from trunk. (check-in: [bd57e6d923] user: drh branch: two-size-lookaside, size: 248170)
2020-01-01
20:17
[ba1af88f0d] part of check-in [ce14173252] Ensure that when code for a scalar SELECT featuring window functions is generated more than once by the planner, separate ephemeral tables are opened for each instance. (check-in: [ce14173252] user: dan branch: trunk, size: 248102)
2019-12-31
14:49
[bf8e722260] part of check-in [39d5557937] Merge recent enhancements from trunk. (check-in: [39d5557937] user: drh branch: two-size-lookaside, size: 248173)
2019-12-30
20:42
[2a753ec714] part of check-in [d4813a8d81] Fix a typo in a comment. No changes to code. (check-in: [d4813a8d81] user: drh branch: trunk, size: 248105)
14:32
[71234f813c] part of check-in [ab09ef4271] Do not use HIDDEN columns for NATURAL joins. Fix for [7c0e06b16]. (check-in: [ab09ef4271] user: dan branch: trunk, size: 248105)
2019-12-28
18:25
[dafb9d298e] part of check-in [eeb76f621d] Do not attempt to flatten compound sub-queries in a FROM clause into the parent if any component of the sub-query uses a window function. (check-in: [eeb76f621d] user: dan branch: trunk, size: 247901)
2019-12-27
20:54
[e18a64e8d9] part of check-in [d29edef934] Do not attempt to unwind the WITH stack in the Parse object following an error. This fixes a separate case to [de6e6d68], but also causes an assertion fault at select.c:4666 for test case altertab3-22.4. (check-in: [d29edef934] user: dan branch: better-error-handling-1, size: 247764)
2019-12-26
00:53
[83e3aba723] part of check-in [a17b29f08c] Fix an incorrect assert() added by check-in [fa58aad48a788802]. Problem found by dbsqlfuzz. (check-in: [a17b29f08c] user: drh branch: trunk, size: 247748)
2019-12-25
23:54
[338c1e7e2d] part of check-in [fa58aad48a] When the sqlite3WindowRewrite() routine detects and error, have it convert the SELECT statement into just "SELECT null" so that it does not leave the parse tree in a goofy state that can cause problems with subsequent code before the stack has a chance to unwind and report the error. Ticket [d87336c81c7d0873] (check-in: [fa58aad48a] user: drh branch: trunk, size: 247728)
2019-12-19
22:08
[b895d809b9] part of check-in [cba2a2a44c] Continuation of [e2bddcd4c55ba3cb]: Add another spot where it is necessary to abort early due to prior errors in sqlite3WindowRewrite(). (check-in: [cba2a2a44c] user: drh branch: trunk, size: 247068)
2019-12-18
20:51
[dd7e409677] part of check-in [862974312e] Continue to back away from the LEFT JOIN optimization of check-in [41c27bc0ff1d3135] by disallowing query flattening if the outer query is DISTINCT. Without this fix, if an index scan is run on the table within the view on the right-hand side of the LEFT JOIN, stale result registers might be accessed yielding incorrect results, and/or an OP_IfNullRow opcode might be invoked on the un-opened table, resulting in a NULL-pointer dereference. This problem was found by the Yongheng and Rui fuzzer. (check-in: [862974312e] user: drh branch: trunk, size: 247024)
2019-12-13
00:49
[3590f06418] part of check-in [59d0f3afe5] Tie up the loose ends in the ExprList size reduction. (check-in: [59d0f3afe5] user: drh branch: exprlist-size-reduction, size: 246934)
2019-12-12
22:11
[b5702ca6b2] part of check-in [fdda76cfb0] Work toward reducing the incremental size of an ExprList object to 24-byte per entry, from 32-bytes (on a 64-bit machine). This helps the new mini-lookaside allocator to run better by avoiding excessive reallocs. The current change mostly works, but still has a few loose ends to tie up. This check-in is merely a snapshot to save my work. (check-in: [fdda76cfb0] user: drh branch: exprlist-size-reduction, size: 246943)
20:22
[39a9e180a2] part of check-in [d3783357f8] Change the name of the Expr.a.zName field to zEName, so that it has a name that is distinct from other fields and variables and is hence easier to grep for. (check-in: [d3783357f8] user: drh branch: two-size-lookaside, size: 246873)
2019-12-07
13:42
[0fe10579de] part of check-in [26d991f214] Correctly deal with multi-row VALUES clauses that contain window functions. (check-in: [26d991f214] user: drh branch: trunk, size: 246866)
2019-12-04
01:42
[048c0d650c] part of check-in [92893b7980] Fix a double-free that could occur when a component of a compound SELECT with an ORDER BY clause uses named window definitions. (check-in: [92893b7980] user: dan branch: trunk, size: 246805)
2019-11-22
10:14
[f403b7bd23] part of check-in [bcdd66c169] Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list. (check-in: [bcdd66c169] user: dan branch: trunk, size: 246748)
2019-11-15
00:52
[50ccaf5fc3] part of check-in [2c35d3f67b] Fix table-valued functions so that they will work as the right table in a LEFT JOIN. Ticket [2ae0c599b735d59e] (check-in: [2c35d3f67b] user: drh branch: trunk, size: 246731)
2019-11-09
14:38
[887c309656] part of check-in [de6e6d6846] Make sure the WITH stack in the Parse object is disabled following an error. (check-in: [de6e6d6846] user: drh branch: trunk, size: 246702)
2019-10-26
15:40
[3395765ea3] part of check-in [346bdd49fb] Minor changes to help ensure the pointer returned by sqlite3VdbeGetOp() is not used after it becomes invalid. (check-in: [346bdd49fb] user: drh branch: trunk, size: 246651)
2019-10-22
00:03
[9c81d168b5] part of check-in [90f7c47735] When flipping ("commuting") a comparison operator, set the new EP_Commuted bit rather than adding extra EP_Collate bits, to single later processing that the order of precedence for COLLATE operators is inverted. Fix for ticket [b47e3627ecaadbde] (check-in: [90f7c47735] user: drh branch: trunk, size: 246514)
2019-10-16
12:18
[ac9270006d] part of check-in [11d472c1df] Initial experimental code for generated column support. Non-functional. (check-in: [11d472c1df] user: drh branch: generated-columns, size: 246537)
2019-10-12
23:38
[7ef05eeb7f] part of check-in [d1acf72ae1] When Select-Trace is enabled (in debugging builds only) do not show the result of Window function tree rewrites if there are no window functions. (check-in: [d1acf72ae1] user: drh branch: trunk, size: 246532)
2019-10-10
15:17
[b3d64a7a33] part of check-in [ccba7202b6] Be sure to rewrite column references inside FILTER clauses and window frame definitions when flattening queries. Fix for [1079ad19]. (check-in: [ccba7202b6] user: dan branch: trunk, size: 246516)
2019-10-09
17:06
[fd56dee1f3] part of check-in [5ba8cee8f7] An alternative, experimental lookaside memory allocator that uses two different slot sizes. (check-in: [5ba8cee8f7] user: sperry branch: 2-size-lookaside, size: 246265)
2019-09-30
16:14
[addc1c57cb] part of check-in [a003818f70] Merge the 3.30.0 beta 1 changes from trunk. (check-in: [a003818f70] user: drh branch: begin-concurrent, size: 246257)
2019-09-23
12:38
[f509982c96] part of check-in [f907395ef5] Omit the sqlite3IntTokens array constant for a code simplification. (check-in: [f907395ef5] user: drh branch: trunk, size: 246242)
2019-09-21
17:31
[059edc066d] part of check-in [8ea1dc727d] Fix harmless compiler warnings. (check-in: [8ea1dc727d] user: drh branch: trunk, size: 246267)
15:44
[4cd8fc7b0c] part of check-in [20f7951bb2] Allow SQLite to omit redundant ORDER BY sorts in the case where a SELECT statement has GROUP BY and ORDER BY clauses that use the same expressions, even when the ORDER BY expressions are marked "DESC". (check-in: [20f7951bb2] user: dan branch: trunk, size: 246261)
2019-09-20
21:12
[446a2bdd21] part of check-in [5ef64b0f55] Simplify the fix in the previous commit. (check-in: [5ef64b0f55] user: dan branch: trunk, size: 245600)
20:52
[fd3ef107df] part of check-in [b1d7e104e0] Fix a problem with queries containing a min() or max() function for which the FILTER clause excludes all rows. (check-in: [b1d7e104e0] user: dan branch: trunk, size: 245737)
2019-09-16
12:08
[e6ac535817] part of check-in [93b9ef3f47] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [93b9ef3f47] user: drh branch: begin-concurrent, size: 244536)
2019-09-10
15:33
[e2c8705485] part of check-in [36997c4ade] Ensure the columns of views and sub-queries maintain their implicit collation sequences when the "push-down" optimization is applied. Fix for [18458b1a]. (check-in: [36997c4ade] user: dan branch: trunk, size: 244521)
2019-09-09
19:49
[8685adae94] part of check-in [1863b7bf12] Ensure the columns of views and sub-selects in the FROM clause of a select are always assigned implicit collation sequences, just as table columns are. Possible fix for [a7debbe0]. (check-in: [1863b7bf12] user: dan branch: tkt-a7debbe0., size: 244649)
2019-08-27
19:59
[e4fe08c3da] part of check-in [94085fb3e7] Add support for "ORDER BY ... NULLS FIRST" and "ORDER BY ... NULLS LAST". Use this to fix ticket [f8a7060e]. (check-in: [94085fb3e7] user: dan branch: trunk, size: 244005)
17:01
[c1dfbd699a] part of check-in [7f5168a76a] Omit the "x IN (y)" to "x==y" optimization of check-in [e68b427afbc82e20] (and ticket [e39d032577df6942]) as it causes difficult affinity problems as demonstrated by ticket [dbaf8a6820be1ece] and the original assertion fault is no longer a factor due to countless other changes of the previous 5 years. (check-in: [7f5168a76a] user: drh branch: trunk, size: 243993)
2019-08-22
19:35
[ae8713c846] part of check-in [63e625c8eb] Merge fixes from trunk. Also fix a reference to the KeyInfo.aSortOrder field, which should now be KeyInfo.aSortFlags (check-in: [63e625c8eb] user: drh branch: nulls-last, size: 244117)
16:38
[d42f1f1435] part of check-in [44578865fa] Fix the likely(), unlikely(), and likelihood() functions so that they have no affinity, just like any other function. Ticket [7e07a3dbf5a8cd26] (check-in: [44578865fa] user: drh branch: trunk, size: 244105)
2019-08-17
15:47
[51840208d6] part of check-in [db1e60800b] Merge trunk changes into this branch. (check-in: [db1e60800b] user: dan branch: nulls-last, size: 244108)
2019-08-15
21:27
[80b8b4c857] part of check-in [61b4bccd29] Add the SQLITE_DBCONFIG_ENABLE_VIEW option, together with a "db config" command in the TCL interface that can access that option as well as all the other sqlite3_db_config() boolean options. (check-in: [61b4bccd29] user: drh branch: trunk, size: 244096)
2019-08-12
16:36
[a8f5a4993c] part of check-in [07babb0f89] Experimental implementation of NULLS FIRST/LAST. This branch still has problems - the most significant of which is that ORDER BY clauses with a non-default NULLS FIRST/LAST qualifier can never use an index. (check-in: [07babb0f89] user: dan branch: nulls-last, size: 243921)
2019-08-10
14:16
[11087458ec] part of check-in [712e477148] Remove two incorrect assert() statements from the logic used to derive column names and types from subqueries. (check-in: [712e477148] user: drh branch: trunk, size: 243921)
2019-08-09
20:26
[164270b9b1] part of check-in [eaf15d9bae] Allow the RHS of a row-value IN operator to use a compound query with an ORDER BY clause. (check-in: [eaf15d9bae] user: drh branch: trunk, size: 244104)
2019-08-07
13:25
[1c2c1d3ca6] part of check-in [193c87fc96] Do not make SQLITE_READ authorizer calls for tables without names, as all such tables will be internal-use-only tables for subqueries and whatnot. (check-in: [193c87fc96] user: drh branch: trunk, size: 243995)
2019-08-06
21:16
[29fd0dea77] part of check-in [17b3d2218c] Ensure that when the col in an operator like "val IN(col)" is a column of a view, its affinity is not used to coerce val. Fix for [0a5e2c1d]. (check-in: [17b3d2218c] user: dan branch: trunk, size: 243976)
14:37
[db06006136] part of check-in [e8234f6939] Use 0x40 (ASCII '@') instead of 0x00 to mean "no affinity" so that columns with no affinity can appear in a zero-terminated string. Use the new SQLITE_AFF_NONE macro for this new magic number. (check-in: [e8234f6939] user: drh branch: pending, size: 243864)
2019-08-05
19:44
[196bc4990e] part of check-in [7480db307c] Fix the patch on this branch so that it works with sub-queries, as well as views. (check-in: [7480db307c] user: dan branch: tkt-61c853-A, size: 243789)
19:34
[bee5951b33] part of check-in [470ac8d50c] The second option for [61c853857f40da49]: In this mode, columns of VIEWs and subqueries that are formed by expressions have affinity BLOB rather than affinity none, as has usually been the case for a while. But this mode fixes a couple of corner cases involving query flattening and the push-down optimization where that rule was violated. (check-in: [470ac8d50c] user: drh branch: tkt-61c853-B, size: 243820)
19:32
[5b0ef2a8b3] part of check-in [09cd0c0c6e] One of two options on how to address ticket [61c853857f40da49]. In this mode, we back out the documentation change of [07b7749da88d54e5] and change the core to work as it has been documented to work since 2017, rather than how it has actually worked since 2009. (check-in: [09cd0c0c6e] user: drh branch: tkt-61c853-A, size: 243823)
2019-07-24
23:15
[1b8b5afee7] part of check-in [01cdc590f7] Fix faulty asserts in the code generator. Ticket [c52b09c7f38903b1] (check-in: [01cdc590f7] user: drh branch: trunk, size: 243724)
2019-07-22
16:20
[9817d812b1] part of check-in [d23f331682] Remove Window objects from the corresponding Select.pWin list when they are deleted. (check-in: [d23f331682] user: dan branch: winfunc-in-orderby, size: 243401)
2019-07-20
21:12
[2890d92d5d] part of check-in [23b119671f] Make sure any window definitions in an ORDER BY clause are removed from the SELECT statement if the ORDER BY clause gets optimized out. (check-in: [23b119671f] user: drh branch: winfunc-in-orderby, size: 243434)
2019-07-18
20:55
[3c78ea0e70] part of check-in [2f0a564f6e] Fix a problem where self-joins on views that are aggregate queries may return the wrong result. Cherrypick of [74ef97bf51dd531a]. (check-in: [2f0a564f6e] user: mistachkin branch: branch-3.28, size: 242362)
2019-07-16
19:44
[c4b4fe44df] part of check-in [9e66458592] Add new assert() statements in an attempt to help static analyzers avoid false-positives. (check-in: [9e66458592] user: drh branch: trunk, size: 243375)
2019-07-13
16:22
[1ac359aed1] part of check-in [5dac8c38df] Rework the FILTER clause implementation to share more code with window functions. (check-in: [5dac8c38df] user: dan branch: filter-clause, size: 243352)
09:56
[98362f190f] part of check-in [86ab963cc5] Merge latest trunk changes into this branch. (check-in: [86ab963cc5] user: dan branch: filter-clause, size: 243260)
2019-07-08
21:06
[b922327d66] part of check-in [7fff080335] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [7fff080335] user: drh branch: begin-concurrent, size: 242754)
12:01
[62f21307b2] part of check-in [28196d894a] Ensure collation sequences and affinities work in window function queries. Fix for [9ece23d2]. (check-in: [28196d894a] user: dan branch: trunk, size: 242739)
2019-07-05
17:38
[696107b0e8] part of check-in [81eed055de] Minor tweak to patch on this branch to reclaim some cycles. (check-in: [81eed055de] user: dan branch: filter-clause, size: 243392)
2019-07-02
11:56
[1774cc457e] part of check-in [1f1ae2d6ac] Experimental implementation of FILTER clause for aggregate functions. (check-in: [1f1ae2d6ac] user: dan branch: filter-clause, size: 243352)
2019-06-03
13:53
[d9a1a0b21a] part of check-in [583e5a0ab6] Fix the count-of-view optimization so that it is (correctly) disabled for a query that includes a WHERE clause or a GROUP BY clause. Cherrypick of [05897ca48a40c6771]. (check-in: [583e5a0ab6] user: mistachkin branch: branch-3.28, size: 242284)
2019-05-29
18:33
[9187f2c657] part of check-in [f9e85e6c79] Add an assert() as an additional test for fix in check-in [523b42371122d9e1b3]. (check-in: [f9e85e6c79] user: drh branch: trunk, size: 242871)
17:22
[87ea2169d6] part of check-in [523b423711] Fix the query flattener optimization so that it preserve the "SF_Compound" bit when flattening a compound subquery into a non-compound outer query. Failure to preserve that bit could allow subsequent flattenings which are not valid. Fix for ticket [c41afac34f15781fe09cd]. (check-in: [523b423711] user: drh branch: trunk, size: 242832)
2019-05-23
16:38
[ccd314a204] part of check-in [d2fe370caf] Improvements to the view-self-join optimization so that it works on all VIEWs, not just on Common Table Expressions. (check-in: [d2fe370caf] user: drh branch: trunk, size: 242760)
2019-05-22
22:49
[2db13eac09] part of check-in [3cacc4b940] Renumber the Select.selId values in the copies of SELECT statements that implement VIEWs when the VIEW is expanded, so that when the same VIEW is used twice in the same join, each expansion as a distinct selId. This fixes ticket [ce823231949d3abf42453c8]. (check-in: [3cacc4b940] user: drh branch: trunk, size: 242685)
2019-05-15
18:42
[c620bcd03b] part of check-in [05897ca48a] Fix the count-of-view optimization so that it is (correctly) disabled for a query that includes a WHERE clause or a GROUP BY clause. (check-in: [05897ca48a] user: drh branch: trunk, size: 242401)
2019-05-14
21:51
[67a3082237] part of check-in [5d3a6e18d4] Merge the latest trunk enhancements into begin-concurrent. (check-in: [5d3a6e18d4] user: drh branch: begin-concurrent, size: 242301)
2019-05-03
17:19
[ef860c7e58] part of check-in [74ef97bf51] Fix a problem where self-joins on views that are aggregate queries may return the wrong result. (check-in: [74ef97bf51] user: dan branch: trunk, size: 242286)
2019-04-23
12:30
[b7304d2f49] part of check-in [8d478cfb92] Improvement on the previous check-in. Parse.rc is less reliable than Parse.nErr for detecting SQLITE_TOOBIG errors. (check-in: [8d478cfb92] user: drh branch: trunk, size: 242208)
2019-04-22
20:05
[e2c1f53e42] part of check-in [5d85d80ef8] Early detection of SQLITE_TOOBIG when processing nested queries. (check-in: [5d85d80ef8] user: drh branch: trunk, size: 242179)
2019-04-19
13:38
[e6c6a75e9a] part of check-in [7713996aa9] Streamline the processing of the AND operator. Slightly smaller and faster. (check-in: [7713996aa9] user: drh branch: trunk, size: 242178)
2019-03-08
15:30
[baeeee1b5e] part of check-in [667cce3dce] Merge all the latest enhancements from trunk. (check-in: [667cce3dce] user: drh branch: begin-concurrent-pnu, size: 242184)
2019-03-01
21:12
[9263f5c30d] part of check-in [9a0a93c89d] Fix a minor comment typo. No code changes. (check-in: [9a0a93c89d] user: drh branch: trunk, size: 242169)
2019-02-06
00:55
[c998f69475] part of check-in [3d3b142f10] If the query flattener detects an error, cause the SELECT code generator to abort immediately. (check-in: [3d3b142f10] user: drh branch: trunk, size: 242168)
2019-01-24
16:51
[aa96c72292] part of check-in [718ead555b] While PRAGMA full_column_names is off (the default) do not make changes to the short_column_names pragma when computing the column names for subqueries. (check-in: [718ead555b] user: drh branch: literal-column-names, size: 242180)
15:51
[8e22fda41a] part of check-in [b1601db7ad] Make sure the column name flags are restored correctly after an error inside of sqlite3ResultSetOfSelect(). (check-in: [b1601db7ad] user: drh branch: trunk, size: 242126)
2019-01-17
15:40
[f7260c833c] part of check-in [df08d472b0] Revamp the SrcList allocator routines to be methods of Parse instead of being methods of the "sqlite3" object, so that they can leave better error messages when the SrcList object grows too large. (check-in: [df08d472b0] user: drh branch: trunk, size: 242126)
2019-01-16
19:26
[5cbd6ab60b] part of check-in [49fcde2f1f] Fix a problem in the code generator for sorting results with SRT_EphemTab and a LIMIT clause. (check-in: [49fcde2f1f] user: drh branch: trunk, size: 242173)
2019-01-02
19:46
[49f7cf2521] part of check-in [86685679b4] Merge changes from begin-concurrent-wal2. Also modify the unix-excl shm-locks on this branch so that it is not an error to attempt to release an EXCLUSIVE lock that is not held. (check-in: [86685679b4] user: dan branch: begin-concurrent-pnu-wal2, size: 241989)
2018-12-31
20:13
[4b0be1bfd2] part of check-in [4fcdc7a293] Remove an optimization that can no longer occur, being superceded by the subquery-reuse optimization. Put an assert in place of the optimization to detect if the need for this optimization ever returns. (check-in: [4fcdc7a293] user: drh branch: reuse-subqueries, size: 241974)
2018-12-29
02:26
[2493d09401] part of check-in [4a0929ac76] A new implementation of sqlite3VdbeMakeLabel() is faster and makes fewer memory allocations by deferring memory allocation until sqlite3VdbeResolveLabel() is called, at which point the code generator has a better idea of how big the relocation table needs to be. The sqlite3VdbeMakeLabel() routine now takes a Parse* parameter instead of Vdbe*. (check-in: [4a0929ac76] user: drh branch: trunk, size: 242439)
2018-12-27
02:16
[c6a71c619d] part of check-in [202dd03301] Fix a problem in which nested CTEs with the same table name trick the code generator into thinking they are the same CTE, which then tries to use the manifest them both into the same transient table. (check-in: [202dd03301] user: drh branch: trunk, size: 242341)
2018-12-18
17:47
[ca760497a7] part of check-in [a93ca38b43] Merge latest begin-concurrent changes into this branch. (check-in: [a93ca38b43] user: dan branch: begin-concurrent-pnu, size: 242156)
2018-12-07
02:01
[d292fc7d0b] part of check-in [65aafb5531] Fix the sqlite3ExprDup() function so that it correctly duplicates the Window object list on a Select that contains window functions. Fix for ticket [f09fcd17810f65f717]. (check-in: [65aafb5531] user: drh branch: branch-3.26, size: 242136)
2018-12-06
19:15
[8c7317d5ee] part of check-in [f1b18d44ff] Simplify the query flattener so that it does not duplicate the WHERE clause of subquery that is being incorporated into the outer query - copies it directly. This is more efficient. And it also fixes the specific test case show for ticket [f09fcd17810f65f71789525] but it does not resolve the more general problem that sqlite3ExprDup() does not correctly duplicate expressions that contain subqueries with window functions. (check-in: [f1b18d44ff] user: drh branch: ticket-f09fcd17810f, size: 242141)
17:06
[06a122decd] part of check-in [53d3b169d8] When masking bits off of sqlite3.flags, make sure the mask is 64 bits in size so as not to accidentally mask of high-order bits. (check-in: [53d3b169d8] user: drh branch: trunk, size: 242085)
16:50
[44e04ad75c] part of check-in [9c6dbcfab5] When saving off the value of sqlite3.flags, take care to preserve all 64 bits. (check-in: [9c6dbcfab5] user: drh branch: trunk, size: 242080)
2018-12-04
01:18
[8a0fb4fd97] part of check-in [6770ed0873] Attempt to make the parser a little faster by storing the ON and USING clause in a single OnUsing object. (check-in: [6770ed0873] user: drh branch: on-using-opt, size: 242063)
2018-11-30
16:26
[e1cad75298] part of check-in [81e626f4a4] Merge the mutex-free PRNG change into this branch. (check-in: [81e626f4a4] user: dan branch: begin-concurrent-pnu, size: 242095)
2018-11-20
16:02
[88f6aab4f5] part of check-in [dfab7170ed] Consolidate the two sqlite3SchemaToIndex() routines. (check-in: [dfab7170ed] user: dan branch: reuse-schema1, size: 242461)
2018-11-19
20:41
[594fd2e0a1] part of check-in [84be9220db] Fix a problem with virtual tables in shared schemas. (check-in: [84be9220db] user: dan branch: reuse-schema1, size: 242389)
2018-11-17
18:11
[eabefcb57e] part of check-in [6d7a7e5faf] Fix further problems with the feature on this branch. (check-in: [6d7a7e5faf] user: dan branch: reuse-schema1, size: 242383)
2018-11-15
21:20
[08bbb3b8f4] part of check-in [31b6aee755] Fix some problems with the feature on this branch. Many problems remain. (check-in: [31b6aee755] user: dan branch: reuse-schema1, size: 242314)
2018-11-09
00:02
[0c08c5e6ba] part of check-in [8d663bfaaa] Disable the use of coroutines for subqueries within a query that is the RHS of an IN operator, as the IN operator might be evaluated more than once. Possible fix for [787fa716be3a7f65], unless we can come up with something better. Later: Counter-example found. (check-in: [8d663bfaaa] user: drh branch: tkt787fa716-deadend, size: 242216)
2018-10-25
15:25
[0671309c24] part of check-in [caebf87925] In the WHERE-constraint propagation optimization, if there are duplicate constraint, make sure only one of them propagates. Proposed fix for ticket [cf5ed20fc8621b165]. (check-in: [caebf87925] user: drh branch: branch-3.25, size: 242064)
14:15
[61e867a906] part of check-in [5d5b596f15] In the WHERE-constraint propagation optimization, if there are duplicate constraint, make sure only one of them propagates. Proposed fix for ticket [cf5ed20fc8621b165]. (check-in: [5d5b596f15] user: drh branch: trunk, size: 242080)
2018-09-27
13:10
[1604a23093] part of check-in [b284957096] Disallow the use of window functions in the recursive part of a recursive CTE. Fix for ticket [e8275b415a2f03bee]. (check-in: [b284957096] user: drh branch: branch-3.25, size: 241425)
12:14
[33aacf1c17] part of check-in [7fc2994434] Disallow the use of window functions in the recursive part of a recursive CTE. Fix for ticket [e8275b415a2f03bee]. (check-in: [7fc2994434] user: dan branch: trunk, size: 241441)
2018-09-20
19:02
[1b7ade8fab] part of check-in [ad130bb86e] Combine the Expr.pTab and Expr.pWin fields into a union named "y". Add a new EP_WinFunc property that is only true if Expr.y.pWin is a valid pointer. This reduces the size of the Expr object by 8 bytes, reduces the overall amount of code, and shaves over 1 million cycles off of the speed test. (check-in: [ad130bb86e] user: drh branch: trunk, size: 241288)
2018-09-19
20:14
[6bacf10a3a] part of check-in [24b0f66ac6] Reduce the size of Expr to 64-bytes. This works somewhat, but there are test failures. More importantly, the size reduction from 80- to 64-bytes has not lowered the schema memory usage, but it has made the code a little bigger and a little slower. So the initial evidence is that this Expr refactoring experiment is not working... (check-in: [24b0f66ac6] user: drh branch: expr-simplify, size: 242071)
16:35
[45d01474cf] part of check-in [e4129cd3a0] Make sure Expr.eX changes back to EX_None after Expr.x.pRight is set to NULL due to an OOM. (check-in: [e4129cd3a0] user: drh branch: expr-simplify, size: 241787)
14:54
[f3070ba3c6] part of check-in [147c61a6d4] Reduce the size of Expr from 80 to 72 bytes moving the pRight field inside the "x" union. This is an incremental check-in that still has issues. (check-in: [147c61a6d4] user: drh branch: expr-simplify, size: 241733)
2018-09-18
21:35
[af9efbeea7] part of check-in [8849a463d6] In the Expr object, the Expr.eX field determines what value is stored in the Expr.x union. This mostly works, but there are issues identified by valgrind. (check-in: [8849a463d6] user: drh branch: expr-simplify, size: 241374)
2018-09-17
15:19
[8afcc2b56a] part of check-in [c6c9585f29] Disable the ORDER BY LIMIT optimization in queries using window functions. This fixes a problem that was introduced by check-in [206720129ed2fa8875a286] which attempted to fix ticket [9936b2fa443fec03ff25f9]. This changes is a fix for the follow-in tocket [510cde277783b5fb5de628]. (check-in: [c6c9585f29] user: drh branch: trunk, size: 241272)
2018-09-08
20:09
[ed6192ddd0] part of check-in [206720129e] Fix multiple issues with the ORDER BY LIMIT optimization. This is the proposed resolution to ticket [9936b2fa443fec03ff25]. (check-in: [206720129e] user: drh branch: trunk, size: 241243)
2018-08-04
17:15
[ae7396a314] part of check-in [2041231d56] Fix comments that were made obsolete by the removal of the column cache. (check-in: [2041231d56] user: drh branch: omit-column-cache, size: 241248)
15:53
[a32bfa40ec] part of check-in [7d9072b027] Further logic simplifications that flow out of the omission of the column cache. (check-in: [7d9072b027] user: drh branch: omit-column-cache, size: 241777)
2018-08-03
23:04
[9d3d5f5035] part of check-in [3f5f60cd75] Completely remove the column cache logic, which has been a persistent source of bugs for many years. Due to recent enhancements to the performance of the OP_Column opcode, removing the column cache actually makes speed-check.sh run faster. Removing the column cache also saves about 1,800 bytes of code space. (check-in: [3f5f60cd75] user: drh branch: omit-column-cache, size: 241781)
20:19
[18636c49ee] part of check-in [21235d9a41] Fix the handling of sub-queries with LIMIT clauses by the optimization activated by compile-time symbol SQLITE_COUNTOFVIEW_OPTIMIZATION. (check-in: [21235d9a41] user: dan branch: trunk, size: 242507)
2018-07-28
14:56
[22ed163cf6] part of check-in [e4b4737e34] Fix an assert() statement that was made obsolete by the constant propagation enhancement. Problem discovered by OSSFuzz. (check-in: [e4b4737e34] user: drh branch: trunk, size: 242381)
14:34
[a7c1a827d9] part of check-in [fcb88dd6b0] Improved debugging output when the ".selecttrace" option is used in the shell. (check-in: [fcb88dd6b0] user: drh branch: trunk, size: 242400)
2018-07-27
20:01
[2534927341] part of check-in [865249de68] Reduce the performance cost of the constant propagation optimization to less than 200,000 cycles. (check-in: [865249de68] user: drh branch: propagate-const-opt, size: 242357)
17:51
[a86a20bd89] part of check-in [598d608359] Only run the constant propagation optimization on joins since that is the only scenario where it is useful. This saves prepare time for the common case of a simple query. (check-in: [598d608359] user: drh branch: propagate-const-opt, size: 242322)
16:57
[7d2a980be7] part of check-in [82c67efb72] Constant propagation is now restricted to just the WHERE clause. The 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. (check-in: [82c67efb72] user: drh branch: propagate-const-opt, size: 242101)
2018-07-26
23:47
[81c6517a8d] part of check-in [57eb2abd5b] Generalize the constant propagation optimization so that it applies on every 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. (check-in: [57eb2abd5b] user: drh branch: propagate-const-opt, size: 240615)
21:16
[cd3993844a] part of check-in [2fb82ad8eb] Initial implementation of the WHERE-clause constant propagation optimization. (check-in: [2fb82ad8eb] user: drh branch: propagate-const-opt, size: 240579)
2018-07-10
20:50
[2e9661d442] part of check-in [f2057542cf] Minor comment changes. Add ALWAYS() macros on some unreachable branches in the xStep() methods of built-in window functions. (check-in: [f2057542cf] user: drh branch: trunk, size: 236216)
19:48
[313460e5a8] part of check-in [a7cdc5bc85] Identify Select objects within a single statement using small sequential integers rather than "0x%p". This is more readable and yields the same result on successive runs. (check-in: [a7cdc5bc85] user: drh branch: trunk, size: 236223)
05:11
[c06d56c1d5] part of check-in [a9a307265b] New VDBE comments and coverage macros. (check-in: [a9a307265b] user: drh branch: trunk, size: 236584)
2018-07-09
20:58
[ac70f376d0] part of check-in [0c8a2f257f] Add a comment to restriction (6) of the push-down optimization. No changes to code. (check-in: [0c8a2f257f] user: drh branch: trunk, size: 236471)
2018-07-05
21:22
[7b7c67731f] part of check-in [fa65380509] Use separate opcodes, OP_AggValue and OP_AggInverse, for the new callbacks associated with Window Functions, for improved readability of EXPLAIN output. (check-in: [fa65380509] user: drh branch: trunk, size: 236446)
2018-06-27
19:48
[82aa95aa1c] part of check-in [336de43a47] Avoid redundant ORDER BY operations when rewriting SELECT statements that contain window functions. (check-in: [336de43a47] user: dan branch: exp-window-functions, size: 236447)
2018-06-23
16:26
[e364e5ea8f] part of check-in [c1abd2dda4] Fix a problem with using LIMIT in window-function queries. (check-in: [c1abd2dda4] user: dan branch: exp-window-functions, size: 236447)
07:59
[3056565056] part of check-in [11d733396f] Fix a problem with using a window-function SELECT as a FROM clause sub-query in some circumstances. (check-in: [11d733396f] user: dan branch: exp-window-functions, size: 236409)
2018-06-22
20:51
[3e16525691] part of check-in [5f04b01646] Omit all window-function related code when building with SQLITE_OMIT_WINDOWFUNC. (check-in: [5f04b01646] user: dan branch: exp-window-functions, size: 236130)
2018-06-19
18:11
[99ad73c580] part of check-in [f4b1b6f85b] Fix a problem caused by a sub-query containing a window function in the FROM clause of a query that itself uses a window function. (check-in: [f4b1b6f85b] user: dan branch: exp-window-functions, size: 235843)
2018-06-14
19:06
[7e8e439bf8] part of check-in [43eb1e75a4] Fix problem with window functions min() and max() when used with a PARTITION clause and a frame starting point other than "UNBOUNDED PRECEDING". (check-in: [43eb1e75a4] user: dan branch: exp-window-functions, size: 235845)
2018-06-12
18:40
[224312eb28] part of check-in [fe7081e095] Fix some problems with using window-functions in aggregate queries. (check-in: [fe7081e095] user: dan branch: exp-window-functions, size: 235310)
2018-06-08
20:58
[0b0ce29bd7] part of check-in [19c983b511] Add support for the WINDOW clause. (check-in: [19c983b511] user: dan branch: exp-window-functions, size: 235310)
16:11
[d48879c0a2] part of check-in [236cb75bd1] Do not flatten sub-queries that contain window functions. (check-in: [236cb75bd1] user: dan branch: exp-window-functions, size: 235192)
2018-06-07
20:35
[3e7d9bc70f] part of check-in [2510220342] Merge latest trunk changes with this branch. (check-in: [2510220342] user: dan branch: exp-window-functions, size: 235422)
2018-06-05
20:04
[8d3176c525] part of check-in [dce2dfbe15] Calculate non-aggregate expressions in the SELECT list of an aggregate query that does not use min() or max() once per group, instead of once per row visited. (check-in: [dce2dfbe15] user: dan branch: exp-agg-opt, size: 234328)
2018-06-04
08:28
[2af92d4273] part of check-in [83d6416a86] Merge latest trunk changes into this branch. (check-in: [83d6416a86] user: dan branch: exp-window-functions, size: 234270)
2018-06-02
21:04
[3ba9808f63] part of check-in [91c1cb7a21] Add support for window functions row_number(), rank(), dense_rank() and percent_rank(). (check-in: [91c1cb7a21] user: dan branch: exp-window-functions, size: 234249)
2018-06-01
13:30
[3291892add] part of check-in [8cadaf587d] Fix a bug in the SQLITE_ENABLE_SORTER_REFERENCES code causing an out-of-bounds array reference. (check-in: [8cadaf587d] user: dan branch: trunk, size: 233176)
2018-05-23
20:55
[8a7f842a04] part of check-in [3a203660f1] Add support for "ROWS BETWEEN <expr> PRECEDING AND <expr> FOLLOWING" window frames. (check-in: [3a203660f1] user: dan branch: exp-window-functions, size: 240250)
2018-05-21
19:45
[1ebe775c06] part of check-in [bc4b81d60d] Begin adding support for more esoteric window frames. (check-in: [bc4b81d60d] user: dan branch: exp-window-functions, size: 240104)
2018-05-19
14:15
[34a5cb9e6a] part of check-in [19c2e4b2f1] Fix minor problems on this branch. (check-in: [19c2e4b2f1] user: dan branch: exp-window-functions, size: 244338)
2018-05-17
19:24
[2b4bc6bb66] part of check-in [c9f0f14094] Evaluate multiple window functions in a single pass if they use the same window definition. Add xValue callbacks for other built-in aggregate functions. (check-in: [c9f0f14094] user: dan branch: exp-window-functions, size: 244920)
14:26
[0b9d051a0b] part of check-in [35af0b750e] Handle multiple window-functions in a single query. (check-in: [35af0b750e] user: dan branch: exp-window-functions, size: 244195)
2018-05-16
20:58
[0e82e32d3b] part of check-in [3781e52085] Start of experimental implementation of SQL window functions. Does not yet work. (check-in: [3781e52085] user: dan branch: exp-window-functions, size: 244172)
2018-05-05
16:50
[a35d462ee7] part of check-in [5d61e75f32] In an ORDER BY LIMIT, make sure the ORDER BY expression evaluator does not try to reuse values from the result set if the result set has not yet be computed. This fixes a bug in the recent deferred-row loading optimization, check-in [c381f0ea57002a264fd958b28e]. OSSFuzz discovered the problem. (check-in: [5d61e75f32] user: drh branch: trunk, size: 233155)
2018-05-03
23:20
[bf9185f40c] part of check-in [c381f0ea57] In ORDER BY LIMIT queries, try to evaluate the ORDER BY terms first, and it it becomes clear that the row will not come in under the LIMIT, then skip evaluation of the other columns. (check-in: [c381f0ea57] user: drh branch: trunk, size: 233058)
22:52
[c937eb1fc3] part of check-in [81ab5e0d10] Fix a branch that has become unreachable due to recent enhancements. (check-in: [81ab5e0d10] user: drh branch: trunk, size: 229557)
19:47
[75ae3000be] part of check-in [956fef361a] Optimizations to the new EQP framework. (check-in: [956fef361a] user: drh branch: rework-EQP, size: 229577)
01:37
[e612d71bc5] part of check-in [c75eee69fa] Enhance EXPLAIN QUERY PLAN to report the generation of constant rows using VALUES or just a SELECT without FROM. (check-in: [c75eee69fa] user: drh branch: rework-EQP, size: 230107)
2018-05-02
16:13
[29294be54b] part of check-in [f2f525548c] Improved EQP output for recursive CTEs and multi-value VALUES clauses. (check-in: [f2f525548c] user: drh branch: rework-EQP, size: 230138)
14:24
[e66bb89e00] part of check-in [82ca44b82f] Fix a dangling-else problem that was causing recursive CTEs to malfunction. Begin fixing test cases to work with the new EQP output. (check-in: [82ca44b82f] user: drh branch: rework-EQP, size: 229900)
02:22
[41962df2f2] part of check-in [699a77e479] Improvements to the EQP display for compound select statements. (check-in: [699a77e479] user: drh branch: rework-EQP, size: 229398)
00:33
[8481fa6ec8] part of check-in [70b48a7972] Begin reengineering the EXPLAIN QUERY PLAN function to provide more intuitive output. (check-in: [70b48a7972] user: drh branch: rework-EQP, size: 229880)
2018-05-01
01:18
[f84fef1a0d] part of check-in [2a75e631ee] The ".selecttrace 0x4000" command causes the AST to be output to stdout as a table with four columns. (check-in: [2a75e631ee] user: drh branch: ast-trace-demo, size: 231661)
2018-04-30
19:32
[170834c5b9] part of check-in [ce4ef46058] Defer loading result column values into registers on an ORDER BY LIMIT until we know that the LIMIT does not exclude the current row. (check-in: [ce4ef46058] user: drh branch: faster-order-by-limit, size: 234896)
2018-04-26
16:13
[daf07d8def] part of check-in [71bf91c218] When processing an "ORDER BY ... LIMIT" that does not use an index, check whether or not a record may appear in the final result set before adding it to the sorter. (check-in: [71bf91c218] user: dan branch: sorter-limit-opt, size: 231395)
2018-04-24
17:34
[95dff4409d] part of check-in [aeb694e3f7] Do not attempt to use terms from the WHERE clause to drive indexes on the right table of a LEFT JOIN. Fix for ticket [4ba5abf65c5b0f9a96a7a40cd18b] (check-in: [aeb694e3f7] user: drh branch: trunk, size: 231223)
00:08
[3dbce43798] part of check-in [c7e6e848fa] Fix to check-in [ca34c2dd20ee071e] - avoid a NULL pointer dereference following an OOM. (check-in: [c7e6e848fa] user: drh branch: trunk, size: 231216)
2018-04-23
17:43
[9da61170e4] part of check-in [ca34c2dd20] The ".selecttrace 0x2000" command causes just the top-level parse tree to be displayed, after all transformations, and showing the EQP iSelectId at each level. (check-in: [ca34c2dd20] user: drh branch: trunk, size: 231212)
17:18
[e08e65b862] part of check-in [5682146e8a] The ".selecttrace 4" command now shows only a single parse tree after name resolution. (check-in: [5682146e8a] user: drh branch: trunk, size: 230923)
17:09
[96ed6724a8] part of check-in [8088d8cac3] Do not restore the iSelectId value until after the last SELECTTRACE when debugging Select processing. (check-in: [8088d8cac3] user: drh branch: trunk, size: 230910)
17:02
[f8ce94703b] part of check-in [5c6339f955] In the ".selecttrace" output, include the EXPLAIN QUERY PLAN iSelectId as part of each Select identifier. (check-in: [5c6339f955] user: drh branch: trunk, size: 230910)
2018-04-18
19:56
[04ae9b4a30] part of check-in [ef74090a40] Add the "sorter-reference" optimization, allowing SQLite to be configured so 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. (check-in: [ef74090a40] user: dan branch: trunk, size: 230873)
19:08
[9257a7f26e] part of check-in [413015c029] Avoid a NULL-pointer deref following OOM. (check-in: [413015c029] user: drh branch: sorter-reference, size: 230826)
14:04
[6cf4c11b2f] part of check-in [9afeb0c88b] Remove an unused local variable. (check-in: [9afeb0c88b] user: drh branch: sorter-reference, size: 230795)
2018-04-16
21:12
[875b63fd96] part of check-in [b25a7bb769] Add SQLITE_CONFIG_SORTERREF_SIZE configuration option. (check-in: [b25a7bb769] user: dan branch: sorter-reference, size: 230821)
10:34
[3e84cb8699] part of check-in [dba3095fee] Reduce the size of the NameContext object by grouping seldom-used fields into a union. (check-in: [dba3095fee] user: drh branch: trunk, size: 223787)
2018-04-14
18:46
[c87425f0d5] part of check-in [9719cb46bb] Experimental change to "SELECT * FROM ... ORDER BY" processing to load some column values from the db after sorting. (check-in: [9719cb46bb] user: dan branch: sorter-reference, size: 230717)
2018-04-11
14:11
[41e857c107] part of check-in [f32cdb41ca] Minor simplification to internal function generateSortTail(). (check-in: [f32cdb41ca] user: dan branch: trunk, size: 223740)
2018-04-09
20:36
[dfcd77a9be] part of check-in [a2c443c0ee] Minor changes to the input grammar resulting in a faster and slightly smaller parser. (check-in: [a2c443c0ee] user: drh branch: trunk, size: 223872)
2018-03-31
16:31
[16d1f3510c] part of check-in [823779d31e] Fix an assertion failure triggered by a SELECT with a compound sub-query that contains an incorrectly placed ORDER BY clause. This problem is just an assert() failure - non-DEBUG builds are not affected. Problem found by OSSFuzz. (check-in: [823779d31e] user: dan branch: trunk, size: 223915)
2018-03-27
15:13
[e51efe5479] part of check-in [f08c1731b0] The push-down optimization was being too aggressive such that it sometimes generated incorrect results. Reinstate the restriction (4) (with qualifications) that was removed by check-ins [b5d3dd8cb0b1e4] and [dd568c27b1d765]. (check-in: [f08c1731b0] user: drh branch: trunk, size: 223948)
2018-03-21
01:59
[2c408ab9b4] part of check-in [b5d3dd8cb0] Relax LEFT-JOIN restrictions on the push-down optimization. (check-in: [b5d3dd8cb0] user: drh branch: join-strength-reduction, size: 223583)
2018-03-20
22:52
[926d122e87] part of check-in [08833dda3a] Do a more thorough job of cleaning traces of the strength-reduced LEFT JOIN. (check-in: [08833dda3a] user: drh branch: join-strength-reduction, size: 223051)
21:16
[965e1791b1] part of check-in [5b7abecc7a] If terms of the WHERE clause require that the right table in a LEFT JOIN not be a null row, then simplify the LEFT JOIN into an ordinary JOIN. (check-in: [5b7abecc7a] user: drh branch: join-strength-reduction, size: 223040)
18:08
[69ed6ca9d1] part of check-in [5ad668d433] Improvements to the HAVING-to-WHERE optimization. The code uses less space and less CPU, and there is now ".selecttrace" output. (check-in: [5ad668d433] user: drh branch: trunk, size: 221708)
13:00
[97a2131f02] part of check-in [85a31557ac] Remove a debugging statement accidently left in check-in [eddc35f3057e59fd] (check-in: [85a31557ac] user: drh branch: push-down-disable, size: 221718)
11:24
[0502980145] part of check-in [eddc35f305] Add the ability to disable the push-down optimization using the 0x1000 bit of SQLITE_TESTCTRL_OPTIMIZATIONS. (check-in: [eddc35f305] user: drh branch: push-down-disable, size: 221728)
2018-03-19
22:28
[a69962ae4f] part of check-in [03e541f606] Minor improvements to ".selecttrace". No changes to non-debug code. (check-in: [03e541f606] user: drh branch: trunk, size: 221594)
16:06
[1e9f53890f] part of check-in [30704d2a52] Improved ".selecttrace" output formatting. No changes in non-debug code. (check-in: [30704d2a52] user: drh branch: trunk, size: 221572)
2018-01-24
20:42
[f02352ac5c] part of check-in [8055e4f424] When unpacking a sorter record, do so from right to left instead of left to right, since by starting with the right-most column, the work done by OP_Column opcodes is reduced. (check-in: [8055e4f424] user: drh branch: trunk, size: 221572)
2018-01-14
20:12
[bebe7cce45] part of check-in [a4fa0581ba] Avoid excess stack usage when a VALUES clause with lots of rows occurs within a scalar expression. This fixes a problem discovered by OSSFuzz. (check-in: [a4fa0581ba] user: drh branch: trunk, size: 221486)
2017-12-23
12:33
[8b22abe193] part of check-in [6b2ff26c25] Move the generation of output column names earlier in the case of a CREATE TABLE AS. This is a fix for ticket [3b4450072511e62] and a continuation of check-in [ade7ddf1998190b2b63] that fixes cases of ticket [de3403bf5ae5f72ed6] that were missed previously. (check-in: [6b2ff26c25] user: drh branch: trunk, size: 221113)
11:51
[6c84733262] part of check-in [8f194008c3] Add a SELECTTRACE() macro to indicate when column names are assigned to a SELECT statement. This helps with debugging for tickets like [de3403bf5ae5f72e] and [3b4450072511e621]. (check-in: [8f194008c3] user: drh branch: trunk, size: 221079)
2017-11-14
23:48
[17e2201918] part of check-in [3925facd94] In the parse tree, combine LIMIT and OFFSET into a single expression rooted on a TK_LIMIT node, for a small code size reduction and performance increase, and a reduction in code complexity. (check-in: [3925facd94] user: drh branch: trunk, size: 221016)
2017-10-31
03:40
[660ef79778] part of check-in [1c80c75d4b] Remove unnecessary NEVER() and ALWAYS() conditionals. (check-in: [1c80c75d4b] user: drh branch: trunk, size: 221737)
2017-10-28
20:51
[36345c6315] part of check-in [d17ef7d153] Reactivate query flattening when the result set of the outer query has 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. (check-in: [d17ef7d153] user: drh branch: trunk, size: 221734)
2017-10-26
20:04
[0b4c1ac592] part of check-in [6caec9082b] Enhance the min/max optimization so that it works with indexes on expressions. (check-in: [6caec9082b] user: drh branch: trunk, size: 221548)
18:43
[d055dc3a42] part of check-in [6fbf74ab31] Extra ".selecttrace" output following aggregate analysis. No changes to production builds. (check-in: [6fbf74ab31] user: drh branch: trunk, size: 222586)
2017-10-21
14:17
[e6a068d9ea] part of check-in [6ee8cb6ae5] Catch and avoid a 16-bit integer overflow on the number of columns in a common table expression. This fixes a problem found by OSS-Fuzz. The test case is in TH3. (check-in: [6ee8cb6ae5] user: drh branch: trunk, size: 221976)
13:29
[78b81b0d0f] part of check-in [6ec82acde8] Remove unnecessary "#if SQLITE_MAX_COLUMN". SQLITE_MAX_COLUMN is always defined. (check-in: [6ec82acde8] user: drh branch: trunk, size: 221941)
2017-10-04
12:06
[42aca61e73] part of check-in [4464f40ccd] Turn restriction 20 on the query flattener into an assert since the situation restricted can no longer occur because of the more aggressive use of co-routines. (check-in: [4464f40ccd] user: drh branch: trunk, size: 221970)
05:59
[8a506e0a27] part of check-in [66629b2a09] Remove a redundant restriction from the query flattener. (check-in: [66629b2a09] user: drh branch: trunk, size: 221507)
02:30
[4248b28ec9] part of check-in [d050dc605c] Fix a minor typo in the query flattener header comment. No code changes. (check-in: [d050dc605c] user: drh branch: trunk, size: 221213)
2017-10-03
19:53
[fa9fd8750c] part of check-in [772b0db146] Simplify the computation of types on columns of a view. (check-in: [772b0db146] user: drh branch: trunk, size: 221212)
17:29
[764d5ac2bc] part of check-in [1dd828088d] Add some OK_IF_ALWAYS_TRUE() marks on optimization branches in select.c. (check-in: [1dd828088d] user: drh branch: trunk, size: 221212)
17:17
[52f5ef1684] part of check-in [7be760e907] Remove an unused variable from sqlite3Insert() and fix harmless compiler warnings associated with -DSQLITE_MUTATION_TEST. (check-in: [7be760e907] user: drh branch: trunk, size: 221174)
16:57
[cb912fc73e] part of check-in [966438bd25] Fix the sqlite3_column_decltype() interface to return the correct datatype when the value comes through a CTE. (check-in: [966438bd25] user: drh branch: trunk, size: 221206)
14:24
[948aa57117] part of check-in [c5ad5e1675] The simplification to sqlite3SelectExpand() in last night's [3a4ffb21] check-in was not completely correct. This adjustment is needed for correct OOM handling in some configurations. (check-in: [c5ad5e1675] user: drh branch: trunk, size: 221122)
03:24
[9ff172fe33] part of check-in [f10ece964f] Simplification to the logic that computes column type names. Update: Does not work in all configurations. (check-in: [f10ece964f] user: drh branch: does-not-work, size: 221166)
03:01
[1a11e6ab32] part of check-in [e4342fd401] Do not compute column and row size estimates for the transient Table objects associated with the result set of a SELECT statement, since those estimates are never used for anything constructive. (check-in: [e4342fd401] user: drh branch: trunk, size: 221053)
2017-10-02
23:50
[3e3fb2e45e] part of check-in [3a4ffb21d0] Mark a single branch within sqlite3SelectExpand() as an optimization. (check-in: [3a4ffb21d0] user: drh branch: trunk, size: 221206)
23:30
[c12d9b45c3] part of check-in [5bf2ccb908] Simplification to sqlite3SelectPrep() for improved testability. (check-in: [5bf2ccb908] user: drh branch: trunk, size: 221187)
21:29
[38ab76414b] part of check-in [6035c9b272] Add the OK_IF_ALWAYS_TRUE() and OK_IF_ALWAYS_FALSE() macros for marking conditionals that improve performance but do not change the outcome. (check-in: [6035c9b272] user: drh branch: trunk, size: 221248)
2017-09-30
11:47
[19ebf10e33] part of check-in [928486231f] More details in the header comment of pushDownWhereTerms(). No changes to code. (check-in: [928486231f] user: drh branch: prefer-coroutine-sort-subquery, size: 221210)
01:25
[55a17d54ee] part of check-in [71f0adf7ca] Fix unreachable conditionals and revise a testcase that was made obsolete by the changes on this branch. (check-in: [71f0adf7ca] user: drh branch: prefer-coroutine-sort-subquery, size: 220959)
2017-09-29
22:13
[8e8e9965af] part of check-in [6b1651d711] Always render a subquery that is not part of a join as a co-routine. (check-in: [6b1651d711] user: drh branch: prefer-coroutine-sort-subquery, size: 220837)
16:08
[73fa1cc03a] part of check-in [f62cd4d940] Merge the query flattener comment improvements from trunk. (check-in: [f62cd4d940] user: drh branch: prefer-coroutine-sort-subquery, size: 221921)
16:07
[733e7f727d] part of check-in [0840f9f824] Clean up the comments on the query flattener to more clearly and accurately express the conditions under which the flattener is able to run. (check-in: [0840f9f824] user: drh branch: trunk, size: 221250)
14:31
[117cbceca9] part of check-in [06f432fb7c] Merge changes from trunk. (check-in: [06f432fb7c] user: drh branch: prefer-coroutine-sort-subquery, size: 221644)
12:44
[61f6ee5911] part of check-in [2a45bbc9fd] Make sure the 6th parameter to the authorizer callback for view subqueries has the correct view name. (check-in: [2a45bbc9fd] user: drh branch: trunk, size: 220973)
12:12
[1508104113] part of check-in [04ef40a8fe] Better names for subqueries in EXPLAIN comments. (check-in: [04ef40a8fe] user: drh branch: trunk, size: 220726)
2017-09-28
20:06
[d38163a76a] part of check-in [042d655dd9] Do not flatten subqueries that contain an ORDER BY or GROUP BY clause and can be implemented using a co-routine. (check-in: [042d655dd9] user: drh branch: prefer-coroutine-sort-subquery, size: 221290)
17:29
[ff9551b179] part of check-in [ff2f5a31a2] Remove the (undocumented) query-planner control that prevents a "SELECT ALL" subquery in FROM clause from being implemented as a co-routine. This control was added by [a29e117d7ec], where it was called a "stop-gap". (check-in: [ff2f5a31a2] user: drh branch: trunk, size: 220619)
16:56
[f7bd3c6280] part of check-in [fd3267ef92] Fix over-length source code lines in select.c. No logic changes. (check-in: [fd3267ef92] user: drh branch: trunk, size: 220733)
01:58
[843ac757ad] part of check-in [490e488ea9] Add new routines to simplify dealing with collating sequences in expressions: sqlite3ExprNNCollSeq() and sqlite3ExprCollSeqMatch(). (check-in: [490e488ea9] user: drh branch: trunk, size: 220647)
2017-09-18
13:16
[9fa0db382f] part of check-in [a944719314] Minor simplification of error message generation during compound query code generation. (check-in: [a944719314] user: drh branch: trunk, size: 220730)
08:51
[420d3f5d9e] part of check-in [2e57335081] Merge latest trunk changes with this branch. (check-in: [2e57335081] user: dan branch: shared-mapping-hack, size: 220859)
2017-09-16
20:58
[6ea1cb2f0a] part of check-in [5dbb255a93] Simplify the sqlite3VdbeGet() routine. Smaller, faster, and easier to maintain. (check-in: [5dbb255a93] user: drh branch: trunk, size: 220844)
2017-09-15
17:40
[5945cf1a54] part of check-in [dd95887f82] Remove an unnecessary parameter from selectInnerLoop(). (check-in: [dd95887f82] user: drh branch: trunk, size: 220989)
2017-09-09
08:03
[5bda89e7cd] part of check-in [e63d1a7cd3] Use a mutex-free PRNG for the random() and randomblob() SQL functions and for the randomness used during checkpoint operations. (check-in: [e63d1a7cd3] user: drh branch: mutex-free-randomness, size: 221051)
2017-08-14
14:53
[c9b3d8444b] part of check-in [d0da791ba0] Sometimes a TK_COLUMN Expr node can have Expr.pTab==0 if it is a reference to an expression column in an index on an expression. Fix for ticket [aa98619ad08ddcab]. (check-in: [d0da791ba0] user: drh branch: trunk, size: 221036)
01:33
[ea89210655] part of check-in [7e0d3e9cb0] Properly dequote column names in tables constructed by an aggregate SELECT. (check-in: [7e0d3e9cb0] user: drh branch: trunk, size: 220879)
2017-08-02
22:43
[3fd19c98c5] part of check-in [aea5990eab] In the KeyInfo object, refactor the nField and nXField elements into nKeyField and nAllField, which are more useful and run a little faster. (check-in: [aea5990eab] user: drh branch: trunk, size: 220832)
2017-07-31
13:11
[32194c9792] part of check-in [499942b3ee] Move the generation of output column names earlier, to right after name resolution and before query transformations such as flattening. This prevents the names from getting mangled by query transformations, and obviates hacks in the query flattener that attempt to work around the name mangling. The resulting code is smaller and faster and gives more consistent output. This is a fix for ticket [de3403bf5ae5f72ed] and a cherry-pick of check-in [09834279aeca3bda] (check-in: [499942b3ee] user: drh branch: branch-3.19, size: 214850)
2017-07-29
16:01
[31b35ddf55] part of check-in [09834279ae] Move the generation of output column names earlier, to right after name resolution and before query transformations such as flattening. This prevents the names from getting mangled by query transformations, and obviates hacks in the query flattener that attempt to work around the name mangling. The resulting code is smaller and faster and gives more consistent output. This is an alternative fix to ticket [de3403bf5ae5f72ed]. (check-in: [09834279ae] user: drh branch: early-column-names, size: 220790)
14:56
[ef0be59b83] part of check-in [5df7f0e6a1] Use the subquery column name, not the original SQL statement text, as the added AS clause in the query flattener. (check-in: [5df7f0e6a1] user: drh branch: flattener-column-names, size: 223686)
03:33
[2da6bc6f1d] part of check-in [439cc5c52c] In the query flattener, only add AS clauses to output columns of the outer query that are copied directly from the inner query. Formerly, all columns of the outer query received an AS clause if they did not have one already. This is a proposed fix for ticket [de3403bf5ae5f72]. (check-in: [439cc5c52c] user: drh branch: flattener-column-names, size: 224002)
2017-07-18
17:34
[c6bf96a7f9] part of check-in [9dbae1df75] Do not use the flattening optimization for a sub-query on the RHS of a LEFT JOIN if that subquery reads data from a virtual table. Because it prevents the planner from creating an automatic index on the results of the sub-query, the flattening optimization sometimes slows things down in this case. (check-in: [9dbae1df75] user: dan branch: trunk, size: 222174)
2017-07-17
19:25
[7922b1e1aa] part of check-in [adc082c146] When checking for the WHERE-clause push-down optimization, verify that all terms of the compound inner SELECT are non-aggregate, not just the last term. Fix for ticket [f7f8c97e97597]. (check-in: [adc082c146] user: drh branch: push-down-backport, size: 211420)
19:14
[75f825e980] part of check-in [52674f948c] Do not apply the WHERE-clause pushdown optimization to terms that originate in the ON or USING clause of a LEFT JOIN. Fix for ticket [c2a19d81652f40568c]. (check-in: [52674f948c] user: drh branch: push-down-backport, size: 211183)
19:07
[22db639450] part of check-in [043d6ce8ad] For FROM-clause subqueries that cannot be flattened, try to push relevant WHERE clause terms of the outer query down into the subquery in order to help the subquery run faster and/or use less memory. Cherry-pick from [6df18e949d36]. Still need to backport bug fixes associated with that check-in. (check-in: [043d6ce8ad] user: drh branch: push-down-backport, size: 211007)
2017-07-12
14:10
[95659b7990] part of check-in [68824a439b] Clarification and simplification and result column naming logic. (check-in: [68824a439b] user: drh branch: trunk, size: 222049)
2017-07-09
18:55
[6aa7e8ee53] part of check-in [70096c505d] Always make "column%d" column-names 1-based, never 0-based. (check-in: [70096c505d] user: drh branch: trunk, size: 220305)
00:30
[c1e669e01c] part of check-in [acf3b9cc9c] Make sure the columns of a VALUES() clause are named "column%d" even if the VALUES() clause is a subquery in the FROM clause of an outer query. (check-in: [acf3b9cc9c] user: drh branch: trunk, size: 220303)
2017-07-05
16:20
[12b01d6107] part of check-in [fcbd6abdb1] Make use of covering indexes in the OR optimization. (check-in: [fcbd6abdb1] user: drh branch: branch-3.8.9, size: 208266)
14:54
[296bf898a2] part of check-in [b7ae4b879f] Add the count-of-view optimization when compiled using SQLITE_COUNTOFVIEW_OPTIMIZATION. (check-in: [b7ae4b879f] user: drh branch: branch-3.8.9, size: 208231)
2017-07-04
19:34
[c9f7b7196e] part of check-in [d1ba200234] Add the count-of-view optimization when compiled using SQLITE_COUNTOFVIEW_OPTIMIZATION. (check-in: [d1ba200234] user: drh branch: trunk, size: 220225)
2017-06-24
18:10
[741937503c] part of check-in [7b59c353b8] Consider the values bound to SQL variables when determining whether or not a partial index may be used. (check-in: [7b59c353b8] user: dan branch: partial-index-variables, size: 217008)
2017-06-20
17:43
[35ccfae64c] part of check-in [483462682d] Ensure that the query planner knows that any column of a flattened LEFT JOIN can be NULL even if that column is labeled with "NOT NULL". Fix for ticket [892fc34f173e99d8]. (check-in: [483462682d] user: dan branch: trunk, size: 216989)
2017-06-11
19:51
[0d2afdbdba] part of check-in [87aceb417a] When reusing a materialized view, make sure the estimated number of output rows is correctly initialized to avoid confusing the query planner. (check-in: [87aceb417a] user: drh branch: trunk, size: 216877)
2017-05-31
13:45
[d93205e43a] part of check-in [df78594351] Avoid allocating excess memory to the KeyInfo objects. (check-in: [df78594351] user: drh branch: trunk, size: 216783)
2017-05-29
14:26
[fd0a17fb78] part of check-in [6854a34ed7] Optimizations to the Walker object and its methods to make the code a little smaller and to help it run a little faster. (check-in: [6854a34ed7] user: drh branch: trunk, size: 216764)
13:09
[ecdb34eb33] part of check-in [43c9ae371f] Correctly initialize the iSelectId of FROM clause terms that are a self join of a reused materialized subquery. Without this, the EXPLAIN QUERY PLAN output for the query will identify the subquery using the uninitialized (and arbitrary) iSelectId. (check-in: [43c9ae371f] user: drh branch: trunk, size: 216252)
2017-05-25
11:39
[c444ca057d] part of check-in [1a074c8a2b] The SQLITE_EXTRA_IFNULLROW compile-time option causes OP_IfNullRow opcodes to be issued for references to the right-hand side table of *any* flattened join, not just LEFT JOINs. This puts extra stress on the OP_IfNUllRow opcodes for testing purposes. (check-in: [1a074c8a2b] user: drh branch: branch-3.19, size: 216188)
2017-05-23
15:21
[9db6887514] part of check-in [44b21e35c9] Disable the LEFT JOIN flattening optimization for aggregate queries, as it does not currently work. Further fix for ticket [cad1ab4cb7b0fc344]. (check-in: [44b21e35c9] user: drh branch: trunk, size: 215849)
12:36
[30805a1bc0] part of check-in [941d8142b7] Ensure that the expression rewriter inside the query flattener decends into the substructure of the TK_IF_NULL_ROW operator. This is a continuation of the fix for ticket [cad1ab4cb7b0fc344]. (check-in: [941d8142b7] user: drh branch: trunk, size: 215529)
01:21
[c23168278b] part of check-in [92c178507d] When flattening a query, make sure iTable attribute of TK_IF_NULL_ROW operators (that result from a prior flattening of a LEFT JOIN) are updated correctly. Fix for ticket [cad1ab4cb7b0fc344]. (check-in: [92c178507d] user: drh branch: trunk, size: 215525)
2017-05-11
12:05
[d74b1cde1d] part of check-in [4139953ab5] Change the SQLITE_READ authorization call for unreferenced tables to use an empty string for the column name, as this is less likely to impact legacy authorization callbacks that assume column names are always non-NULL. (check-in: [4139953ab5] user: drh branch: trunk, size: 215412)
2017-05-10
16:12
[275ad2697c] part of check-in [92ab1f7257] Invoke the SQLITE_READ authorizer callback with a NULL column name for any table referenced by a query but from when no columns are extracted. (check-in: [92ab1f7257] user: drh branch: trunk, size: 214880)
2017-05-02
17:54
[4f0adefaa5] part of check-in [9e35c89dbe] Reuse the same materialization of a view when that view appears in a query more than once, such as in a self-join. (check-in: [9e35c89dbe] user: drh branch: trunk, size: 214240)
16:55
[4bbdacd119] part of check-in [47cbb471d0] Move terms of the HAVING clause that reference only columns in the GROUP BY clause over to the WHERE clause, resulting in a faster query plan. (check-in: [47cbb471d0] user: drh branch: trunk, size: 213068)
2017-05-01
19:53
[2c7ce8872b] part of check-in [a33179596f] Remove an unnecessary branch. (check-in: [a33179596f] user: drh branch: having-where-optimization, size: 212797)
17:04
[2546672c84] part of check-in [c64fe3a169] Futher bug fixes to the function that determines when a materialized view can be reused. (check-in: [c64fe3a169] user: drh branch: materialized-view-reuse, size: 211967)
16:37
[c9aa9575cc] part of check-in [b2aae55958] Minor bug fixes and performance enhancement. (check-in: [b2aae55958] user: drh branch: materialized-view-reuse, size: 211750)
15:15
[1fba56aa7d] part of check-in [478c34b9a8] Initial implementation of an optimization that attempts to reuse the same materialization of a view on a self-join of the view. (check-in: [478c34b9a8] user: drh branch: materialized-view-reuse, size: 211638)
2017-04-29
20:53
[a2b839b8cf] part of check-in [5375a3ce56] Automatically transfer terms from the HAVING clause to the WHERE clause of an 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). (check-in: [5375a3ce56] user: dan branch: having-where-optimization, size: 212831)
19:29
[478e95d424] part of check-in [4e1df76e3d] Add a single testcase() macro to the subquery processing logic. (check-in: [4e1df76e3d] user: drh branch: trunk, size: 210795)
2017-04-14
19:03
[bf8ab605e4] part of check-in [3a5860d86f] Add the TK_IF_NULL_ROW opcode to deal with non-NULL result columns in the result set of a view or subquery on the RHS of a LEFT JOIN that gets flattened. (check-in: [3a5860d86f] user: drh branch: left-join-view, size: 210524)
17:18
[52b29bdeaa] part of check-in [1838a59c8a] An initial attempt to optimize VIEWs that occur as the right operand of a LEFT JOIN. This particular check-in does not work correctly because it does not deal with the case of columns in the VIEW that return non-NULL even when all columns in the table of the VIEW are NULL because of the LEFT JOIN. (check-in: [1838a59c8a] user: drh branch: left-join-view, size: 210612)
12:39
[4588dcfb0f] part of check-in [e651074be2] Simplify the interface to the subst() routines that are part of the query flattener by collecting common parameters into the SubstContext object and passing around a pointer to that object. (check-in: [e651074be2] user: drh branch: trunk, size: 210319)
2017-04-13
01:19
[cc9129bc97] part of check-in [132339a1fb] Forward port the skip-ahead-distinct branch which was abandoned for some reason that I do not recall. This port should have been achived by a merge of trunk into the previous head of skip-ahead-distinct, but that did not work. So I had to manually "rebase" the changes. (check-in: [132339a1fb] user: drh branch: skip-ahead-distinct, size: 210123)
2017-04-11
16:44
[e6f9afd8a5] part of check-in [4143650c4c] Very slight smaller and faster sqlite3SelectNew() (check-in: [4143650c4c] user: drh branch: trunk, size: 210131)
01:01
[9228235fde] part of check-in [c59eaf2b7c] Improved comments. Fix a problem when an indexed expression is used in an ORDER BY clause. (check-in: [c59eaf2b7c] user: drh branch: covering-index-on-expr, size: 210103)
2017-04-07
19:41
[b24e628a2b] part of check-in [a52ef2ad7c] Proof of concept for the ability to use the expression columns in an index on expressions in place of equivalent expressions in the result set or in the WHERE clause. This check-in compiles but is mostly untested. (check-in: [a52ef2ad7c] user: drh branch: covering-index-on-expr, size: 209878)
2017-04-05
12:39
[afcf31d8ed] part of check-in [ad90e8bb5e] Split off sqlite3DbFreeNN() from sqlite3DbFree() and use it in cases where we know that the argument to be freed is never NULL. (check-in: [ad90e8bb5e] user: drh branch: trunk, size: 209877)
11:32
[bbcfd919d7] part of check-in [2b6560ad88] Combine the ExprList_item objects and the ExprList wrapper into a single memory allocation, for improved performance and reduced footprint. (check-in: [2b6560ad88] user: drh branch: trunk, size: 209873)
2017-03-13
14:30
[2496d0cc63] part of check-in [c6dda3f752] Fix a segfault that could occur following an OOM error in the flattenSubquery() routine. (check-in: [c6dda3f752] user: dan branch: trunk, size: 209859)
2017-02-18
20:05
[e32cc5c546] part of check-in [c1adf95958] Add an optimization to OP_Column to speed up sequential OP_Column instructions that read earlier fields from the same cursor. Attempt to reorder OP_Column opcodes so as to take advantage of this. (check-in: [c1adf95958] user: dan branch: sort-column-opcodes, size: 210093)
2017-02-03
19:16
[d12f3539f8] part of check-in [f5306ad681] Avoid a performance problem when very large "VALUES(..), (..), (..)" terms are used in queries. (check-in: [f5306ad681] user: dan branch: recursive-selectdup, size: 209820)
2017-01-10
20:04
[3856db523b] part of check-in [46db23ccd1] Changes to allow some multi-row UPDATE statements to avoid the two-pass approach. (check-in: [46db23ccd1] user: dan branch: onepass-update, size: 209682)
2017-01-07
00:56
[533e55a406] part of check-in [d577dda0a7] Avoid duplicate b-tree searches in the duplicate row detector used to implement DISTINCT. (check-in: [d577dda0a7] user: drh branch: trunk, size: 209681)
2017-01-05
17:23
[4437d9d5d5] part of check-in [590ca83b8e] Fix handling the case where a sub-query in a FROM clause is itself a UNION ALL, and one side of that UNION ALL is a query on a view that includes an ORDER BY. Fix for ticket [190c2507]. (check-in: [590ca83b8e] user: dan branch: trunk, size: 209633)
2016-12-18
17:42
[dfb6cadc3d] part of check-in [165c044686] Change the OP_IfNotZero opcode so that it decrements register P1 by 1 rather than the value in P3, and so that it only decrements if originally positive. This avoids decrementing the smallest 64-bit signed integer. (check-in: [165c044686] user: drh branch: trunk, size: 209637)
2016-12-16
15:05
[e4c687333c] part of check-in [053a149cc8] Fix a problem causing the planner to generate sub-optimal plans for some queries that use recursive WITH sub-queries with LIMIT clauses. (check-in: [053a149cc8] user: dan branch: trunk, size: 209643)
2016-12-14
14:07
[204491a5e0] part of check-in [9cae4c2e30] Refactor the Table.nRef field as Table.nTabRef for easier grepping. (check-in: [9cae4c2e30] user: drh branch: trunk, size: 209550)
2016-12-08
01:38
[b4bd43e123] part of check-in [83bc5e40af] More changes to take advantage of the sqlite3VdbeAppendP4() method. (check-in: [83bc5e40af] user: drh branch: trunk, size: 209517)
2016-12-07
15:38
[0e4920c4ab] part of check-in [433d16ff3a] Prevent the flattening or where-term push-down optimizations from obscuring misuses of SQL row values that can lead to crashes or assert() failures. (check-in: [433d16ff3a] user: dan branch: trunk, size: 209522)
2016-12-06
22:47
[ee68944dfe] part of check-in [2a81763e68] Performance improvement and size reduction in the Expr node allocator function sqlite3PExpr(). (check-in: [2a81763e68] user: drh branch: trunk, size: 209295)
2016-12-01
19:38
[403775526d] part of check-in [8bed4cd549] Avoid clearing the EP_FromJoin flag from terms in ON clauses when flattening sub-selects. Possible fix for [2df0107b]. (check-in: [8bed4cd549] user: dan branch: left-join-fix, size: 209304)
2016-11-25
19:32
[668c6865b1] part of check-in [6ac7b07a4a] Remove the OP_RowKey opcode. Use OP_RowData in its place. (check-in: [6ac7b07a4a] user: drh branch: trunk, size: 209154)
2016-11-11
19:08
[672b1af237] part of check-in [b835cf3e50] Avoid storing redundant fields in sorter records when the sort-key and data have fields in common. (check-in: [b835cf3e50] user: drh branch: trunk, size: 209153)
18:08
[04fd717fb9] part of check-in [6e2e9d383f] Reenable the SQLITE_EXPR_REF optimization for "SELECT DISTINCT ... ORDER BY" queries. (check-in: [6e2e9d383f] user: dan branch: sorter-opt, size: 208920)
2016-11-10
20:14
[64b2273747] part of check-in [0af62fdbd8] Avoid storing redundant fields in sorter records when the sort-key and data have fields in common (as in "SELECT a FROM t1 ORDER BY 1"). (check-in: [0af62fdbd8] user: dan branch: sorter-opt, size: 208368)
2016-11-09
01:38
[0a7c523d75] part of check-in [42db7cd2c0] Make use of the unpacked key on the OP_IdxInsert on sorters with a LIMIT. (check-in: [42db7cd2c0] user: drh branch: unpacked-IdxInsert, size: 207550)
00:10
[7788e48a65] part of check-in [89d958abba] Enhance the OP_IdxInsert opcode to optionally accept unpacked key material. (check-in: [89d958abba] user: drh branch: unpacked-IdxInsert, size: 207494)
2016-11-02
16:29
[ec96f4cdc5] part of check-in [8e4ba115ed] When the block sorting optimization is used in a scalar subquery, be sure to exit the loop as soon as the first valid output row is received. Fix for ticket [cb3aa0641d9a4] backported to the 3.8.9 branch. (check-in: [8e4ba115ed] user: drh branch: branch-3.8.9, size: 204837)
2016-10-01
19:21
[ea3af83e2d] part of check-in [54a449a41d] Use sqlite3DbMallocRawNN() where appropriate, instead of sqlite3DbMallocRaw(). (check-in: [54a449a41d] user: drh branch: trunk, size: 207317)
2016-09-26
14:39
[6dede310d2] part of check-in [cf7f9e6d5a] When flattening a query of the form "SELECT * FROM (SELECT * FROM tbl WHERE x=?) WHERE y=?", ensure that the final WHERE clause is "x=? AND y=?" instead of "y=? AND x=?". Although it is still not guaranteed, this makes the order in which WHERE clause terms are processed comport more closely to users expectations. (check-in: [cf7f9e6d5a] user: dan branch: trunk, size: 207315)
2016-09-22
18:53
[fb9da69a36] part of check-in [c3774c6a5f] Remove the internal sqlite3CodeOnce() interface, replacing it with a direct call to sqlite3VdbeAddOp0(v,OP_Once). Slightly smaller and faster. (check-in: [c3774c6a5f] user: drh branch: trunk, size: 207332)
2016-09-14
01:43
[4123c2bdab] part of check-in [db3614825f] Backport the ORDER BY LIMIT optimization to version 3.8.9. (check-in: [db3614825f] user: drh branch: branch-3.8.9, size: 204544)
2016-09-06
19:08
[244f9cc5e4] part of check-in [ab3f8f193a] Remove obsolete vector-IN test cases. Fix a bad testcase() macro. (check-in: [ab3f8f193a] user: drh branch: rowvalue, size: 207320)
18:51
[d6c1a6463a] part of check-in [8329ac6f8d] Fix corer cases of vector IN operators where the RHS is a compound SELECT that includes an ORDER BY clause. (check-in: [8329ac6f8d] user: drh branch: rowvalue, size: 207339)
14:37
[4ccfc554a2] part of check-in [4071da2f87] Enhance the sqlite3GetTempRange() and sqlite3ReleaseTempRange() internal routines so that they use sqlite3GetTempReg() and sqlite3ReleaseTempReg() when nReg==1. (check-in: [4071da2f87] user: drh branch: rowvalue, size: 207444)
2016-09-03
01:46
[38216d0b2d] part of check-in [f1d06c49ba] Performance optimizations. (check-in: [f1d06c49ba] user: drh branch: rowvalue, size: 207575)
2016-08-19
15:41
[cf90abce32] part of check-in [b17872363b] Merge recent enhancements from trunk. (check-in: [b17872363b] user: drh branch: rowvalue, size: 207569)
2016-08-18
20:56
[fda7fd24b4] part of check-in [d7cf423cdc] Fix a zName to zDbSName conversion missed in the previous check-in. (check-in: [d7cf423cdc] user: drh branch: zDbSName, size: 208433)
15:21
[3a5ddce5d3] part of check-in [4768a1066c] Merge recent enhancements from trunk. (check-in: [4768a1066c] user: drh branch: rowvalue, size: 207566)
14:33
[890c32eab2] part of check-in [92a22f0134] Rename the Db.zName field to Db.zDbSName to make it more descriptive and to distinguish it from all of the other "zName" variables scattered throughout the code. (check-in: [92a22f0134] user: drh branch: zDbSName, size: 208430)
2016-08-02
18:50
[228eec644a] part of check-in [092b1c5ff5] Add tests and fixes for vector operations that use sub-queries with different combinations of LIMIT, OFFSET and ORDER BY clauses. (check-in: [092b1c5ff5] user: dan branch: rowvalue, size: 207563)
2016-08-01
20:14
[952aa1b414] part of check-in [3ef75d45eb] Fix a problem with vector range constraints involving the rowid column. And other issues. (check-in: [3ef75d45eb] user: dan branch: rowvalue, size: 207292)
16:37
[bb2a1583fd] part of check-in [1f4dba87da] Fix a problem with IN(...) constraints where the LHS is a sub-select that is an aggregate query. (check-in: [1f4dba87da] user: dan branch: rowvalue, size: 207342)
2016-07-09
20:23
[0115f5d222] part of check-in [b2204215b2] Add some support for using row value constructors in certain parts of SQL expressions. There are many bugs on this branch. (check-in: [b2204215b2] user: dan branch: rowvalue, size: 208367)
2016-06-04
17:12
[f3c6e9065f] part of check-in [b411107a36] Allocate KeyInfo objects from lookaside if possible. (check-in: [b411107a36] user: drh branch: trunk, size: 208427)
2016-05-20
13:44
[a0c4abf54b] part of check-in [ed1b30dc93] Set the NULLEQ flag on the sequence counter comparison in the ORDER BY LIMIT optimization, to avoid coverage complaints about not testing the NULL case. (check-in: [ed1b30dc93] user: drh branch: orderby-limit, size: 208414)
2016-05-19
22:13
[131eeddfca] part of check-in [852d1eda6e] In a query with both ORDER BY and LIMIT, if the inner loop satisfies the ORDER BY then try to cut short each invocation of the inner loop once the LIMIT has been satisfied. This check-in is a partial implementation only. (check-in: [852d1eda6e] user: drh branch: orderby-limit, size: 208369)
2016-04-25
02:20
[fd4a7ce293] part of check-in [ec215f94ac] When checking for the WHERE-clause push-down optimization, verify that all terms of the compound inner SELECT are non-aggregate, not just the last term. Fix for ticket [f7f8c97e97597]. (check-in: [ec215f94ac] user: drh branch: trunk, size: 207236)
2016-04-15
16:17
[22ef53e7a6] part of check-in [db5a2364eb] Skip-ahead does not always work. So we still have to check for redundancy. (check-in: [db5a2364eb] user: drh branch: skip-ahead-distinct, size: 207395)
01:55
[f7ad4ad2b1] part of check-in [9e14aa14cf] Progress toward getting DISTINCT to use a seek to advance to the next distinct row, when driven by an appropriate index. (check-in: [9e14aa14cf] user: drh branch: skip-ahead-distinct, size: 207395)
2016-04-14
19:29
[d3ef06f924] part of check-in [129083bd5e] Work toward improving analysis and code generation for DISTINCT and aggregate queries. (check-in: [129083bd5e] user: drh branch: better-distinct-agg, size: 207382)
15:38
[30217121bd] part of check-in [67d7f79c5e] Add some missing testcase() macros to the pushDownWhereTerms() routine. (check-in: [67d7f79c5e] user: drh branch: trunk, size: 207097)
13:06
[6c7f3cf68a] part of check-in [5a46914510] Additional ".selecttrace" debugging output when the query is transformed from a DISTINCT into a GROUP BY. (check-in: [5a46914510] user: drh branch: trunk, size: 206999)
2016-04-12
00:26
[a07e6022e2] part of check-in [e2c4995bf1] Performance optimization the Vdbe allocator. (check-in: [e2c4995bf1] user: drh branch: trunk, size: 206810)
00:16
[ac6d3e0cb7] part of check-in [aec94b6ee6] Avoid unnecessary calls to object destructors for a small performance gain. (check-in: [aec94b6ee6] user: drh branch: trunk, size: 206744)
2016-04-05
20:59
[d9b8628acb] part of check-in [fb555c3c2a] Carry table column types through into VIEW definitions, where possible. (check-in: [fb555c3c2a] user: drh branch: trunk, size: 206721)
2016-03-22
20:05
[7849cee0a0] part of check-in [605eba4a75] The sqlite3_column_decltype() routine should return NULL, not an empty string, if the column has no declared type. (check-in: [605eba4a75] user: drh branch: trunk, size: 206374)
2016-03-17
18:41
[41467e0c63] part of check-in [41335d8800] An alternative method of encoding the wildcard in "SELECT *". This is an experiment. (check-in: [41335d8800] user: drh branch: select-wildcard, size: 206195)
2016-03-15
17:52
[6dd2097bb1] part of check-in [c7bae50bdc] Implement FROM-clause subqueries as co-routines whenever they are guaranteed to be the outer-most loop of the join. (check-in: [c7bae50bdc] user: drh branch: trunk, size: 206360)
2016-02-29
15:53
[137b31daa8] part of check-in [842b211627] Reduce the amount of heap required to store many schemas by storing each column datatype appended to the column name, rather than as a separate allocation. (check-in: [842b211627] user: drh branch: schema-storage, size: 205572)
2016-02-26
04:13
[1bacfde7b7] part of check-in [3ef6a31532] Ephemeral tables used to hold manifested views may not be unordered since they might be subject to an ordered comparison if they are part of a join. (check-in: [3ef6a31532] user: drh branch: trunk, size: 205645)
2016-02-25
16:04
[dbc73a63be] part of check-in [d491745cab] Take the LIMIT clause into account when estimating the cost of sorting. (check-in: [d491745cab] user: drh branch: planner-improvements, size: 205690)
2016-02-13
23:43
[1a7e23a3bb] part of check-in [6a9c4a3ebf] Enhance ability to debug out-of-memory errors. (check-in: [6a9c4a3ebf] user: mistachkin branch: noMemBkpt, size: 205307)
2016-02-09
02:12
[ff80004a9a] part of check-in [ca72be8618] Make sure every co-routines has its own set of temporary registers and does not share temporaries, since a co-routine might expect the content of a temporary register to be preserved across an OP_Yield. Proposed fix for ticket [d06a25c84454a]. (check-in: [ca72be8618] user: drh branch: trunk, size: 205287)
2016-02-05
13:38
[57646a44ba] part of check-in [0a802e96ab] Add the slightly faster sqlite3DbMallocRawNN(db,n) routine for the majority cases where db is guaranteed to be not NULL. (check-in: [0a802e96ab] user: drh branch: oom-handling, size: 205320)
01:55
[07178f2ae1] part of check-in [c3ef03478a] Improvements to the way that OOM errors are processed. (check-in: [c3ef03478a] user: drh branch: oom-handling, size: 205316)
2016-02-04
02:34
[5ae632f5f2] part of check-in [1c8d300189] Add and use the sqlite3VdbeZeroRegister() interface for coding the common operation of writing zero into a register. (check-in: [1c8d300189] user: drh branch: zero-register, size: 205244)
2016-01-30
00:45
[ea6f3b0c27] part of check-in [6c520d5726] Change the P4_INTARRAY so that always begins with a length integer. Print the content of the INTARRAY on EXPLAIN output. (check-in: [6c520d5726] user: drh branch: covering-or, size: 205280)
2016-01-25
15:57
[c34292c8ce] part of check-in [7ac017a498] Replace the OP_SetIfNotPos operator with OP_OffsetLimit in the VDBE, for simpler and smaller code. (check-in: [7ac017a498] user: drh branch: trunk, size: 205245)
2016-01-22
17:48
[1db9a902e8] part of check-in [7323175337] Add the sqlite3TokenInit() utility function. (check-in: [7323175337] user: drh branch: trunk, size: 205485)
2016-01-18
13:18
[718954db86] part of check-in [9e8c23acf7] Avoid unnecessary calls to memset() for a small performance improvement. (check-in: [9e8c23acf7] user: drh branch: trunk, size: 205521)
2016-01-13
17:59
[47cd4189c4] part of check-in [8b4f508062] When the block sorting optimization is used in a scalar subquery, be sure to exit the loop as soon as the first valid output row is received. Fix for ticket [cb3aa0641d9a4]. (check-in: [8b4f508062] user: drh branch: branch-3.10, size: 205355)
17:50
[5b0f2aa9f7] part of check-in [cdbb0947f9] When the block sorting optimization is used in a scalar subquery, be sure to exit the loop as soon as the first valid output row is received. Fix for ticket [cb3aa0641d9a4]. (check-in: [cdbb0947f9] user: drh branch: trunk, size: 205497)
2016-01-12
02:00
[372234e355] part of check-in [fc62851667] Fix an uninitialized field in the Select object when SELECTTRACE is enabled. (check-in: [fc62851667] user: drh branch: trunk, size: 205204)
2016-01-08
12:46
[d84c091185] part of check-in [cede2bf8e4] Reduce the number of calls to memset() in sqlite3DbMallocZero(). (check-in: [cede2bf8e4] user: drh branch: trunk, size: 205148)
2015-12-03
21:47
[f8fded11fc] part of check-in [e6521a436d] Improved OOM recovery in the SELECT code generator logic. (check-in: [e6521a436d] user: drh branch: trunk, size: 205062)
2015-12-02
19:46
[1611828a71] part of check-in [4f2bcff94c] Remove unreachable branches from the decltype computation logic in the query planner. (check-in: [4f2bcff94c] user: drh branch: trunk, size: 205059)
18:59
[dd04f017d1] part of check-in [3e1d71fcaf] Have the sqlite3_column_decltype() API report the declared types for the left-most SELECT statement in a compound SELECT. (check-in: [3e1d71fcaf] user: dan branch: trunk, size: 205050)
2015-11-21
19:43
[e10586c750] part of check-in [60de5f2342] Fix an obscure memory leak found by libfuzzer that may occur under some circumstances if expanding a "*" expression causes a SELECT to return more than 32767 columns. (check-in: [60de5f2342] user: dan branch: trunk, size: 205017)
13:24
[0495e86f83] part of check-in [ff5716b89f] Do not allow table-valued function syntax on ordinary tables and views as those objects are not table-valued functions. Fix for ticket [73eba7ba5c7c0fc]. Problem found by libFuzzer. (check-in: [ff5716b89f] user: drh branch: trunk, size: 204966)
2015-11-19
17:55
[2376d32090] part of check-in [28df5dc4a9] When manifesting a view as part of an DELETE or UPDATE, be sure to include the hidden columns in the manifestation. (check-in: [28df5dc4a9] user: drh branch: trunk, size: 204498)
16:46
[3492a2794b] part of check-in [59bd0ec7d4] Fix problems with INSERT INTO ... SELECT ... statements that write to tables with __hidden__ columns. (check-in: [59bd0ec7d4] user: dan branch: trunk, size: 204375)
16:33
[e8eccb5b44] part of check-in [201ac6d449] Create the new TK_ASTERISK token to represent the "*" in "SELECT *". Formerly that operator was TK_ALL, which was also used for UNION ALL. Less confusion if they operator symbols are distinct. (check-in: [201ac6d449] user: drh branch: trunk, size: 204372)
13:53
[ac980e5b70] part of check-in [5490646b2e] Only support the magic "__hidden__" column name prefix interpretation when compiled with SQLITE_ENABLE_HIDDEN_COLUMNS. (check-in: [5490646b2e] user: drh branch: hidden-columns-in-tables, size: 204313)
2015-11-18
20:57
[7996cf4b57] part of check-in [3071ba2bdb] Honor the "__hidden__" prefix on the columns of views. (check-in: [3071ba2bdb] user: drh branch: hidden-columns-in-tables, size: 204573)
18:43
[2fa981f5bc] part of check-in [2dbffb3a3b] If a table column name begins with "__hidden__" then do not include that column in "*" expansions in SELECT statements, nor fill in that column in an INSERT INTO that omits the column list. This branch is a proof-of-concept only and is not intended to ever be merged into trunk. (check-in: [2dbffb3a3b] user: drh branch: hidden-columns-in-tables, size: 204447)
2015-11-15
11:13
[4c58ae319d] part of check-in [791761ebac] Fix the column name uniquifier so that it works with zero-length column names. (check-in: [791761ebac] user: drh branch: trunk, size: 204369)
2015-11-14
22:04
[1854c85ba1] part of check-in [9272426057] Code simplification in sqlite3ColumnsFromExprList(). Update the %z format code so that it works with buffers obtained from sqlite3DbMalloc(). Add a testcase for the slow column name uniquifier. (check-in: [9272426057] user: drh branch: trunk, size: 204336)
20:52
[d5878c33d9] part of check-in [5b08f29f45] Use a hash table to improve the preformance of column name uniqueness checking. (check-in: [5b08f29f45] user: drh branch: trunk, size: 204524)
16:47
[7ef4a94689] part of check-in [6266712968] Use randomness to prevent slowness in the generated-column-name uniqueness checking. (check-in: [6266712968] user: drh branch: trunk, size: 204479)
2015-11-07
17:48
[00a2a10d42] part of check-in [028475cb17] Proposed fix for an infinite loop bug in the WITH clause semantic analysis logic. (check-in: [028475cb17] user: drh branch: infinite-with-loop-bug, size: 204420)
15:19
[f5b0518eeb] part of check-in [2040d88e87] Enhance TreeView to show WITH clauses. Add an assert to detect the infinite loop behavior when certain kinds of errors occur on a nested WITH clause. (check-in: [2040d88e87] user: drh branch: infinite-with-loop-bug, size: 204351)
2015-10-16
20:53
[167b4e9058] part of check-in [26fa091d68] Merge recent enhancements from trunk. Version now 3.9.1. (check-in: [26fa091d68] user: drh branch: cursor-hints, size: 204315)
2015-10-15
20:17
[a4478981ce] part of check-in [39ae92f5c6] Experiments with an OP_Unpack opcode that extracts multiple columns from a record without caching. (check-in: [39ae92f5c6] user: drh branch: unpack-opcode, size: 204366)
19:21
[dbf1fb8231] part of check-in [871e091df6] Enhance the use of the column cache for UPDATE statements, making them more efficient for the case where a column is modified to be an expression of other unmodified columns. (check-in: [871e091df6] user: drh branch: trunk, size: 204301)
2015-10-14
20:09
[3e4a4691e1] part of check-in [2944414934] Merge in all the 3.9.0 updates from trunk. (check-in: [2944414934] user: drh branch: cursor-hints, size: 204433)
2015-10-11
20:39
[0bc9cd2e1c] part of check-in [9ab9c8c6d7] Detect and report circularly defined views even if the views have the columns defined in the CREATE VIEW statement. (check-in: [9ab9c8c6d7] user: drh branch: trunk, size: 204419)
20:08
[f70b36caa6] part of check-in [46ee3453a3] Remove an unreachable branch in the query flattener substitution logic. (check-in: [46ee3453a3] user: drh branch: trunk, size: 204322)
19:46
[0e0899675f] part of check-in [3d0bd95e97] Improved substitution logic in the query flattener. Saves code space, and (more importantly) works correctly with table-valued functions. (check-in: [3d0bd95e97] user: drh branch: trunk, size: 204333)
2015-10-10
14:41
[36c05502d5] part of check-in [9ddef84d43] Compiler warning fixes: Rename some local variables from "j1" to avoid a name collision with the j1() bessel function in the math library. Omit a dummy initializer that gcc 4.6.3 does not like. (check-in: [9ddef84d43] user: drh branch: trunk, size: 204652)
2015-10-06
21:07
[2c4bfdf7c7] part of check-in [041df7c2f1] Simplifications to the VDBE bytecode that handles LIMIT and OFFSET. (check-in: [041df7c2f1] user: drh branch: trunk, size: 204607)
17:27
[8fb8cb0230] part of check-in [4b63136435] Fix the LIMIT and OFFSET handling for UNION ALL queries that contain a subquery with ORDER BY on the right-hand side. Fix for ticket [b65cb2c8d91f668584]. (check-in: [4b63136435] user: drh branch: trunk, size: 205140)
2015-09-29
15:50
[e49f4af974] part of check-in [0e317dda5d] Remove dead code, replacing with assert() statements that make sure the code really was dead. (check-in: [0e317dda5d] user: drh branch: vtab-onepass, size: 204638)
2015-09-25
13:42
[33230303f5] part of check-in [6e4ac0be2d] Report an error if the number of named columns in a VIEW is different from the number of result columns in the SELECT statement that implements the VIEW. (check-in: [6e4ac0be2d] user: drh branch: trunk, size: 204867)
2015-09-24
15:06
[514646c18e] part of check-in [fbe637620f] Merge trunk changes into the cursor-hints branch. (check-in: [fbe637620f] user: drh branch: cursor-hints, size: 204517)
2015-09-19
20:27
[36ee14d729] part of check-in [97cfe346e1] Do not allow table-valued function syntax to be used on a view. (check-in: [97cfe346e1] user: drh branch: trunk, size: 204503)
2015-09-03
14:39
[bb99c37242] part of check-in [25ee3000e9] Merge enhancements from trunk. (check-in: [25ee3000e9] user: drh branch: cursor-hints, size: 204416)
13:46
[c17613385b] part of check-in [847387ec8e] Add the sqlite3VdbeLoadString() and sqlite3VdbeMultiLoad() routines to help with code generation, especially on PRAGMAs. Rename sqlite3VdbeAddGoto() to just sqlite3VdbeGoto(). (check-in: [847387ec8e] user: drh branch: trunk, size: 204402)
2015-09-02
18:40
[da24e8406f] part of check-in [0a5b00e493] Add and use the sqlite3VdbeChangeOpcode() routine. Simplify the implementation of the other sqlite3VdbeChange*() routines. (check-in: [0a5b00e493] user: drh branch: trunk, size: 204435)
18:19
[0d736c7ee5] part of check-in [be78f413df] Add the sqlite3VdbeAddGoto(v,i) routine as a shorthand for sqlite3VdbeAddOp2(v,OP_Goto,0,i). (check-in: [be78f413df] user: drh branch: trunk, size: 204437)
2015-09-01
18:31
[3f588e0502] part of check-in [29570a6048] Merge enhancements from trunk. (check-in: [29570a6048] user: drh branch: cursor-hints, size: 204572)
2015-08-26
14:01
[b52c80f2b1] part of check-in [c2f3bbad77] Evaluate expressions only once when the same expression is used in both the result set and in the ORDER BY clause. (check-in: [c2f3bbad77] user: drh branch: trunk, size: 204558)
11:40
[50b0f02ec4] part of check-in [58ba73630e] Refactor With.a.zErr into With.a.zCteErr. No logic changes. (check-in: [58ba73630e] user: drh branch: trunk, size: 204310)
2015-08-24
17:42
[da6d1e7a4f] part of check-in [d794b34da6] Enhance the CREATE VIEW syntax so that the names of columns of the view can be specified after the view name. (check-in: [d794b34da6] user: drh branch: trunk, size: 204286)
2015-08-22
01:32
[24323faace] part of check-in [351bc22fa9] Do not apply the WHERE-clause pushdown optimization to terms that originate in the ON or USING clause of a LEFT JOIN. Fix for ticket [c2a19d81652f40568c]. (check-in: [351bc22fa9] user: drh branch: trunk, size: 204291)
2015-08-20
23:45
[4f276673f8] part of check-in [b9927c876c] Merge recent enhancements from trunk, including table-valued expressions. (check-in: [b9927c876c] user: drh branch: cursor-hints, size: 204129)
2015-08-19
15:20
[c46de38c1b] part of check-in [b919376147] Minor refactor of the SrcList object so that it is able to hold the argument list to a table-valued-function in the FROM clause. (check-in: [b919376147] user: drh branch: table-valued-functions, size: 204115)
2015-08-13
20:07
[00acffc2e8] part of check-in [82a7a61bc0] Merge in all the trunk changes from the previous year. This breaks the cursor-hint mechanism, but provides a baseline for trouble-shooting. (check-in: [82a7a61bc0] user: drh branch: cursor-hints, size: 204075)
2015-07-16
17:29
[57ef3d98c4] part of check-in [9c39d46445] Fix compilation issues with SQLITE_OMIT_COMPOUND_SELECT defined. (check-in: [9c39d46445] user: mistachkin branch: trunk, size: 204061)
2015-07-05
22:15
[d3c04f0154] part of check-in [6d2999afbc] Do not allow recursive CTEs that use aggregate queries in the recursive part. (check-in: [6d2999afbc] user: drh branch: trunk, size: 204138)
2015-07-02
16:52
[7003fe663b] part of check-in [bcc8a75509] Fix harmless compiler warnings and one macro VVA_ONLY macro usage issue. (check-in: [bcc8a75509] user: mistachkin branch: trunk, size: 204007)
2015-06-26
18:16
[009c6138be] part of check-in [2abc44eb3b] Cache the sqlite3_context structure in the P4 operand of VDBE programs for faster SQL function dispatch. (check-in: [2abc44eb3b] user: drh branch: trunk, size: 204007)
2015-06-23
23:31
[9baeda79f9] part of check-in [c8d1f305b6] Mark some branches as unreachable after the recent change that recognizes mismatch result set sizes on compound SELECT statements sooner. (check-in: [c8d1f305b6] user: drh branch: trunk, size: 204006)
12:19
[09865f8999] part of check-in [4df852ce26] Test that the left and right sides of a compound SELECT operator have the same number of expressions in the expanded expression list before beginning to generate code. (check-in: [4df852ce26] user: dan branch: trunk, size: 203815)
2015-06-18
14:32
[15a17aff39] part of check-in [ed96e14adc] Pervent the likelihood() function from moving ON clause terms of a LEFT JOIN into the WHERE clause. Fix for ticket [5f60b11fc8e23490e2] (check-in: [ed96e14adc] user: drh branch: trunk, size: 203955)
2015-06-10
17:20
[ecd8562e68] part of check-in [a1eaf1718e] Resolve FROM-clause subqueries after query planning instead of before. Greatly reduce the estimated cost of automatic indexes for VIEWs and ephemeral tables since performance problems there cannot be mitigated via a CREATE INDEX. (check-in: [a1eaf1718e] user: drh branch: view-optimization, size: 204383)
2015-06-08
22:59
[8fd2ea1047] part of check-in [cabf218716] Code refactoring to try to shift FROM-clause subquery manifesting until after the query planner runs. Except this does not currently work because the query planner needs an estimated of the number of rows in the manifested table. Work in progress. (check-in: [cabf218716] user: drh branch: view-optimization, size: 204327)
15:08
[45a814a755] part of check-in [c32ce54ca4] Factor out the TreeView parse tree printing module into a separate file. (check-in: [c32ce54ca4] user: drh branch: view-optimization, size: 203789)
2015-06-06
18:30
[d507fe715b] part of check-in [4f20ac90bc] Code simplifications in select.c and where.c. (check-in: [4f20ac90bc] user: drh branch: view-optimization, size: 206711)
00:18
[630623e653] part of check-in [f4c90d06bb] Minor cleanup of the sqlite3Select() procedure. (check-in: [f4c90d06bb] user: drh branch: view-optimization, size: 206759)
2015-06-05
22:33
[6a8f2c442d] part of check-in [be8e3fc70e] Split FROM-clause subquery flattening and code generation into separate loops. (check-in: [be8e3fc70e] user: drh branch: view-optimization, size: 206361)
20:27
[b2dfbc9ca9] part of check-in [283bf0b64d] Provide one final Select tree dump prior to WHERE clause analysis when ".selecttrace 0x400" tracing bit is set with SELECTTRACE_ENABLED. Analysis and debug changes only - normal builds are unaffected. (check-in: [283bf0b64d] user: drh branch: trunk, size: 206132)
2015-06-04
12:08
[36416c13e4] part of check-in [6a9cf06337] Change the name of SrcList.a[].zIndex to the more descriptive SrcList.a[0].zIndexedBy. (check-in: [6a9cf06337] user: drh branch: trunk, size: 205933)
2015-06-02
18:09
[498342ba48] part of check-in [6df18e949d] For FROM-clause subqueries that cannot be flattened, try to push relevant WHERE clause terms of the outer query down into the subquery in order to help the subquery run faster and/or use less memory. Call this the "WHERE-clause push-down optimization". Do not confuse this with the completely different MySQL push-down optimization. (check-in: [6df18e949d] user: drh branch: trunk, size: 205913)
15:32
[7bb5c63341] part of check-in [bce3f04186] Rename SQLITE_AFF_NONE to SQLITE_AFF_BLOB. (check-in: [bce3f04186] user: drh branch: blob-affinity-rename, size: 203176)
2015-06-01
20:28
[7acdb105dc] part of check-in [297fae7551] For FROM-clause subqueries that cannot be flattened, try to push WHERE clause terms of the outer query down into the subquery in order to help the subquery run faster and/or use less memory. (check-in: [297fae7551] user: drh branch: subquery-opt, size: 205913)
17:32
[38853592c5] part of check-in [e3fa8b936b] Break out the query flattener into a separate source-code file. (check-in: [e3fa8b936b] user: drh branch: flattener-in-new-file, size: 177718)
2015-05-29
01:35
[5978cc521c] part of check-in [a29e117d7e] Using "SELECT ALL" instead of just "SELECT" on a query that uses a single unflattenable subquery or view in its FROM clause will force the subquery to be manifested into a temporary table rather than run incrementally using a co-routine. This is a stop-gap means of controlling the decision to manifest while we try to work out a better to make that decision automatically. (check-in: [a29e117d7e] user: drh branch: trunk, size: 203176)
2015-05-27
13:06
[4dcc453727] part of check-in [0055df0445] CTEs have never had working rowids. So disallow the use of the "rowid" column within CTEs. (check-in: [0055df0445] user: drh branch: no-rowid-in-cte, size: 203136)
2015-05-25
09:33
[9d9f6975bb] part of check-in [8c3929bd42] Remove an incorrect and pointless assert(). (check-in: [8c3929bd42] user: drh branch: trunk, size: 203116)
2015-05-22
17:29
[6adad8d698] part of check-in [b9727e6bbf] The SRT_Table type for the SelectDest object is now just an SRT_EphemTab for which the ephemeral table has already been allocated. (check-in: [b9727e6bbf] user: drh branch: trunk, size: 203457)
2015-05-20
20:27
[5b44995dad] part of check-in [3cd2b77221] Fix an obscure problem with "INSERT INTO tbl(cols) SELECT" statements where the SELECT is a compound with an ORDER BY and "cols" is a strict subset of tbl's columns. Cherrypick of [718d5d0eab04]. (check-in: [3cd2b77221] user: dan branch: branch-3.8.6, size: 196616)
2015-05-19
23:56
[95e728e1bd] part of check-in [45d3893c61] Enhance the selecttrace display by showing Select.selFlags. (check-in: [45d3893c61] user: drh branch: trunk, size: 203806)
2015-05-18
04:24
[6d9d6ae899] part of check-in [9c0d80907b] Make a hard copy of the results of a subquery lest the result of the subquery be referenced after a change to the table that generated the subquery result. (check-in: [9c0d80907b] user: drh branch: trunk, size: 203779)
2015-05-04
16:09
[1b0bfc7d59] part of check-in [1421c8ffba] Fix a faulty assert() in the SELECT code generator and add a test case to prevent regression. (check-in: [1421c8ffba] user: drh branch: trunk, size: 203685)
2015-05-02
11:45
[5e83049a0b] part of check-in [7952c32268] Cleanup of the sqlite3StrAccumInit() function. No functionality changes. (check-in: [7952c32268] user: drh branch: trunk, size: 203667)
2015-04-21
17:17
[35433ea889] part of check-in [623ddbdbf4] Alternative fix for the double-initialization of type and collating sequence problem that leaves the estimated table size intact. (check-in: [623ddbdbf4] user: drh branch: trunk, size: 203687)
17:07
[01c386a3fd] part of check-in [9e6beda2c8] Make sure the datatype and collating sequence of transients tables are not initialized more than once. Otherwise a memory leak results. (check-in: [9e6beda2c8] user: drh branch: trunk, size: 203693)
16:09
[3b64da1c11] part of check-in [b623ebd859] Fix a memory leak in the SELECT code generator tracing logic (code that is omitted in non-debugging builds). (check-in: [b623ebd859] user: drh branch: trunk, size: 203635)
15:49
[b14a9e1ee0] part of check-in [718d5d0eab] Fix an obscure problem with "INSERT INTO tbl(cols) SELECT" statements where the SELECT is a compound with an ORDER BY and "cols" is a strict subset of tbl's columns. (check-in: [718d5d0eab] user: dan branch: trunk, size: 203612)
15:16
[d87c64b394] part of check-in [d1e6bc918b] Change an assert() in the aggregate query code generator into a testcase(). (check-in: [d1e6bc918b] user: drh branch: trunk, size: 203614)
2015-04-20
01:25
[217d181aaf] part of check-in [74b7bf1744] Merge all recent trunk enhancements and fixes into the apple-osx branch. (check-in: [74b7bf1744] user: drh branch: apple-osx, size: 203665)
2015-04-17
16:12
[361dfc3224] part of check-in [ad67a67c03] Remove an ALWAYS() that turns out to be false when there is a semantic error on a compound SELECT. (check-in: [ad67a67c03] user: drh branch: trunk, size: 203541)
15:16
[e7d3f26dd2] part of check-in [620d19c3b4] Fix a faulty assert() in sqlite3SelectNew(). (check-in: [620d19c3b4] user: drh branch: trunk, size: 203549)
2015-04-16
16:22
[d66970749a] part of check-in [10715b05f2] Fix a faulty assert() in the compound-SELECT code generator. (check-in: [10715b05f2] user: drh branch: trunk, size: 203587)
14:33
[b7b91db829] part of check-in [9d336be1b1] Fix a faulty assert() in the compound select code generator. (check-in: [9d336be1b1] user: drh branch: trunk, size: 203541)
14:13
[e24bd1a7b6] part of check-in [ec5a493ad2] Improvements to the way VALUES clauses are parsed. (check-in: [ec5a493ad2] user: drh branch: trunk, size: 203405)
07:19
[fdac71edb7] part of check-in [b51028ed2f] Ensure the sqlite3Select() routine always returns non-zero if an error has occurred. (check-in: [b51028ed2f] user: dan branch: trunk, size: 203427)
2015-04-15
13:51
[ee49a7bf39] part of check-in [bfc7142ad2] Merge recent trunk fixes and enhancements into the apple-osx branch. (check-in: [bfc7142ad2] user: drh branch: apple-osx, size: 203512)
07:10
[93260bc9e7] part of check-in [14784c317b] Change the multiSelectOrderBy() routine to return non-zero if there has been any prior error. (check-in: [14784c317b] user: drh branch: trunk, size: 203388)
2015-04-13
23:11
[8859ea21c0] part of check-in [e709d3b4e7] Merge all recent trunk enhances into the apple-osx branch. (check-in: [e709d3b4e7] user: drh branch: apple-osx, size: 203506)
2015-04-12
17:35
[117e0f9ac9] part of check-in [9a453f52a2] Fix a problem with a stale Select.pWith pointer when a CTE is used together with a compound query and an ORDER BY clause. (check-in: [9a453f52a2] user: drh branch: trunk, size: 203382)
2015-04-08
12:47
[7d05c857d1] part of check-in [301218704c] Merge in all version 3.8.9 changes from trunk. (check-in: [301218704c] user: drh branch: apple-osx, size: 203490)
2015-04-04
16:43
[c28c52e353] part of check-in [427b50fba7] Fix a problem with resolving ORDER BY clauses that feature COLLATE clauses attached to compound SELECT statements. (check-in: [427b50fba7] user: dan branch: compound-order-by-fix, size: 203366)
2015-03-21
17:00
[ca8b52422e] part of check-in [9f1f8b331e] Merge all recent trunk enhancements and especially the blocking WAL-lock fix into the apple-osx branch. (check-in: [9f1f8b331e] user: drh branch: apple-osx, size: 203414)
03:18
[72ffb62e28] part of check-in [b11d1793a0] Correctly detect the error of having a "*" wildcard on a SELECT without a FROM clause on the left-hand side of a recursive CTE. (check-in: [b11d1793a0] user: drh branch: trunk, size: 203290)
2015-03-09
13:18
[b85b02f47a] part of check-in [5e04eec88e] Merge recent trunk enhancements into the apple-osx branch. (check-in: [5e04eec88e] user: drh branch: apple-osx, size: 203404)
2015-03-07
00:57
[94e016b673] part of check-in [26cb5145bf] Refactor some jump opcodes in the VDBE. Add JumpZeroIncr and DecrJumpZero. Fix the LIKE optimization to work with DESC sort order. (check-in: [26cb5145bf] user: drh branch: like-opt-fix, size: 203280)
2015-02-13
12:13
[66c2fce5d5] part of check-in [b2449d6776] Merge all recent trunk fixes and enhancements into the apple-osx branch. (check-in: [b2449d6776] user: drh branch: apple-osx, size: 203527)
2015-02-09
16:09
[e46cef4c22] part of check-in [c053448a55] Propagate the COLLATE operator upward through function calls. Initial fix for ticket [ca0d20b6cdddec5e8]. (check-in: [c053448a55] user: drh branch: tkt-2f7170d7, size: 203403)
15:21
[15490b9da2] part of check-in [0b7d65e3fd] Disable the query flattener for aggregate subqueries if the parent query 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]. (check-in: [0b7d65e3fd] user: drh branch: tkt-2f7170d7, size: 203407)
13:42
[edcf8ba816] part of check-in [aa093fef2d] In selecttrace 0x100 mode, show the parse tree after name resolution instead of before flattening, so that it is always seen even if flattening does not occur. Also: add the hex pointer value to the top of each SELECT tree. (check-in: [aa093fef2d] user: drh branch: trunk, size: 202874)
11:54
[6ea3518b88] part of check-in [b3c6b8a3c1] In selecttrace mode 0x100, show a complete parse-tree both before and after query flattening. This is a change to debugging code only. (check-in: [b3c6b8a3c1] user: drh branch: trunk, size: 202848)
2015-02-06
16:03
[30da05ba96] part of check-in [44711921fe] Merge all recent trunk enhancements into the apple-osx branch. (check-in: [44711921fe] user: drh branch: apple-osx, size: 202817)
2015-01-22
12:00
[1f20875230] part of check-in [9e6eae660a] Make sure errors in the FROM clause of a SELECT cause analysis to abort and unwind the stack before those errors have a chance to mischief in the "*" column-name wildcard expander. Fix for ticket [32b63d542433ca67]. (check-in: [9e6eae660a] user: drh branch: trunk, size: 202693)
2015-01-20
02:50
[a4e8fda24c] part of check-in [dc711db44e] Fix another instance of an incorrect value for KeyInfo.nXField on a sorting index. More changes for ticket [f97c4637102a3ae72b79]. (check-in: [dc711db44e] user: drh branch: branch-3.8.8, size: 202670)
2015-01-19
20:59
[bc02e8b084] part of check-in [c16bae5e69] Make sure that the KeyInfo.nXField value of ephermeral tables used for ORDER BY and GROUP BY is set correctly, so that the correct comparison function can be choosen by sqlite3VdbeFindCompare(). (check-in: [c16bae5e69] user: drh branch: tkt-f97c4637, size: 202582)
2015-01-08
19:55
[eb792a4eb8] part of check-in [cc7808427f] Merge the testing enhancements and the unlimited VALUES enhancement from trunk. (check-in: [cc7808427f] user: drh branch: apple-osx, size: 202679)
2015-01-05
20:04
[e4c38c75e3] part of check-in [ee30fb3521] Avoid O(N*N) behavior with very long lists of VALUES. (check-in: [ee30fb3521] user: drh branch: many-VALUEs, size: 202555)
19:16
[4776e16d19] part of check-in [9ce9e43af3] Handle compound-select statements originating from VALUES clauses as a special case that does not use recursion. (check-in: [9ce9e43af3] user: drh branch: many-VALUEs, size: 202446)
15:48
[28cf616a87] part of check-in [fe677d13f0] Remove some needless recursion from compound SELECT processing. (check-in: [fe677d13f0] user: drh branch: trunk, size: 200690)
2014-12-04
23:42
[4f48f3b05e] part of check-in [463ad971d2] Import from trunk support for SQLITE_CHECKPOINT_TRUNCATE and fixes for a couple of obscure bugs. (check-in: [463ad971d2] user: drh branch: apple-osx, size: 200772)
21:54
[f377fb8a5c] part of check-in [0d3aef97eb] Make sure that a DISTINCT query with an ORDER BY works correctly even if it uses a descending index. Fix for ticket [c5ea805691bfc4204b1cb9e]. (check-in: [0d3aef97eb] user: drh branch: trunk, size: 200648)
2014-10-14
14:17
[00edeea621] part of check-in [880df7568a] Merge from trunk recent micro-optimizations and the fix for the DESC index GROUP BY ORDER BY bug. (check-in: [880df7568a] user: drh branch: apple-osx, size: 200783)
2014-10-13
13:00
[4281659517] part of check-in [20062f4942] Remove the OPFLAG_CLEARCACHE flag from OP_Column. In its place, change the P3 parameter of OP_SorterData to be the index of the pseudo-table cursor whose record header cache is to be cleared. This gives a small size reduction and performance increase. (check-in: [20062f4942] user: drh branch: trunk, size: 200659)
12:30
[506c2ff411] part of check-in [134e65c07f] Use OP_SorterColumns in aggregate queries. Remove OPFLAG_CLEARCACHE. (check-in: [134e65c07f] user: drh branch: OP_SorterColumns, size: 200304)
01:23
[d32a3d223c] part of check-in [b9c695e885] Add the OP_SorterColumns opcode - an experiment in using a special case opcode to decode the Sorter output rather than the generic OP_Column. This might be faster. And with further work, it could eventually eliminate the need for OP_OpenPseudo. (check-in: [b9c695e885] user: drh branch: OP_SorterColumns, size: 200314)
2014-10-01
01:46
[f0ee74ce94] part of check-in [2078454ac9] Merge the latest enhancements from trunk. (check-in: [2078454ac9] user: drh branch: apple-osx, size: 200982)
2014-09-30
19:04
[f11533162b] part of check-in [5ce05757aa] Improvements to the new syntax-tree output routines: Omit the "END SELECT" mark and instead terminate the graph at the last item. Increase the maximum tree depth to 100. (check-in: [5ce05757aa] user: drh branch: trunk, size: 200858)
13:46
[b5304314d9] part of check-in [92e0b4bd4d] Show tree diagrams of data structures in the debugging output when the 0x100 bit is set on sqlite3WhereTrace or sqlite3SelectTrace. (check-in: [92e0b4bd4d] user: drh branch: trunk, size: 200662)
12:33
[373da54c2b] part of check-in [4ff51325d6] Remove the SQLITE_ENABLE_TREE_EXPLAIN compile-time option. Add alternative debugging display routines: sqlite3TreeViewExpr(), sqlite3TreeViewExprList(), and sqlite3TreeViewSelect(). (check-in: [4ff51325d6] user: drh branch: trunk, size: 200430)
2014-09-29
18:47
[6e7d7a2773] part of check-in [5e5d6e8680] Add the OPFLAG_MULTICOLUMN flag to the OP_Column opcode. Rearrange OP_Column instructions to take advantage of the new flag for a small performance increase (check-in: [5e5d6e8680] user: drh branch: faster-OP_Column, size: 200481)
2014-09-21
23:08
[66f96be202] part of check-in [3967ebe83e] Merge in all recent changes from trunk. (check-in: [3967ebe83e] user: drh branch: apple-osx, size: 200598)
00:27
[a83ed8bc2a] part of check-in [c0b61f7092] Improved ".selecttrace" output. (check-in: [c0b61f7092] user: drh branch: select-trace, size: 200474)
2014-09-20
20:38
[3108c73dff] part of check-in [89398880bc] Candidate fix for [d11a6e908f]. (check-in: [89398880bc] user: dan branch: select-trace, size: 199688)
20:24
[a2aac0a26b] part of check-in [f1ba68f131] Fix the SELECTTRACE_ENABLE macro so that it doesn't cause problems for testfixture. Add new SELECTTRACE() calls. (check-in: [f1ba68f131] user: drh branch: select-trace, size: 198876)
18:18
[4e00e04299] part of check-in [cbe0cf9ddf] Enable SELECT query planning tracing when compiled with SQLITE_ENABLE_SELECTTRACE and either SQLITE_DEBUG or SQLITE_TEST. (check-in: [cbe0cf9ddf] user: drh branch: select-trace, size: 198760)
2014-09-15
14:46
[0cd6706fd5] part of check-in [0bdf1a086b] Do not flatten aggregate subqueries that contain min() or max() functions so that if the min()/max() are discarded by the outer query, they still function and cause non-aggregate expression to be evaluated on the minimal or maximal row. (check-in: [0bdf1a086b] user: drh branch: trunk, size: 198446)
11:14
[70312b18bf] part of check-in [4ff0eb96bc] Adjust comments to show that subquery flattening restriction (10) was removed from the code back in 2005. This is a comment change only. (check-in: [4ff0eb96bc] user: drh branch: trunk, size: 198037)
2014-09-12
17:41
[bd8ed75592] part of check-in [320556233e] Simplify the way the column cache is managed around OP_Move instructions. (check-in: [320556233e] user: drh branch: trunk, size: 197878)
2014-09-06
16:39
[b4457526ce] part of check-in [e62aab5e92] Fix typos in comments. No code changes. (check-in: [e62aab5e92] user: peter.d.reid branch: trunk, size: 197882)
2014-09-02
15:57
[fa6b6845b0] part of check-in [696dc935f7] Merge the latest trunk changes into the apple-osx branch. (check-in: [696dc935f7] user: drh branch: apple-osx, size: 198003)
2014-08-29
14:40
[89e569b263] part of check-in [35c44a3c73] Merge recent performance enhancements from trunk onto the threads branch. (check-in: [35c44a3c73] user: drh branch: threads, size: 197879)
12:29
[1c4667571f] part of check-in [462f42af52] Contains a fault. Was: Avoid an unnecessary OP_Move operation for expression subqueries. (check-in: [462f42af52] user: drh branch: mistake, size: 196596)
2014-08-14
14:02
[f8b0b6c43b] part of check-in [a608fd1d52] Merge the pre-3.8.6 changes into the threads branch. (check-in: [a608fd1d52] user: drh branch: threads, size: 197901)
13:39
[13588d2cb2] part of check-in [08058df3af] Merge the pre-3.8.6 changes from trunk into the apple-osx branch. (check-in: [08058df3af] user: drh branch: apple-osx, size: 196742)
2014-08-12
01:23
[ea48e89140] part of check-in [a179e41e40] Fix an assert() statement in the SELECT code generator that was incorrect following an OOM error. (check-in: [a179e41e40] user: drh branch: trunk, size: 196618)
2014-08-06
02:03
[c28f516528] part of check-in [a353a8515f] Merge all recent changes from trunk. (check-in: [a353a8515f] user: drh branch: threads, size: 197873)
01:51
[c26fd65228] part of check-in [b2e01080cc] Merge 3.8.6 beta changes in from trunk. (check-in: [b2e01080cc] user: drh branch: apple-osx, size: 196714)
2014-08-05
00:53
[1529c49075] part of check-in [01f60027ad] Improved VdbeCoverage() macros. A few minor simplifications to generated VDBE code. (check-in: [01f60027ad] user: drh branch: IN-operator-improvements, size: 196590)
2014-06-05
12:53
[a34db38f97] part of check-in [2dbdfa5170] Merge in the 3.8.5 release changes and the FTS integrity-check fix. (check-in: [2dbdfa5170] user: drh branch: apple-osx, size: 196757)
2014-06-03
14:42
[6762c62e11] part of check-in [6d81805298] Avoid closing a pseudo-table associated with sorting in a co-routine since that pseudo-table might be used again in an outer loop. (check-in: [6d81805298] user: drh branch: trunk, size: 196633)
2014-05-29
20:36
[2e621e9aa6] part of check-in [b9fad4490c] Merge trunk changes into the apple-osx branch. (check-in: [b9fad4490c] user: drh branch: apple-osx, size: 196862)
20:24
[2657f35be7] part of check-in [416cb09126] Merge changes from the trunk into the threads branch. (check-in: [416cb09126] user: drh branch: threads, size: 197916)
2014-05-27
18:18
[7df17ec550] part of check-in [d16e575dac] Change the name of the Index.autoIndex field to Index.idxType and provide symbolic names for the various values of that field rather than using magic numbers. (check-in: [d16e575dac] user: drh branch: trunk, size: 196738)
2014-05-26
20:15
[b6a17082e8] part of check-in [8215202759] Merge recent trunk changes into the threads branch. (check-in: [8215202759] user: drh branch: threads, size: 197910)
20:08
[bd4020ec25] part of check-in [54b5fa77e9] Merge recent trunk changes into the apple-osx branch. (check-in: [54b5fa77e9] user: drh branch: apple-osx, size: 196856)
2014-05-23
17:17
[a6e8fe35d2] part of check-in [9268df305b] Changes to the output of EXPLAIN QUERY PLAN to make it clearer when a query uses the PRIMARY KEY index of a WITHOUT ROWID table. (check-in: [9268df305b] user: dan branch: trunk, size: 196732)
2014-05-19
15:16
[4cf17c0960] part of check-in [17349a49d2] Changes to help ensure that a multiplication does not overflow when computing the number of bytes needed for a memory allocation, and cause a malfunction. No problems existing problems were discovered. However, these changes should help to ensure that no problems arise in the future. (check-in: [17349a49d2] user: drh branch: safer-malloc, size: 196674)
2014-05-08
23:01
[2270f57439] part of check-in [9411d7dc6f] Initial attempt to merge in all trunk changes over the previous 1.5 years. This check-in compiles but there are compiler warnings and "make test" segfaults after only running a few test modules. (check-in: [9411d7dc6f] user: drh branch: apple-osx, size: 196783)
2014-05-06
15:28
[109d659ed3] part of check-in [8ad0a123a2] Experimental changes that reduce the size of Expr objects from 72 to 64 bytes each on x64 and from 48 to 44 bytes each on x32. (check-in: [8ad0a123a2] user: drh branch: smaller-expr, size: 196965)
2014-05-02
13:09
[a5ed3fdc82] part of check-in [84862d3a09] Merge latest trunk enhancements and fixes into the orderby-planning branch. (check-in: [84862d3a09] user: drh branch: orderby-planning, size: 197837)
2014-05-01
20:26
[089c4d46f0] part of check-in [427409ae10] Fix an obscure problem to do with temp register allocation that could occur if more than one simple SELECT within a compound SELECT uses a partial sort. (check-in: [427409ae10] user: dan branch: trunk, size: 196659)
2014-04-25
15:01
[ed459f7f47] part of check-in [1bd74c49dd] Store values loaded from the stat1 table as logarithmic values in memory. (check-in: [1bd74c49dd] user: dan branch: experimental-costs, size: 196737)
2014-04-23
12:57
[1a22927881] part of check-in [e2c9f71a45] Merge all recent trunk changes into the threads branch. (check-in: [e2c9f71a45] user: drh branch: threads, size: 197849)
2014-04-21
13:21
[bc7feff0fb] part of check-in [de9a490f59] Avoid discarding an ORDER BY clause in the case where an identical GROUP BY clauses uses an index to group, but not sort, the rows. Fix for [b75a9ca6b0]. (check-in: [de9a490f59] user: dan branch: trunk, size: 196607)
2014-03-25
15:04
[20055cf917] part of check-in [c3ae369783] Remove the sequence values from sorter records used by ORDER BY as well. (check-in: [c3ae369783] user: dan branch: orderby-planning, size: 197019)
2014-03-24
20:19
[2b8722c988] part of check-in [3f90abddc3] Omit the sequence value from sorter records used by GROUP BY queries that cannot use an index. (check-in: [3f90abddc3] user: dan branch: orderby-planning, size: 196615)
18:08
[7f4a1ef9c9] part of check-in [4f472accf0] Avoid unnecessary moving of content between registers during an ORDER BY. (check-in: [4f472accf0] user: drh branch: orderby-planning, size: 196706)
09:34
[a088183774] part of check-in [5d506743f5] Remove an unnecessary temporary register allocation. (check-in: [5d506743f5] user: dan branch: orderby-planning, size: 196130)
02:20
[ece2324b55] part of check-in [e6c59d2331] Remove a pointless OP_Once operation in ORDER BY clauses with LIMIT. (check-in: [e6c59d2331] user: drh branch: orderby-planning, size: 196168)
01:43
[bf5446f892] part of check-in [e7188fad87] Further enhancements to generated VDBE code for ORDER BY. (check-in: [e7188fad87] user: drh branch: orderby-planning, size: 196243)
2014-03-23
18:47
[09fef04ec0] part of check-in [faf7f9caf5] merge fixes from trunk (check-in: [faf7f9caf5] user: drh branch: orderby-planning, size: 196211)
17:45
[b1e0ac15d8] part of check-in [d696cdedac] Use only a single OP_MakeRecord instead of two when constructing entries to go onto a sorter. (check-in: [d696cdedac] user: drh branch: orderby-planning, size: 195582)
2014-03-22
02:19
[269c3e31a4] part of check-in [9b2838f23e] Clear the sort-order flags on the KeyInfo object associated with the OP_Compare/OP_Jump of the block-sort logic, in order to make the OP_Jump fully testable. (check-in: [9b2838f23e] user: drh branch: trunk, size: 195777)
00:27
[89bfc2228c] part of check-in [c36f74611c] Fix the ORDER BY optimization logic so that it will do a block-sort on a partial DESC ORDER BY. This enhancement uncovered a memory leak in pushUntoSorter() which is also fixed. (check-in: [c36f74611c] user: drh branch: trunk, size: 195617)
2014-03-21
20:58
[633c56adeb] part of check-in [fa06a6fed9] Add the ability to use indices for the first few terms of an ORDER BY clause, then sort in batches to handle the later terms. (check-in: [fa06a6fed9] user: drh branch: trunk, size: 195574)
19:56
[cbee644f79] part of check-in [45d8cc678d] Change the names of SRT_DistTable and SRT_Table used by CTE to more meaningful SRT_DistFifo and SRT_Fifo, respectively. Simplify the IgnorableOrderby() macro in the process. (check-in: [45d8cc678d] user: drh branch: trunk, size: 192067)
19:27
[0f7542b85f] part of check-in [1f413aca00] Avoid leaking memory in an obscure case where the flattener adds an ORDER BY clause to the recursive part of a recursive query. (check-in: [1f413aca00] user: dan branch: trunk, size: 191976)
18:45
[596b8098be] part of check-in [71e9ae72c2] Merge the OFFSET-on-query-without-FROM fix from trunk. (check-in: [71e9ae72c2] user: drh branch: orderby-planning, size: 195148)
18:16
[bea5181682] part of check-in [179ef81648] Fix the OFFSET clause so that it works correctly on queries that lack a FROM clause. Ticket [07d6a0453d4ed8]. (check-in: [179ef81648] user: drh branch: trunk, size: 191641)
2014-03-19
23:24
[12534449e7] part of check-in [01afbf97c0] Fix query planner weights associated with choosing block-sorting. Fix block sorting of tables with collating functions. Fix various test cases. All "veryquick" tests are now passing, though more tests need to be added. (check-in: [01afbf97c0] user: drh branch: orderby-planning, size: 195136)
17:41
[f481ab847c] part of check-in [7ce2daafd3] Make it possible for block-sort to use the OP_SorterOpen sorter in addition to a generic OP_OpenEphemeral. (check-in: [7ce2daafd3] user: drh branch: orderby-planning, size: 195073)
16:56
[0c5df3eb62] part of check-in [62f3a22050] Fix a problem in the block-sort logic that can arise if the VDBE opcode array is resized while the block-sort logic is being coded. "make test" now runs to completion, though there are still 17 failures. (check-in: [62f3a22050] user: drh branch: orderby-planning, size: 195153)
15:17
[45d3ac1273] part of check-in [463d921b51] Avoid reusing temporary registers in co-routines when doing block-sorting. (check-in: [463d921b51] user: drh branch: orderby-planning, size: 195143)
14:10
[bd6ac5dc27] part of check-in [59742dd4c5] First attempt at getting block-sort to work. This is an incremental check-in. There are many problems still to be worked out. (check-in: [59742dd4c5] user: drh branch: orderby-planning, size: 195116)
2014-03-18
20:33
[41df0e4dd1] part of check-in [e258df236b] Make the partial-ORDER-BY information in the query planner available to the SELECT code generator. Still doesn't make a difference in the generated code. (check-in: [e258df236b] user: drh branch: orderby-planning, size: 191827)
2014-03-04
21:19
[0adf172d33] part of check-in [554501f158] Avoid indexing off the front end of an array when creating a view with two or more blank column names in the SELECT statement that defines the view. (check-in: [554501f158] user: drh branch: trunk, size: 191629)
2014-03-03
17:36
[780bbf39e4] part of check-in [c0fa0c0e2d] Change an OP_SCopy into an OP_Copy in a case where the destination might be used after the source has changed. (check-in: [c0fa0c0e2d] user: drh branch: trunk, size: 191621)
2014-02-26
21:35
[35b07a47fd] part of check-in [06c2db875e] More efficient removal of duplicates in recursive queries using the UNION compound operator. (check-in: [06c2db875e] user: drh branch: trunk, size: 191609)
19:05
[c959b4d9eb] part of check-in [3ad687b7aa] Only run the OP_OpenRead opcodes for a correlated subquery once, on the initial iteration. Keep the cursor open for subsequent runs. This was suppose to be a performance enhancement, but it is difficult to come up with a query where is makes a significant difference. Hence, the change is getting parked in a branch. (check-in: [3ad687b7aa] user: drh branch: open-only-once, size: 191690)
2014-02-25
19:38
[7c3aa7b5f1] part of check-in [cc5eda5422] Make sure temporary registers used within a co-routine are not also used outside of that co-routine, in order to prevent concurrent use of the same register for two different things. Ticket [8c63ff0eca81a9132d8] (check-in: [cc5eda5422] user: drh branch: tkt-8c63ff0eca, size: 191652)
2014-02-18
03:07
[28bff39f9b] part of check-in [b92d31a97d] Add VdbeCoverage() and VdbeCoverageIf() macros for improved VDBE coverage testing. (check-in: [b92d31a97d] user: drh branch: trunk, size: 191580)
2014-02-17
22:40
[618b53bd45] part of check-in [ce184c7bb1] Add logic to do test coverage measurements on the VDBE code. (check-in: [ce184c7bb1] user: drh branch: insert-optimization, size: 191563)
2014-02-16
01:55
[ebec4d3fad] part of check-in [aa2d8b0e81] Enhance the code generator for INSERT INTO ... SELECT so that the SELECT generates output directly in the registers that INSERT INTO will be using, in many cases, and OP_SCopy operations can thus be avoided. (check-in: [aa2d8b0e81] user: drh branch: insert-optimization, size: 190754)
2014-02-10
21:07
[50961f0d0a] part of check-in [9367632dd7] Fix a pointless conditional. Add a test case. (check-in: [9367632dd7] user: drh branch: trunk, size: 190349)
18:56
[6afe4c3f39] part of check-in [572d4be4db] Fix the compound-select-to-subquery converter so that it works with the new compound-select object linkage introduced as part of the fix for ticket [31a19d11b97088296]. (check-in: [572d4be4db] user: drh branch: trunk, size: 190339)
2014-02-09
18:02
[c055a9fa25] part of check-in [67bfd59d90] Use the WITH clause to help resolve names for SELECT statements on the left of a compound query. Proposed fix for ticket [31a19d11b97088296a]. (check-in: [67bfd59d90] user: drh branch: trunk, size: 190243)
2014-02-08
23:20
[de28cd6d49] part of check-in [1e64dd782a] Do away with the "multi-register pseudo-table" abstration. Instead, just use an OP_SCopy to load results directory from the result registers of the co-routine. (check-in: [1e64dd782a] user: drh branch: trunk, size: 190704)
13:12
[b854d23224] part of check-in [129217ee91] Tweaks to the generated VDBE code to make it a little easier to follow. (check-in: [129217ee91] user: drh branch: trunk, size: 190861)
04:24
[deb41db22f] part of check-in [a45b87713c] Enable constant expression factoring even if no tables are read and no transaction is started. (check-in: [a45b87713c] user: drh branch: trunk, size: 190725)
01:40
[0b6011a514] part of check-in [192dea9731] Change the OP_Trace opcode to OP_Init and give it the ability to jump to the initialization code at the bottom of the program, thus avoiding the need for an extra OP_Goto. (check-in: [192dea9731] user: drh branch: trunk, size: 190587)
2014-02-07
19:18
[47d93e6f0b] part of check-in [a522f364a6] Change the OP_InitCoroutine instruction to jump over the co-routine implementation. (check-in: [a522f364a6] user: drh branch: coroutine-refactor, size: 191261)
18:27
[01d0eca093] part of check-in [1ec0e9dd4b] Get rid of the OP_Undef and OP_IsUndef opcodes in favor of higher-level OP_InitCoroutine and OP_EndCoroutine. (check-in: [1ec0e9dd4b] user: drh branch: coroutine-refactor, size: 191370)
2014-02-06
14:59
[d1acf45637] part of check-in [881164cf6e] Change more OP_OpenEphemeral operations to OP_OpenHash. (check-in: [881164cf6e] user: drh branch: subquery-codegen-refactor, size: 192408)
2014-02-05
18:15
[18aea80612] part of check-in [2997e18157] Use a new opcode, OP_OpenHash, to indicate that ephemeral tables can be unordered, rather than using the BTREE_UNORDERED bit in the P5 field. (check-in: [2997e18157] user: drh branch: subquery-codegen-refactor, size: 192246)
2014-02-04
20:46
[b78f5e62c2] part of check-in [65d5dcddbd] Remove the SF_Materialize flag from the SELECT object as it does not accomplish anything useful. (check-in: [65d5dcddbd] user: drh branch: trunk, size: 192346)
2014-01-25
12:16
[a421f3fb7f] part of check-in [b30db0ac30] Fix a problem causing SQLITE_OMIT_COMPOUND_SELECT builds to fail. (check-in: [b30db0ac30] user: dan branch: trunk, size: 192378)
2014-01-24
20:37
[d88d739b7a] part of check-in [9554519c12] Select collation sequences for ORDER BY expressions attached to recursive CTEs in the same way as they are selected for other compound SELECT statements. (check-in: [9554519c12] user: dan branch: trunk, size: 192433)
2014-01-22
19:23
[93764e0d81] part of check-in [72c4b3f07a] Avoid an extra seek when inserting records into the epheremal index used to ensure that rows returned by UNION recursive queries are unique. (check-in: [72c4b3f07a] user: dan branch: trunk, size: 191780)
18:31
[a4ac380e9c] part of check-in [dea2ca6a15] Fix harmless compiler warnings. (check-in: [dea2ca6a15] user: drh branch: trunk, size: 191726)
18:07
[f6d84f3a10] part of check-in [1945484e6b] Add support for LIMIT and OFFSET in a recursive query. (check-in: [1945484e6b] user: drh branch: cte-via-queue, size: 191726)
17:28
[b5430b99c0] part of check-in [37b343b018] Get ORDER BY working for recursive queries. (check-in: [37b343b018] user: drh branch: cte-via-queue, size: 191342)
13:35
[11c02c82a6] part of check-in [3eb5f9f8d6] Add new SelectDest codes, SRT_Queue and SRT_DistQueue in anticipation of adding ORDER BY support on recursive queries. Factor out the recursive query code generator into a separate procedure. (check-in: [3eb5f9f8d6] user: drh branch: cte-via-queue, size: 189672)
00:23
[c2021c7591] part of check-in [5e6c4a55f6] Remove an unnecessary parameter from selectInnerLoop(). Clean up comments. (check-in: [5e6c4a55f6] user: drh branch: cte-via-queue, size: 186533)
2014-01-21
22:25
[f7b1558aae] part of check-in [b2671e1133] Change the recursive common table expression algorithm to use a queue instead of a pair of tables. Runs about 25% faster on the sudoku solver query. The OP_SwapCursors opcode is no longer required. The current implementation uses just a fifo, but the plan is to change it into a queue that will support ORDER BY and LIMIT in a recursive query. (check-in: [b2671e1133] user: drh branch: cte-via-queue, size: 188844)
00:19
[a2709e1b91] part of check-in [cc1cb32178] Add support for the LEVEL pseudo-column in the recursive part of a common table expression. LEVEL has the value of 1 on the first iteration and successively larger integer values of subsequent iterations. It cannot have a table qualifier. Actual columns named "level" can still be accessed by including the table name qualifier. (check-in: [cc1cb32178] user: drh branch: level-pseudocolumn, size: 188761)
2014-01-20
14:58
[a27ac21844] part of check-in [a06235e0f6] Remove an unused #define and add an assert(), both associated with WITH logic. (check-in: [a06235e0f6] user: drh branch: trunk, size: 188078)
2014-01-17
18:34
[170a9f9e2c] part of check-in [2031004d96] Minor simplification of error message text for a couple of errors associated with WITH clause processing. (check-in: [2031004d96] user: drh branch: trunk, size: 188048)
17:40
[a13cf4a450] part of check-in [a7323838bb] Resolve table names within CTEs in the context in which the CTE is declared, not the context in which it is used. (check-in: [a7323838bb] user: dan branch: trunk, size: 188063)
15:27
[b17dd5c3ef] part of check-in [c8eb11635a] Fix a compiler warning in selectPopWith(). (check-in: [c8eb11635a] user: drh branch: trunk, size: 187390)
15:15
[231079b8b0] part of check-in [0171e3bb4f] Add support for common table expressions (WITH clauses). (check-in: [0171e3bb4f] user: dan branch: trunk, size: 187413)
14:59
[c77955f931] part of check-in [6a549187ed] Fix some problems to do with WITH clauses and name resolution. (check-in: [6a549187ed] user: dan branch: common-table-expr, size: 187090)
11:48
[65c13f22ed] part of check-in [f68c6c4d36] Remove some code from resolve.c that was only required for recursive cte references in sub-queries. Also a stray "finish_test" command in pagerfault.test. (check-in: [f68c6c4d36] user: dan branch: common-table-expr, size: 187078)
2014-01-16
22:40
[fc7499ac90] part of check-in [9efc120a15] Add the ability for the authorizer callback to disallow recursive queries. (check-in: [9efc120a15] user: drh branch: common-table-expr, size: 187107)
21:59
[d75733ab2a] part of check-in [090a77d978] Tweaks to error message text. (check-in: [090a77d978] user: drh branch: common-table-expr, size: 187009)
21:02
[1b058f7ef3] part of check-in [54eee9fe99] Improve the error messages used to report illegal recursive cte references. (check-in: [54eee9fe99] user: dan branch: common-table-expr, size: 187041)
18:34
[2d2da29fd4] part of check-in [a296b73360] Allow only a single recursive reference in a recursive CTE. Also require that this reference is not part of a sub-query. (check-in: [a296b73360] user: dan branch: common-table-expr, size: 187485)
10:58
[29976d1698] part of check-in [6bfa387e82] Disable the flattening optimization if the parent query is the recursive part of a recursive CTE and the sub-query is a compound query. (check-in: [6bfa387e82] user: dan branch: common-table-expr, size: 187130)
04:37
[c9af659146] part of check-in [7f953b568b] Merge trunk changes. Fix a possible NULL-pointer deference in WITH clause name resolution. (check-in: [7f953b568b] user: drh branch: common-table-expr, size: 186701)
2014-01-15
20:10
[ab437f2524] part of check-in [c95823cd45] Remove an ALWAYS() that is no longer always true. (check-in: [c95823cd45] user: drh branch: common-table-expr, size: 186617)
19:42
[b55e726c8d] part of check-in [3908e2ea2e] Fixes so that SQLITE_OMIT_CTE builds work. (check-in: [3908e2ea2e] user: dan branch: common-table-expr, size: 186625)
18:35
[6bdb90db59] part of check-in [c948384dfd] Further comments on WITH-clause processing routines in select.c. (check-in: [c948384dfd] user: drh branch: common-table-expr, size: 184869)
18:23
[240e9795df] part of check-in [d9ae0f5d9f] Add a header comment to the searchWith() routine. (check-in: [d9ae0f5d9f] user: drh branch: common-table-expr, size: 184628)
18:12
[c6ba9c34f5] part of check-in [61be2da0ae] When resolving names, consider a reference to a recursive CTE column as equivalent to a reference to the outermost name-context. This ensures that correlated sub-queries are correctly identified as such. (check-in: [61be2da0ae] user: dan branch: common-table-expr, size: 184437)
15:27
[7d0d85f5d0] part of check-in [9a514b50e4] Return an error if a CTE specifies a different number of columns than its SELECT statement returns. (check-in: [9a514b50e4] user: dan branch: common-table-expr, size: 184354)
14:17
[51c74176eb] part of check-in [9472f6d820] Disable the flattening optimization if the sub-query is a recursive CTE. (check-in: [9472f6d820] user: dan branch: common-table-expr, size: 184092)
02:40
[3d93e3b473] part of check-in [a29330238b] Use the user-supplied table name in WITH RECURSIVE tables as the internal name of the table and the name of the table in VDBE comments. (check-in: [a29330238b] user: drh branch: common-table-expr, size: 183962)
2014-01-14
20:14
[0f7779b0c1] part of check-in [a5c2a54a07] Add code to handle recursive CTEs. (check-in: [a5c2a54a07] user: dan branch: common-table-expr, size: 183972)
2014-01-13
20:32
[996d8b8860] part of check-in [260587d272] For statements of just an unadorned VALUES clause, assign column names as "columnN" for increasing whole numbers N. (check-in: [260587d272] user: drh branch: trunk, size: 177507)
15:12
[9dc9177bfb] part of check-in [a26f399ba4] Add code to handle non-recursive CTEs in the same way as SQL views. (check-in: [a26f399ba4] user: dan branch: common-table-expr, size: 179331)
2013-12-20
13:11
[819bb090c9] part of check-in [2c7fd9b043] Simplify the accumulator reset for aggregate query processing so that it uses a single multi-register OP_Null rather than a separate OP_Null for each register. (check-in: [2c7fd9b043] user: drh branch: trunk, size: 177435)
2013-12-19
14:34
[9d13850293] part of check-in [ffa092e13b] Remove an unneeded column-cache flush in aggregate SELECT and an unreachable branch in the INSERT logic. (check-in: [ffa092e13b] user: drh branch: trunk, size: 176948)
2013-12-18
16:27
[ecb020aa28] part of check-in [97fdfc6b79] Remove an unnecessary column-cache flush. Add another test case to the speedtest1.c program to accentuate the benefit of not flushing the cache at that point. (check-in: [97fdfc6b79] user: drh branch: column-cache-debug, size: 176981)
15:11
[c1cd470c69] part of check-in [4c6a659c43] Show changes to the column cache when PRAGMA vdbe_addoptrace=ON is set. (check-in: [4c6a659c43] user: drh branch: column-cache-debug, size: 177016)
2013-12-07
23:35
[44fa5a4a27] part of check-in [bfefc57554] Do not allow cursor hints to use expressions containing subqueries. This change fixes the problem seen in the previous check-in. (check-in: [bfefc57554] user: drh branch: cursor-hints, size: 177034)
2013-11-21
16:08
[d41381d80a] part of check-in [50d350abbc] When one or more arguments to a function are constants, try to factor out just those arguments into initialization code. (check-in: [50d350abbc] user: drh branch: trunk, size: 177020)
2013-11-15
18:15
[253cb683e4] part of check-in [d10fb49a92] Changes to make the new constant expression factoring logic more general and more testable. (check-in: [d10fb49a92] user: drh branch: expr-codegen-enhancement, size: 176958)
2013-11-12
15:33
[7317406831] part of check-in [0f924c6ef6] A better (simpler) fix to the count(*) problem addressed in the previous check-in. (check-in: [0f924c6ef6] user: drh branch: trunk, size: 176913)
14:55
[98855336b4] part of check-in [9117477978] Make sure the count(*) optimization works correctly on WITHOUT ROWID tables. (check-in: [9117477978] user: drh branch: trunk, size: 176944)
2013-11-09
23:44
[a040df82c4] part of check-in [2c32bd6d4d] Fix memory type mismatch when compiled with MEMDEBUG. (check-in: [2c32bd6d4d] user: mistachkin branch: trunk, size: 176845)
2013-11-07
14:09
[60af46f5f6] part of check-in [55eea1782a] Make sure cached KeyInfo objects are only valid for a single database connection. Clear all cached KeyInfo objects on any collating sequence change. (check-in: [55eea1782a] user: drh branch: omit-rowid, size: 176841)
2013-11-06
19:59
[76477fe7f0] part of check-in [defd5205a7] Reference count the KeyInfo object. Cache a copy of an appropriate KeyInfo for each index in the Index object, and reuse that one copy as much as possible. (check-in: [defd5205a7] user: drh branch: omit-rowid, size: 176899)
2013-10-25
14:46
[8290456f2a] part of check-in [9eafafa31c] Basic DELETE operations now working on WITHOUT ROWID tables. (check-in: [9eafafa31c] user: drh branch: omit-rowid, size: 176287)
2013-10-23
13:30
[dbcd227147] part of check-in [b21d831b2a] Some inserts and queries working for multi-column primary keys and WITHOUT ROWID. (check-in: [b21d831b2a] user: drh branch: omit-rowid, size: 176328)
2013-10-08
20:01
[15127b54cc] part of check-in [3fd5e33217] Use #ifdefs to omit unused code in the columnType() routine depending on compile-time options. (check-in: [3fd5e33217] user: drh branch: row-size-est, size: 176210)
18:40
[9d111a1ade] part of check-in [18bd6ba96d] Further refinement of the idea of multiplying run-time cost estimates by the estimated row size. (check-in: [18bd6ba96d] user: drh branch: row-size-est, size: 175291)
2013-10-07
16:53
[19611e6da6] part of check-in [8e78557a40] Try to remember statistics from ANALYZE using LogEst instead of u64. (check-in: [8e78557a40] user: drh branch: log-stats, size: 175192)
2013-10-05
19:18
[13be733297] part of check-in [8b4aa0c7a2] Completely remove the iScanRatio field. The PRAGMA index_list(TABLE) command shows the estimated row size in the forth column. It also generates a row for the table with an index name of NULL. The query planner still does not take row size estimates into account - that is the next step. (check-in: [8b4aa0c7a2] user: drh branch: row-size-est, size: 175200)
2013-10-04
20:39
[6131008151] part of check-in [c6ac80ed8d] Merge trunk changes. (check-in: [c6ac80ed8d] user: drh branch: index-scan-rate, size: 175195)
18:29
[f64a972fc7] part of check-in [e5d9371da9] Further refinements of the index scanning speed logic. (check-in: [e5d9371da9] user: drh branch: index-scan-rate, size: 175115)
02:36
[340aa50982] part of check-in [6c352edbba] Progress toward using the iScanRatio information on indices. Many tests are still failing. (check-in: [6c352edbba] user: drh branch: index-scan-rate, size: 175078)
00:00
[2d71af95ee] part of check-in [9f2f4c0a50] Make sure the count(*) optimization works correctly even when partial indices are present. Ticket [a5c8ed66cae]. (check-in: [9f2f4c0a50] user: drh branch: trunk, size: 175589)
2013-09-12
23:42
[fc60e8e539] part of check-in [695aee46e9] Refactor the ExprSetIrreducible() macro into ExprSetVVAProperty(*,EP_NoReduce). This is a naming change only. The logic is the same. (check-in: [695aee46e9] user: drh branch: unlikely-func, size: 175451)
16:50
[d96bcdbc2e] part of check-in [579a512538] Increase the number of bits available in Expr.flags. Other tweaks aimed at making expression processing more robust. (check-in: [579a512538] user: drh branch: expr-tuning, size: 175425)
2013-09-06
13:10
[9239586282] part of check-in [97b10e66e9] Combine the FuncDef.iPrefEnc and FuncDef.flags fields into a single new FuncDef.funcFlags field. (check-in: [97b10e66e9] user: drh branch: trunk, size: 175431)
2013-08-05
22:05
[8b148eb851] part of check-in [c589b2fed7] Performance optimization: Avoid calling convertCompoundSelecctToSubquery() on queries that do not use the UNION, EXCEPT, or INTERSECT operators. (check-in: [c589b2fed7] user: drh branch: trunk, size: 175423)
19:11
[97273e41f5] part of check-in [7301bedd94] Factor all KeyInfo object allocations into a single function: sqlite3KeyInfoAlloc(). Always allocate enough space so that sqlite3VdbeRecordCompare() can avoid checking boundaries and hence run faster. (check-in: [7301bedd94] user: drh branch: trunk, size: 175386)
2013-08-01
13:04
[20369c82dc] part of check-in [8e07aa2ad5] Fill out an initial implementation of the sqlite3ExprImpliesExpr() function. (check-in: [8e07aa2ad5] user: drh branch: partial-indices, size: 175579)
2013-06-21
00:35
[91b62654ca] part of check-in [2c2577e69c] Modify the query planner interface so that it always passes in the result set. This is the first step toward adding an optimization that will omit tables from a join that do not contribute to the result. (check-in: [2c2577e69c] user: drh branch: omit-join-table-opt, size: 175571)
2013-06-17
18:20
[d5a1b9bc3f] part of check-in [eaf1f1b405] Simplifications to the NGQP. Add the queryplantest makefile target. Add testcase() macros in the NGQP. (check-in: [eaf1f1b405] user: drh branch: nextgen-query-plan-exp, size: 175497)
2013-06-15
15:11
[94a755b3d3] part of check-in [3e8ac46918] Fix compiler warnings. (check-in: [3e8ac46918] user: drh branch: nextgen-query-plan-exp, size: 175451)
2013-06-11
02:32
[588ae13fc3] part of check-in [36373b85f9] Fixes to EXPLAIN QUERY PLAN output. Change weights back to something closer to what they are in legacy. More test case fixes. (check-in: [36373b85f9] user: drh branch: nextgen-query-plan-logcost, size: 175423)
2013-06-10
20:46
[ddcf0c795f] part of check-in [69cf877283] Fix some minor issues with logarithmic cost in NGQP. (check-in: [69cf877283] user: drh branch: nextgen-query-plan-logcost, size: 175456)
2013-06-05
23:39
[5e8fe15b1c] part of check-in [1574653b9b] Move the definitions of the WhereLevel and WhereInfo objects out of sqliteInt.h and into where.c. This will facilitate future refactoring of the internal query planner data structures. (check-in: [1574653b9b] user: drh branch: nextgen-query-plan-exp, size: 175520)
2013-05-28
12:11
[22ee971346] part of check-in [a0d5cc9315] Many small harmless comment changes. Removal of obsolete comments and fixing misspelled words. No changes to code. (check-in: [a0d5cc9315] user: drh branch: trunk, size: 175353)
2013-05-07
17:49
[a464188227] part of check-in [fc3630cdef] Make sure the ORDER BY collating sequences are compatible with the comparison collations before using the merge algorithm for compound SELECT statements. Candidate fix for ticket [6709574d2a8d8]. (check-in: [fc3630cdef] user: drh branch: tkt-6709574, size: 175353)
2013-04-25
00:57
[6bfbe11e2f] part of check-in [39b4e6ff93] Make sure the affinity and datatype of sub-subqueries are initialized prior to subqueries as the latter relies on the former. (check-in: [39b4e6ff93] user: drh branch: trunk, size: 173200)
2013-04-24
13:50
[8d097454ff] part of check-in [f136bd9582] Fix a simple comment typo. No changes to code. (check-in: [f136bd9582] user: drh branch: trunk, size: 173117)
2013-03-21
21:20
[01540bcd3d] part of check-in [6f6e2d5094] Many spelling fixes in comments. No changes to code. (check-in: [6f6e2d5094] user: mistachkin branch: trunk, size: 173116)
2013-02-16
02:41
[e1c6f6abdf] part of check-in [cfba2c8dad] Fix an unsafe VM register deallocation. (check-in: [cfba2c8dad] user: drh branch: trunk, size: 173117)
2013-02-12
22:09
[7818b5c9b4] part of check-in [b7222a2bd0] A bug report coming from from Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=840377) describes an infinite recursion. We are unable to reproduce the problem. Nevertheless, this check-in should prevent the problem from ever occurring again. (check-in: [b7222a2bd0] user: drh branch: trunk, size: 173228)
2013-01-29
23:55
[741c623c70] part of check-in [497ee36cb8] Fix LIMIT and OFFSET so that they work and do not leak memory even on complex queries involving deeply nested views of UNION ALL compounds. Ticket [db4d96798da8]. Secondary to ticket [d58ccbb3f1b7]. (check-in: [497ee36cb8] user: drh branch: trunk, size: 173168)
2013-01-28
22:52
[51232abd81] part of check-in [a6499c2521] Fix an issue with the SQLITE_TESTCTRL_EXPLAIN_STMT and compound queries with multiple terms. (check-in: [a6499c2521] user: drh branch: trunk, size: 173020)
19:00
[d1e0c173ef] part of check-in [c2462a95ed] Issue an error message and quit (rather than overflowing a reference counter) if the number of references to a table exceeds the maximum due to nested UNION views. Fix for ticket [d58ccbb3f1]. (check-in: [c2462a95ed] user: drh branch: trunk, size: 172985)
2013-01-03
17:34
[395e458a6d] part of check-in [20730bad70] Further corner-case fixes to the name resolution logic. (check-in: [20730bad70] user: drh branch: name-resolution-fix, size: 172793)
16:54
[962a028bbb] part of check-in [afe96a118c] Remove an incorrect assert() statement (ticket [beba9cae6345a]). Fix other minor problems in the name resolution logic. (check-in: [afe96a118c] user: drh branch: name-resolution-fix, size: 172519)
00:45
[9a76144e13] part of check-in [4cf5ed7ea1] Now supports result sets of the form "TABLE.*" with nested FROM clauses. (check-in: [4cf5ed7ea1] user: drh branch: name-resolution-fix, size: 172357)
2013-01-02
14:57
[bdede5fc10] part of check-in [ef01e30456] When resolving result-set name collisions, make them x:1, x:2, x:3, etc. instead of x:1, x:1:1, x:1;1;1. (check-in: [ef01e30456] user: drh branch: name-resolution-fix, size: 171605)
2012-12-19
02:36
[3cce5b09ca] part of check-in [7344e791b9] Better resolution of table and column names in joins where some of the terms of the FROM clause are parenthesized. (check-in: [7344e791b9] user: drh branch: name-resolution-fix, size: 171488)
2012-12-18
19:36
[5eab6941c0] part of check-in [7fecced466] Optimize the degenerate case of a FROM clause table name enclosed all by itself inside parentheses. Generate code as if the parentheses did not exist, rather than the old behavior of manifesting the parenthesized table into a transient table. Also, tag every FROM-clause SELECT subquery that is generated by a parenthesized FROM-clause expression using the SF_NestedFrom flag. The new SF_NestedFrom flag is not yet used for anything. (check-in: [7fecced466] user: drh branch: trunk, size: 171280)
2012-12-13
16:37
[f6c7317120] part of check-in [7280e14cd8] Attempt to further generalize the min/max optimization so that, if an appropriate index exists, it can be used by any aggregate query that contains only a single aggregate of the form max(colname) or min(colname) and does not contain a GROUP BY clause. (check-in: [7280e14cd8] user: dan branch: minmax-opt, size: 171303)
2012-12-08
21:51
[e6daa524bb] part of check-in [8542e6180d] Refactor collating-sequence handling as a fix for ticket [71e333e7d2e642]. The Expr.pColl field is removed from the Expr object. The COLLATE operator now becomes a separate instance of Expr in the expression tree. The code generator looks up the correct collating function as needed, rather than referring to Expr.pColl. (check-in: [8542e6180d] user: drh branch: trunk, size: 170898)
03:34
[0dc18ed72a] part of check-in [7b96115e81] Veryquick passes all tests now. (check-in: [7b96115e81] user: drh branch: ticket-71e333e7, size: 170271)
2012-12-07
23:10
[def5381139] part of check-in [8e724b383d] For an ORDER BY on a compound SELECT, take the collating sequence from the left-most term of the compound. (check-in: [8e724b383d] user: drh branch: ticket-71e333e7, size: 170247)
22:54
[ebbbe13c09] part of check-in [e313edca04] Do not report missing collating functions while parsing the schema. Also remove a stray comment. (check-in: [e313edca04] user: drh branch: ticket-71e333e7, size: 170095)
22:18
[28176222b1] part of check-in [0aaf52a339] Fix a long-standing issue with the distinct-as-aggregate optimization that only expressed when the new collating-sequence logic is turned on. (check-in: [0aaf52a339] user: drh branch: ticket-71e333e7, size: 170135)
19:28
[1462a39195] part of check-in [2d5f37c99a] Ensure the VerifyCookie sub-routine has been run before the database is accessed in an obscure case. Fix for ticket [d6b36be38]. (check-in: [2d5f37c99a] user: dan branch: trunk, size: 170813)
14:02
[eb3ded8d6f] part of check-in [7fafab12e4] Veryquick now runs to completion without segfaulting or asserting. But there are still lots of errors. (check-in: [7fafab12e4] user: drh branch: ticket-71e333e7, size: 170091)
2012-12-06
21:16
[da1af4c2f1] part of check-in [fd011cb22f] Remove the Expr.pColl field and compute the collating sequence as it is needed. This fixes the test script "shared9.test", though there is still a memory leak. And there are other problems. Consider this a work-in-progress. (check-in: [fd011cb22f] user: drh branch: ticket-71e333e7, size: 170053)
20:19
[3d4543b961] part of check-in [0d7b5d455c] Cherrypick [557c69055a3] and [0064bab7714] (OP_Once-related fixes for triggers). (check-in: [0d7b5d455c] user: dan branch: branch-3.7.9, size: 165420)
2012-10-30
14:39
[3a8baf4719] part of check-in [564631f3e4] Make it possible to disable the subquery-by-coroutine optimization using sqlite3_test_control(). Remove an always-false conditional. (check-in: [564631f3e4] user: drh branch: subquery-as-coroutine, size: 170186)
00:29
[d441b50c38] part of check-in [7af3acbbd4] Add an optimization that attempts to run a subquery as a coroutine rather than manifesting it into a temporary table. (check-in: [7af3acbbd4] user: drh branch: subquery-as-coroutine, size: 170127)
2012-10-26
13:34
[b2c911d0bf] part of check-in [325364a984] Backport the shared-cache-fix branch. (check-in: [325364a984] user: drh branch: branch-3.7.14, size: 167065)
2012-10-15
16:24
[9b759521f8] part of check-in [5526e0aa3c] Dequote column names generated by the query flattener. (check-in: [5526e0aa3c] user: drh branch: trunk, size: 168446)
2012-10-05
18:35
[aa35f4ed3e] part of check-in [ac81ae493f] Backport fixes to shared-cache mode, from the shared-cache-fix branch, to version 3.7.9 (check-in: [ac81ae493f] user: drh branch: branch-3.7.9, size: 165427)
2012-10-04
19:33
[2a82736fae] part of check-in [2b370dea70] Shared-cache mode fixes for views and virtual tables. (check-in: [2b370dea70] user: dan branch: shared-cache-fix, size: 168462)
2012-09-28
10:57
[80633ba750] part of check-in [6a5c59dd7e] Merge the latest trunk changes (PRAGMA busy_timeout and the ORDER BY query planner enhancements) into the apple-osx branch. (check-in: [6a5c59dd7e] user: drh branch: apple-osx, size: 168613)
2012-09-27
15:05
[75c5e37cc8] part of check-in [d2fcba1e14] Add more bits to the bit vector that is used to disable optimizations for built-in test. Add specific bit patterns to disable ORDER BY using an index in general and for joins. Use macros to test for bits in the disabled-optimization bit vector, in order to make the code clearer. (check-in: [d2fcba1e14] user: drh branch: qp-enhancements, size: 168489)
2012-09-26
23:17
[a91b651652] part of check-in [96496ddae1] Further refactoring of the ORDER BY related query-planning logic in order to make it easier to extend to support optimizing out ORDER BY on joins. No actual behavior changes, yet. (check-in: [96496ddae1] user: drh branch: qp-enhancements, size: 168467)
2012-09-24
15:30
[1fad66b73a] part of check-in [22989f3588] Change the internal sqlite3WhereBegin() to report that the ORDER BY clause is satisfied by indices using the WhereInfo.nOBSat field of the returned structure. (check-in: [22989f3588] user: drh branch: trunk, size: 168416)
2012-09-21
00:04
[c2a83ada83] part of check-in [79e922f7ae] Consolidate more of the DISTINCT processing logic into a single spot in the code. Reduce the number of OP_Column operations needed to perform a WHERE_DISTINCT_ORDERED. (check-in: [79e922f7ae] user: drh branch: trunk, size: 168301)
2012-09-20
15:41
[7c6d028755] part of check-in [cf40b7b5eb] Continuing incremental enhancements of SELECT code generation: Remove the Select.affinity field. Use SelectDest.affSdst instead. (check-in: [cf40b7b5eb] user: drh branch: trunk, size: 167406)
14:26
[7878dd564f] part of check-in [0cda241a2b] Refactoring of DISTINCT code. Change the name of the local variable "distinct" to "distinctTab". Generate cleaner code w/o unnecessary P4 and P5 values on the OP_Null for WHERE_DISTINCT_ORDERED. (check-in: [0cda241a2b] user: drh branch: trunk, size: 167352)
2012-09-19
21:15
[63206bbfd1] part of check-in [94b48064db] Tighter VDBE code for the WHERE_DISTINCT_ORDERED case of DISTINCT keyword handling. (check-in: [94b48064db] user: drh branch: trunk, size: 167327)
2012-09-17
17:16
[1278b07a8c] part of check-in [45793f0b84] Make sure the KeyInfo.aSortOrder array is always allocated so that we never have to test for KeyInfo.aSortOrder==0 in performance-critical loops. (check-in: [45793f0b84] user: drh branch: trunk, size: 167132)
2012-09-13
14:42
[171ec5fd5e] part of check-in [1cb9aedfcf] Reduce the size of the Table object by 16 bytes on 64-bit machines, mostly by avoiding intermixing pointer fields with integer fields. (check-in: [1cb9aedfcf] user: drh branch: trunk, size: 167092)
2012-08-31
14:10
[c5dbb1351a] part of check-in [bc9b9cd058] Merge in latest trunk changes. (check-in: [bc9b9cd058] user: dan branch: apple-osx, size: 167216)
2012-08-28
14:45
[f843c872a9] part of check-in [200a81358c] Fix a case where SQLite was failing to detect a syntax error in queries like "SELECT ... FROM (<select-1> UNION ALL <select-2>)" when <select-1> and <select-2> return different numbers of result columns. (check-in: [200a81358c] user: dan branch: trunk, size: 167092)
2012-08-25
10:01
[7c62350de1] part of check-in [9b19b84753] Fix all known instances of 'repeated the' style typos in comments. No changes to code. (check-in: [9b19b84753] user: mistachkin branch: trunk, size: 166678)
01:38
[98102767fb] part of check-in [6723add4f4] Merge all the latest trunk changes into the apple-osx branch. (check-in: [6723add4f4] user: drh branch: apple-osx, size: 166806)
00:49
[6a7353def8] part of check-in [865dfcbaa5] Backport check-in [62678be3df35cd]: When the same index is used for all OR-terms in a WHERE clause, then try to use that index as a covering index. (check-in: [865dfcbaa5] user: drh branch: branch-3.7.2, size: 158455)
2012-08-24
18:44
[a9d68e04f0] part of check-in [a3e26038a1] Fix a problem to do with multi-or queries and automatic indexes. (check-in: [a3e26038a1] user: dan branch: multi-or-covering-index, size: 166682)
01:07
[2c0291db07] part of check-in [d4cd6017c9] Merge the nested aggregate query enhancements into trunk. (check-in: [d4cd6017c9] user: drh branch: trunk, size: 166677)
2012-08-23
16:18
[cd051b460e] part of check-in [3c3ffa901f] Further improvements to the processing of nested aggregate queries. (check-in: [3c3ffa901f] user: drh branch: nested-agg, size: 166670)
2012-07-24
19:46
[a365da6d7a] part of check-in [d8da26f1f4] Mark parameters to sorter interfaces as const where appropriate. (check-in: [d8da26f1f4] user: drh branch: trunk, size: 166654)
2012-07-23
21:43
[eecb852bc7] part of check-in [b589f1efb3] Refactor field names in the SelectDest object to make them distinct and easier to grep for. (check-in: [b589f1efb3] user: drh branch: trunk, size: 166655)
2012-07-18
16:07
[5c9f09de4c] part of check-in [defd828e90] Remove another branch from the DbMalloc() paths. (check-in: [defd828e90] user: dan branch: calloc, size: 166542)
2012-05-22
13:11
[7bc4a2e66a] part of check-in [972e75bb5d] Version 3.7.12.1 (check-in: [972e75bb5d] user: drh branch: apple-osx, size: 166655)
2012-05-21
20:13
[f6c4833c4d] part of check-in [f3dd1fafd4] Candidate fix for the nested aggregate query problem of ticket [c2ad16f997ee9c8e]. (check-in: [f3dd1fafd4] user: drh branch: nested-agg, size: 166531)
19:11
[c5c2d1b6cf] part of check-in [7222609693] Convert the NameContext object from using u8 booleans to using individual bits in a single u8 as its booleans. This change might become a basis for a fix for [c2ad16f997ee9c]. (check-in: [7222609693] user: drh branch: nested-agg, size: 166460)
2012-04-19
20:43
[cf2f8f771b] part of check-in [b72f07b4a2] Update the apple-osx branch so that it includes all of the latest trunk changes. (check-in: [b72f07b4a2] user: drh branch: apple-osx, size: 166547)
2012-04-11
23:22
[d7b9018b7d] part of check-in [a134e6e739] Add a testcase() macro to ensure that the sqlite3AuthCheck() call inside the query flattener really is effective. (check-in: [a134e6e739] user: drh branch: trunk, size: 166423)
2012-03-31
15:08
[5e0e481c7d] part of check-in [e7cb6b73ac] Modify selectColumnsFromExprList() to avoid ever incorrectly returning SQLITE_NOMEM. (check-in: [e7cb6b73ac] user: dan branch: trunk, size: 166379)
02:46
[36d5ed5c45] part of check-in [18ec60cacd] Merge all the latest trunk changes into the apple-osx branch. (check-in: [18ec60cacd] user: drh branch: apple-osx, size: 166450)
2012-03-28
01:34
[f6f141cb1e] part of check-in [b899dbeb60] Evaluate typeof(X) and length(Y) where X is any column and Y is a blob column without actually loading X and Y from disk. (check-in: [b899dbeb60] user: drh branch: faster-typeof-and-length, size: 166326)
2012-03-05
16:39
[2d18d2e19f] part of check-in [504bf49086] Pull in all the latest trunk changes. (check-in: [504bf49086] user: drh branch: apple-osx, size: 166447)
2012-02-23
17:35
[44ccdcb5d2] part of check-in [c8c7846fb9] Fix an obscure bug that causes a crash when parsing certain invalid SQL statements. (check-in: [c8c7846fb9] user: drh branch: trunk, size: 166323)
2012-02-10
18:18
[6b40963de4] part of check-in [e248598649] Pull the latest trunk changes into the apple-osx branch. (check-in: [e248598649] user: drh branch: apple-osx, size: 166434)
2012-02-02
17:35
[232283a2e6] part of check-in [adb29232b6] For queries of the form "SELECT p, max(q) FROM t1", the value of column p returned is the one on the same row that holds the maximum value of q. (check-in: [adb29232b6] user: drh branch: output-minmax-row, size: 166310)
03:11
[b6eec9d11e] part of check-in [a3553b8a03] Fix a possible segfault after an OOM fault. This has been in the code for ages but only expressed itself following the previous check-in. (check-in: [a3553b8a03] user: drh branch: trunk, size: 166050)
2012-01-28
15:22
[1ad267692a] part of check-in [eb3b6a0ceb] Add support for multiple rows of VALUES in an INSERT statement. (check-in: [eb3b6a0ceb] user: drh branch: trunk, size: 166035)
2012-01-18
01:09
[2d45c1b789] part of check-in [199edb6869] Fix typo in comment. (check-in: [199edb6869] user: mistachkin branch: trunk, size: 165836)
2012-01-03
21:54
[3f4cdc3c4d] part of check-in [8a048423f0] Pull all the latest trunk changes over into the apple-osx branch. (check-in: [8a048423f0] user: drh branch: apple-osx, size: 165970)
2011-12-11
21:51
[a1d075db66] part of check-in [dab4c137a8] Update comments describing the flattening optimization in select.c. (check-in: [dab4c137a8] user: drh branch: trunk, size: 165846)
2011-12-10
23:18
[f38d6bb54d] part of check-in [5061d85ff9] Minor cleanups of the compound-subquery flattening logic. New test cases added for joins the compound subquery. (check-in: [5061d85ff9] user: drh branch: trunk, size: 165476)
17:17
[8c53ca04d6] part of check-in [3d4b4f4fb7] Allow UNION ALL compounds to be promoted up to replace a simple wrapper SELECT even if the compounds are joins. (check-in: [3d4b4f4fb7] user: drh branch: trunk, size: 165382)
15:55
[4d64e3cccc] part of check-in [bcbc7152d4] Import the experimental parse-tree explainer, with fixes, from the tree-explain branch. Disabled by default. Use SQLITE_ENABLE_TREE_EXPLAIN to turn it on. (check-in: [bcbc7152d4] user: drh branch: trunk, size: 165383)
14:44
[97275df6f4] part of check-in [1a360da0f8] Merge the latest trunk changes into tree-explain branch. (check-in: [1a360da0f8] user: drh branch: tree-explain, size: 165369)
2011-12-09
17:27
[fd3046fb39] part of check-in [6a9fb47d50] Take out the OP_JumpOnce opcode. Revert compound SELECT to use OP_IfNot, which is the correct behavior. Mark trigger registers as initially invalid. (check-in: [6a9fb47d50] user: drh branch: uninit-vdbe-mem, size: 165486)
16:21
[d1895ff59f] part of check-in [521d72bdf6] Make no assumptions about the initial state of VDBE registers. (check-in: [521d72bdf6] user: drh branch: uninit-vdbe-mem, size: 165447)
13:24
[e16b188449] part of check-in [557c69055a] Modify the OP_Once opcode so that it works correctly in trigger sub-programs. This is a candidate fix for [7bbfb7d442]. (check-in: [557c69055a] user: dan branch: trunk, size: 165414)
2011-12-08
21:08
[2849781d42] part of check-in [59e0d4f3d9] Merge the latest trunk changes into the apple-osx branch. (check-in: [59e0d4f3d9] user: drh branch: apple-osx, size: 165617)
2011-12-07
22:49
[912bea6024] part of check-in [7b457ea455] Additional detail added to the tree-explain output for SELECT statements. (check-in: [7b457ea455] user: drh branch: tree-explain, size: 165376)
15:33
[984ff4d286] part of check-in [0eb3f8b1e3] More compact notation for the parse-tree view. (check-in: [0eb3f8b1e3] user: drh branch: tree-explain, size: 165070)
01:23
[352ac58d60] part of check-in [0aa7d3d234] Improvements to the data-structure explain subsystem. Most queries now give a reasonably detailed graph of their parse tree. (check-in: [0aa7d3d234] user: drh branch: tree-explain, size: 165097)
2011-12-06
19:44
[2923f3129a] part of check-in [79ae51c5b1] Begin adding the data-structure explaining subsystem. All is contained within (check-in: [79ae51c5b1] user: drh branch: tree-explain, size: 164475)
13:24
[538b5f096f] part of check-in [092d53315e] Do not reuse temp registers originally allocated to a subroutine within the main body of the program logic, since if the subroutine is called while the reused temp registers are in use, their values will get clobbered. Candidate fix for ticket [3a77c9714e63330] (check-in: [092d53315e] user: drh branch: trunk, size: 165493)
2011-10-25
20:36
[a9828845d0] part of check-in [14bc58ca70] Cherrypick changes [53f5cfe115] and [1f7ef0af8d] in order to fix an issue with DISTINCT (check-in: [14bc58ca70] user: drh branch: branch-3.7.2, size: 158450)
2011-10-21
17:18
[8d0e306024] part of check-in [be62ef058b] Merge the latest trunk changes into the apple-osx branch. (check-in: [be62ef058b] user: drh branch: apple-osx, size: 165578)
2011-10-14
21:49
[80f3ac44a8] part of check-in [60fee9574b] Add assert() statements and eliminate needless variable assignments in order to get the clang scan-build utility to report zero problems against the SQLite core. Clang's static analysis did find one real problem - but it was in the command-line shell, not in the SQLite core. (check-in: [60fee9574b] user: drh branch: trunk, size: 165454)
2011-10-11
20:14
[94b375306b] part of check-in [b21b1c7bc4] Add a couple of asserts trying to make the operation of sqlite3SelectNew() clearer. (check-in: [b21b1c7bc4] user: drh branch: trunk, size: 165406)
2011-09-16
19:36
[f3971442d5] part of check-in [070bf203bb] Merge the latest trunk fixes into the apple-osx branch. (check-in: [070bf203bb] user: drh branch: apple-osx, size: 165470)
19:04
[d9b7d20b03] part of check-in [cf51ef8ab8] Remove unreachable branches from the previous change. Add additional test cases. (check-in: [cf51ef8ab8] user: drh branch: trunk, size: 165346)
16:00
[2769d297c8] part of check-in [ff8b76b25b] Further streamlining of the subquery materializer. New test cases for ticket [002caede898a] (check-in: [ff8b76b25b] user: drh branch: trunk, size: 165290)
01:34
[c7ea7cd446] part of check-in [7f00552b73] Add the new OP_Once opcode. Use it to clean up and simplify various one-time initialization sections in the code, including the fix for ticket [002caede898ae]. (check-in: [7f00552b73] user: drh branch: tkt-002caede898, size: 165159)
2011-09-15
23:58
[d85d83c334] part of check-in [4b8357ee3c] Materialize subqueries using a subroutine and invoke that subroutine prior to each use of the materialization. Fix for ticket [002caede898aee4] (check-in: [4b8357ee3c] user: drh branch: tkt-002caede898, size: 165201)
2011-09-14
19:05
[97b75b4000] part of check-in [2456b4d0d2] Merge in the latest changes from trunk. (check-in: [2456b4d0d2] user: drh branch: apple-osx, size: 164227)
2011-09-04
01:11
[bf7b7ea6be] part of check-in [b5179baf87] Improve the testability of the merge-sort logic. (check-in: [b5179baf87] user: drh branch: trunk, size: 164103)
2011-09-02
10:31
[32d0f4e551] part of check-in [7769fb988d] Instead of a temporary b-tree, use a linked-list and merge-sort to sort records in main memory in vdbesort.c. (check-in: [7769fb988d] user: dan branch: merge-sort, size: 164114)
2011-09-01
16:01
[037ee5501f] part of check-in [ebf819aaa5] Use OP_SorterOpen instead of OP_OpenEphemeral to implement GROUP BY. (check-in: [ebf819aaa5] user: drh branch: merge-sort, size: 164088)
15:32
[20bef6860c] part of check-in [bab2e560f6] Experimental code-generator changes to utilize new opcodes for sorting. (check-in: [bab2e560f6] user: drh branch: merge-sort, size: 163630)
2011-08-29
18:24
[14552e9ff4] part of check-in [ad78ef2b3a] Fix a broken assert() statement in select.c. (check-in: [ad78ef2b3a] user: dan branch: trunk, size: 162785)
2011-08-02
18:25
[015f237183] part of check-in [77376b332b] Merge all the latest trunk changes into the apple-osx branch. (check-in: [77376b332b] user: drh branch: apple-osx, size: 162908)
2011-07-09
16:17
[d219c4b68d] part of check-in [90b1aea174] Fix harmless compiler warnings on unix. (check-in: [90b1aea174] user: drh branch: trunk, size: 162784)
2011-07-02
13:34
[27ceaf3ae2] part of check-in [c593792ce0] Cherrypick [45e581bff7] into the 3.7.2 branch. (check-in: [c593792ce0] user: dan branch: branch-3.7.2, size: 158450)
2011-07-01
14:21
[e9d74f943c] part of check-in [7337293c87] Improvements and tests for detection of redundant DISTINCT qualifiers. (check-in: [7337293c87] user: dan branch: experimental, size: 162727)
2011-06-30
20:17
[cf259606f9] part of check-in [f7ba0219ef] Experimental changes to improve optimization of DISTINCT queries. (check-in: [f7ba0219ef] user: dan branch: experimental, size: 162105)
2011-06-24
20:47
[75b7dd8c6a] part of check-in [34f0efa2b1] Merging local changes to apple-osx (check-in: [34f0efa2b1] user: adam branch: apple-osx, size: 160665)
2011-05-01
22:57
[567d1aa0fd] part of check-in [7155e6f328] Backport check-ins [0900e35348f4b9bf3] and [4fead8e714c7e50] to the 3.7.2 branch. These check-ins provide hints to the btree layer for when it is possible to use a hash table rather than a btree to implement an index. The SQLite BTree layer does not use these hints, but alternative btree layers might. (check-in: [7155e6f328] user: drh branch: branch-3.7.2, size: 156269)
2011-04-15
15:18
[a84089eb01] part of check-in [8d924e1607] Backport check-in [9f9f32882501ac9] to provide EXPLAIN QUERY PLAN output for the count(*) optimization. Also backport check-in [a8761a9128de945aa] to prevent unordered indices from being used on a full table scan. The first backport was necessary in order to test the second. (check-in: [8d924e1607] user: drh branch: branch-3.7.2, size: 156179)
14:46
[d9d4408090] part of check-in [a8761a9128] Do not do full table scans of unordered indices. (check-in: [a8761a9128] user: drh branch: trunk, size: 160541)
2011-04-06
17:54
[649a6f10f7] part of check-in [2039ed952a] Changes to support building with various SQLITE_OMIT_XXX options defined. (check-in: [2039ed952a] user: dan branch: trunk, size: 160436)
2011-02-21
17:49
[d24406c45d] part of check-in [9f9f328825] Fix a problem with "EXPLAIN QUERY PLAN SELECT count(*) FROM tbl". (check-in: [9f9f328825] user: dan branch: trunk, size: 160285)
2011-02-12
05:34
[7a673c43b4] part of check-in [9d2b0af266] Fix problems in the backport, reducing the number of errors in the TCL tests to just a few dozen. Most of the remaining errors seem to be real and desirable changes of behavior. (check-in: [9d2b0af266] user: drh branch: branch-3.7.2, size: 155250)
2011-02-11
20:52
[ae2f38effc] part of check-in [5597399988] Skip flattening if subquery has LIMIT and outer query is DISTINCT. Fix for ticket [752e1646fc]. (check-in: [5597399988] user: shaneh branch: trunk, size: 159461)
2010-12-01
19:00
[8a7ba246b0] part of check-in [7df43f4892] Change the type of a variable in struct SrcList so that it fits in a 100 byte lookaside buffer on a 64-bit architecture. (check-in: [7df43f4892] user: dan branch: trunk, size: 159236)
2010-11-16
02:49
[550d67688f] part of check-in [56bbc53924] Use the estimated number of rows computed for subqueries in the cost computations for outer queries. (check-in: [56bbc53924] user: drh branch: trunk, size: 159232)
2010-11-11
17:48
[a88ad1cb4a] part of check-in [28643b85d9] Use "COMPOUND" instead of "COMPOSITE" in the EXPLAIN QUERY PLAN output to describe UNION, UNION ALL, EXCEPT and INTERSECT operations. (check-in: [28643b85d9] user: dan branch: experimental, size: 158359)
16:46
[de0cf4881f] part of check-in [00fb8468b5] Add a row of EXPLAIN QUERY PLAN output for each composite select operation (UNION, EXCEPT etc.) in the query. (check-in: [00fb8468b5] user: dan branch: experimental, size: 158360)
2010-11-09
17:35
[3d5086dfcc] part of check-in [925f35c535] Add missing comments and fix other issues with routines used by new EQP features. (check-in: [925f35c535] user: dan branch: experimental, size: 156065)
14:49
[7c92d9d060] part of check-in [73c93f5a2a] Further enhancements and fixes for explain query plan. (check-in: [73c93f5a2a] user: dan branch: experimental, size: 155384)
2010-11-08
19:01
[c32d6da908] part of check-in [f4747eb83d] Experimental changes to EXPLAIN QUERY PLAN. (check-in: [f4747eb83d] user: dan branch: experimental, size: 155225)
2010-10-21
22:58
[a03ec6a313] part of check-in [d30f7b2def] Make sure the estimated row count for ephemeral tables is initialized so that automatic indices can be used on those tables. (check-in: [d30f7b2def] user: drh branch: trunk, size: 154351)
2010-10-06
18:55
[6a5c72fb0e] part of check-in [b0450120ea] Fix long-standing bugs with the handling of LIMIT clausing in compound SELECT statements with FROM clause subqueries. Ticket [38cb5df375078d3f9]. (check-in: [b0450120ea] user: drh branch: trunk, size: 154293)
2010-09-28
03:55
[cf3013b195] part of check-in [a5eefd5239] Use OP_Copy rather than OP_SCopy at one point in aggregate processing where it is needed to avoid shallow-copy misuse. (check-in: [a5eefd5239] user: drh branch: bug-b351d95f9c, size: 154469)
2010-09-07
12:17
[b0b1247814] part of check-in [657472bce2] Remove a redundant test for multiple output columns in a scalar subquery. (check-in: [657472bce2] user: drh branch: trunk, size: 154469)
2010-09-02
19:01
[eb57331a0f] part of check-in [a55842cfb5] Move the test for an (illegal) scalar sub-query that returns more than one column to earlier in SELECT processing in order to avoid an assert() that can happen later on. (check-in: [a55842cfb5] user: dan branch: trunk, size: 154409)
2010-08-30
22:15
[fb7008115d] part of check-in [4fead8e714] Provide hints to the btree layer during the creation of transient tables for when it is possible for those tables to use a hash rather than a binary tree. No use is currently made of those hints, though assert() statement verify their accuracy. (check-in: [4fead8e714] user: drh branch: trunk, size: 154409)
2010-08-13
16:38
[8add6cab88] part of check-in [497aafd8ed] Do not apply the flattening optimization if the sub-query is DISTINCT. Fix for [e4b8a2ba6e]. (check-in: [497aafd8ed] user: dan branch: trunk, size: 154319)
2010-08-09
14:26
[4b8f481406] part of check-in [88bf901627] Fix two comment typos that were reported on the mailing list. (check-in: [88bf901627] user: drh branch: trunk, size: 154197)
2010-07-25
02:12
[b0fec59c8b] part of check-in [da2f62c502] Further examples of using automatic deallocation to replace "delete" methods. (check-in: [da2f62c502] user: drh branch: malloc-enhancement, size: 154320)
2010-07-23
17:06
[74fef1334b] part of check-in [5c58f44aeb] Remove additional traces (mostly in comments) of the Table.dbMem field. (check-in: [5c58f44aeb] user: drh branch: trunk, size: 154199)
15:41
[3437b62b22] part of check-in [6eddc6e601] Remove the Table.dbMem variable, as it is no longer being used for its original purpose. (check-in: [6eddc6e601] user: dan branch: trunk, size: 154251)
2010-06-28
10:15
[4903ff1bbd] part of check-in [4932f22848] Currently, if SQLite cannot find a table or index referred to by a query, it reloads the database schema from disk to see if the table or index has been added since the schema was cached in memory. Extend this behaviour to columns (which may have been added using ALTER TABLE) and fix some obscure cases related to tables and indexes (INDEXED BY, DROP TABLE etc.). (check-in: [4932f22848] user: dan branch: trunk, size: 154319)
2010-04-26
19:17
[c03d8a0565] part of check-in [ca9d86baf7] Optimization: Convert an ORDER BY clause into a no-op if the query also contains a GROUP BY clause that will force the same output order. (check-in: [ca9d86baf7] user: drh branch: trunk, size: 154288)
2010-04-15
23:24
[b7c9a40bc1] part of check-in [f96782b389] Disable query flattening when the outer query is a compound SELECT and the inner query has a LIMIT clause. Ticket [02a8e81d44]. (check-in: [f96782b389] user: drh branch: trunk, size: 153755)
2010-03-31
15:02
[5a08245cb1] part of check-in [ffc23409c7] Clear the column cache before populating aggregate accumulator registers. Fix fo r [883034dcb5]. (check-in: [ffc23409c7] user: dan branch: trunk, size: 153769)
2010-02-25
14:44
[c5d15b97a5] part of check-in [a255059786] Add some technically unnecessary variable initializations to silence compiler warnings. (check-in: [a255059786] user: dan branch: branch-3.6.1, size: 147519)
2010-02-24
15:10
[4113ef3604] part of check-in [ff61e0fd80] Fix an assertion fault that occurs when two different virtual tables are used in a single UPDATE statement. Ticket [d2f02d37f52b]. (check-in: [ff61e0fd80] user: drh branch: trunk, size: 153207)
2009-12-30
14:12
[0109b993c3] part of check-in [cc6b959bc1] Adjustments to column cache handling in order to restore 100% branch test coverage. (check-in: [cc6b959bc1] user: drh branch: trunk, size: 153181)
2009-12-24
16:00
[71511cdee4] part of check-in [ea4e57e1c1] Immediately purge entries from the column cache when the associated register undergoes an affinity change. Ticket [eb5548a849]. Enhance the SQLITE_TESTCTRL_OPTIMIZATIONS setting of sqlite3_test_control so that it can disable the column cache for testing purposes, in an effort to prevent future problems of a similar nature to this one. (check-in: [ea4e57e1c1] user: drh branch: trunk, size: 153181)
2009-12-22
23:52
[7e424c8fea] part of check-in [4a97c623f4] Move the query flattener turn-off from a pragma to an sqlite3_test_control() call. Make provisions (not yet implemented) to turn off other optimizers using the same call. (check-in: [4a97c623f4] user: drh branch: trunk, size: 153184)
00:29
[9b5ad0e12b] part of check-in [1d8550e5c8] Add a pragma to disable the query flattener - for use during testing. (check-in: [1d8550e5c8] user: drh branch: trunk, size: 153488)
2009-12-09
17:36
[68c58dc493] part of check-in [b558e96f0a] The USING clause and NATURAL JOIN look at all tables to the left when searching for a match, not just the one table to the immediate left. Tables further to the left are preferred. Fix for ticket [f74beaabde]. Still need to add test cases to complete the ticket. (check-in: [b558e96f0a] user: drh branch: trunk, size: 153132)
2009-11-20
16:13
[2f9ed7482e] part of check-in [c6ed7e2a73] Fix a bug in LIMIT 0 for compound SELECT statement. The problem was introduced by recent enhancements and has not appeared in any release. (check-in: [c6ed7e2a73] user: drh branch: trunk, size: 151530)
2009-11-12
20:39
[a727f61f32] part of check-in [6705ab1ad1] Shift more OP_Found opcodes over to using the unpacked format, for improved performance. (check-in: [6705ab1ad1] user: drh branch: trunk, size: 151547)
19:59
[55051bfa85] part of check-in [b9eab885cd] Enhance the OP_Found and OP_NotFound opcodes so that they can accept an array of registers as an unpacked record in addition to a record built using OP_MakeRecord. Use this to avoid OP_MakeRecord calls during IN expression processing. (check-in: [b9eab885cd] user: drh branch: trunk, size: 151545)
03:13
[696f245c51] part of check-in [39d5b292d2] Adjustments to the implementation of LIMIT so that it uses fewer opcodes. (check-in: [39d5b292d2] user: drh branch: trunk, size: 151533)
2009-11-10
01:30
[ecd7fb2fcb] part of check-in [f6c045f649] Remove the obsolete "$Id:$" RCS identifier strings from the source code. (check-in: [f6c045f649] user: drh branch: trunk, size: 151369)
2009-10-19
15:52
[cbe366a0ce] part of check-in [6fe6371175] When generating WHERE clause terms internally for NATURAL and USING joins, identify the table by its position in the FROM list, not by its name or alias. Fix for [b73fb0bd64]. (check-in: [6fe6371175] user: dan branch: trunk, size: 151427)
2009-09-10
10:15
[1d0a131375] part of check-in [f2a9ee722c] Remove an ALWAYS macro around an expression that is sometimes false. (check-in: [f2a9ee722c] user: dan branch: trunk, size: 151694)
2009-09-08
01:14
[a7a075456d] part of check-in [52449a9569] Code simplifications, especially to the pseudo-table logic, and comment improvements. (check-in: [52449a9569] user: drh branch: trunk, size: 151171)
2009-09-07
18:14
[95809555bf] part of check-in [d7dc8b4336] Add the SQLITE_LIMIT_TRIGGER_DEPTH option to sqlite3_limit(). (check-in: [d7dc8b4336] user: drh branch: trunk, size: 151191)
2009-09-01
12:16
[8bc7347fe8] part of check-in [38a9327bad] More fixes and comment updates. (check-in: [38a9327bad] user: dan branch: trunk, size: 151353)
2009-08-28
18:53
[56ecb073e6] part of check-in [9b9c192115] Changes to support recursive triggers. (check-in: [9b9c192115] user: dan branch: trunk, size: 151351)
2009-08-01
15:09
[67b0778c95] part of check-in [359d78e144] Fix a segfault following OOM that was introduced by check-in (6949) which was a fix for ticket #3997. (CVS 6954) (check-in: [359d78e144] user: drh branch: trunk, size: 151292)
2009-07-28
13:30
[90bc99bfcf] part of check-in [b2784cf5d8] When flattening a SELECT query, do not discard collation sequences explicitly attached to expressions in the parent query. Fix for #3997. (CVS 6949) (check-in: [b2784cf5d8] user: danielk1977 branch: trunk, size: 151285)
2009-06-12
03:27
[71748b8e24] part of check-in [bd341a103c] Make sure nested queries with USING clauses do not leak memory. Preliminary fix for ticket #3911. (CVS 6750) (check-in: [bd341a103c] user: drh branch: trunk, size: 151214)
2009-06-01
16:53
[2d97084a17] part of check-in [0791588520] Fix compiler warnings with MSVC build. (CVS 6699) (check-in: [0791588520] user: shane branch: trunk, size: 151160)
2009-05-31
21:21
[66de3fa81a] part of check-in [ee9a144d44] Code simplifications to facilitate coverage testing following the recent changes to the Expr object. (CVS 6697) (check-in: [ee9a144d44] user: drh branch: trunk, size: 151148)
2009-05-30
20:49
[a3d8a0185e] part of check-in [f760bb7a03] Simplifications to the expr.c source module resulting from structural testing. (CVS 6694) (check-in: [f760bb7a03] user: drh branch: trunk, size: 151140)
2009-05-28
01:00
[fd1737a667] part of check-in [4ac2bdfbb4] Additional refinements to Expr handling. Restore compression of trigger expressions. Change Expr.zToken to Expr.u.zToken and added Expr.u.iValue. Remove an unnecessary ExprDup from CHECK constraint processing. And so forth. (CVS 6682) (check-in: [4ac2bdfbb4] user: drh branch: trunk, size: 151202)
2009-05-27
10:31
[18c296d45c] part of check-in [7cb1c3ba07] Simplifications to the Expr object: Remove Expr.span completely and convert Expr.token into a char* Expr.zToken. Also simplify the Token object by removing the Token.dyn and Token.quoted fields. (CVS 6681) (check-in: [7cb1c3ba07] user: drh branch: trunk, size: 150737)
2009-05-19
19:04
[88e654ab5b] part of check-in [f678ed34fa] Changes to select.c to facilitate full coverage testing. (CVS 6658) (check-in: [f678ed34fa] user: drh branch: trunk, size: 151794)
2009-05-18
15:46
[e5813bd0a7] part of check-in [e225f365bd] Changes to select.c in support of full coverage testing. (CVS 6647) (check-in: [e225f365bd] user: drh branch: trunk, size: 152074)
2009-05-17
15:29
[b51d7f64f3] part of check-in [0d97461347] Remove debugging code accidently left in check-in (6642). Ticket #3862. (CVS 6645) (check-in: [0d97461347] user: drh branch: trunk, size: 151933)
15:26
[1f95ac86ac] part of check-in [dd665eac8c] Take care to free the memory for the ORDER BY clause on SELECT statements containing errors and contained within triggers. Ticket #3863. (CVS 6644) (check-in: [dd665eac8c] user: drh branch: trunk, size: 151960)
02:06
[3adc1da3ba] part of check-in [e3ccbc69ba] Tweaks and simplifications to select.c to facility full coverage testing. (CVS 6642) (check-in: [e3ccbc69ba] user: drh branch: trunk, size: 151960)
2009-05-11
20:53
[2877098ffa] part of check-in [33cf83591e] Rework the logic that generates a schema for tables created using "CREATE TABLE ... AS SELECT ...". Instead of trying to copy the raw datatype string from the right-hand side, just make the type one of TEXT, INT, REAL, NUM, or nothing. This is much simpler than trying to parse and quote datatype strings. Other minor implifications to build.c are bundled with this change. (CVS 6626) (check-in: [33cf83591e] user: drh branch: trunk, size: 150852)
2009-05-03
20:23
[9587023e90] part of check-in [a612299092] Changes to facility full coverage testing of util.c. (CVS 6597) (check-in: [a612299092] user: drh branch: trunk, size: 150790)
2009-05-01
21:13
[84022ec5d4] part of check-in [12bcb03d9b] Record within the Token structure itself whether or not the token has been dequoted. This steals one bit from the length of a token and thus limits the size of tokens to 1GiB. (CVS 6589) (check-in: [12bcb03d9b] user: drh branch: trunk, size: 150817)
2009-04-24
15:46
[40748e8044] part of check-in [98606bee9e] Get rid of the special RowSet processing in where.c and move that into clients. Added the WHERE_DUPLICATES_OK option to eliminate an unnecessary RowSet during DELETE with a WHERE clause containing ORs. (CVS 6546) (check-in: [98606bee9e] user: drh branch: trunk, size: 151771)
2009-04-23
13:22
[b3d9b7a56e] part of check-in [dd4d67a674] Rework the column-cache mechanism to be more robust (and more correct). The column-alias cache is currently disabled, (CVS 6538) (check-in: [dd4d67a674] user: drh branch: trunk, size: 151780)
2009-04-16
00:24
[35225756c2] part of check-in [414f340809] In a 3-fold compound SELECT make sure early code generation of the SELECTs to the right do not dereference non-existant columns in SELECTs on the left. (CVS 6511) (check-in: [414f340809] user: drh branch: trunk, size: 151461)
2009-04-02
16:59
[462d9671e9] part of check-in [23f90d5073] Disable the query flattening optimization when the subquery is a compound query with an ORDER BY clause. Ticket #3773 shows why that combination does not work. (CVS 6437) (check-in: [23f90d5073] user: drh branch: trunk, size: 151434)
2009-03-31
03:41
[bd494b68a5] part of check-in [768514179a] Fix compiler warnings from gcc and MSVC; Correct typo in select.c; (CVS 6417) (check-in: [768514179a] user: shane branch: trunk, size: 151006)
2009-03-24
15:08
[607e5b2d3b] part of check-in [ea74d8dc62] Changes to insure that lookaside memory allocations are never used to hold schema content. Ticket #3743. (CVS 6377) (check-in: [ea74d8dc62] user: drh branch: trunk, size: 151005)
2009-02-25
08:56
[4d0b77fd76] part of check-in [a3695b98f6] Minor changes and coverge tests for "SELECT count(*)" optimization. (CVS 6324) (check-in: [a3695b98f6] user: danielk1977 branch: trunk, size: 150949)
2009-02-24
18:33
[757eb43f93] part of check-in [3f0baa1b63] Fixes and some extra test cases for count(*) optimization. (CVS 6320) (check-in: [3f0baa1b63] user: danielk1977 branch: trunk, size: 150930)
10:01
[474557a5e4] part of check-in [d4aa659318] Optimize queries of the form "SELECT count(*) FROM <tbl>" by adding a sqlite3BtreeCount() interface to the btree layer. (CVS 6316) (check-in: [d4aa659318] user: danielk1977 branch: trunk, size: 150951)
2009-02-20
10:58
[aa7328a23c] part of check-in [e43ed64963] Instead of using SetNumColumns, specify the number of columns in a table or index using the P4 argument. (CVS 6310) (check-in: [e43ed64963] user: danielk1977 branch: trunk, size: 147188)
2009-02-19
14:39
[fc21f384db] part of check-in [d9f6ffbc5e] Changes to reduce the heap space consumed by triggers, views and tables in the in-memory representation of the schema. Also to reduce the space used by prepared statements slightly. (CVS 6305) (check-in: [d9f6ffbc5e] user: danielk1977 branch: trunk, size: 147235)
2009-02-09
13:19
[164934bd8a] part of check-in [e20bf38466] Better error message when DISTINCT is used on an aggregate function that takes two or more arguments. Ticket #3641. (CVS 6269) (check-in: [e20bf38466] user: drh branch: trunk, size: 146575)
2009-01-09
02:49
[ae72b604e4] part of check-in [6e171c0a64] More coverage improvements. (CVS 6148) (check-in: [6e171c0a64] user: drh branch: trunk, size: 146580)
01:12
[af86044ede] part of check-in [45bb5703d7] Increased test coverage. (CVS 6147) (check-in: [45bb5703d7] user: drh branch: trunk, size: 146711)
2009-01-05
19:36
[75d6404cc1] part of check-in [e02323b362] Reenable fuzz testing for all.test. Make sure the query flattener copies over aggregate information from expressions on outer query terms while flattening. (CVS 6112) (check-in: [e02323b362] user: drh branch: trunk, size: 146311)
2008-12-23
23:56
[6c2a5675c2] part of check-in [55d4f493e7] Continuing improvements to the multi-index OR-clause optimizer. Added a few simple test cases. (CVS 6062) (check-in: [55d4f493e7] user: drh branch: trunk, size: 146245)
2008-12-10
22:15
[a4316c5e8a] part of check-in [258722b617] Fix an issue with the new sqlite3Strlen30() introduced by check-in (6007). Additional casts for compiler warnings. (CVS 6011) (check-in: [258722b617] user: drh branch: trunk, size: 146236)
19:26
[49296e1abf] part of check-in [c872d55493] Never use strlen(). Use our own internal sqlite3Strlen30() which is guaranteed to never overflow an integer. Additional explicit casts to avoid nuisance warning messages. (CVS 6007) (check-in: [c872d55493] user: drh branch: trunk, size: 146237)
18:03
[ea915ff233] part of check-in [14e6d19c31] More explicit type casting to silence VC++. (CVS 6006) (check-in: [14e6d19c31] user: drh branch: trunk, size: 146168)
17:20
[e5b3b244e3] part of check-in [e7e9fa4fa1] Remove or rename local variables that shadow other variables or parameters. (CVS 6005) (check-in: [e7e9fa4fa1] user: drh branch: trunk, size: 146232)
2008-12-06
16:10
[1d3616e4e4] part of check-in [76246d9f0d] Make sure the KeyInfo object attached to a transient table used for sorting records the sqlite3 object used for memory allocation, so that memory allocation failures on UTF16 to UTF8 conversion can be recorded. (CVS 5987) (check-in: [76246d9f0d] user: drh branch: trunk, size: 145611)
2008-12-05
00:00
[e2127ce827] part of check-in [06d206ef7d] Expand table.* properly on a USING or a NATURAL join. Ticket #3522. (CVS 5979) (check-in: [06d206ef7d] user: drh branch: trunk, size: 145591)
2008-11-21
16:22
[b296a7b53d] part of check-in [88a09dbb4b] Fix a segfault that can be caused by an INSTEAD OF trigger on a view that includes an expression of the form "table.column" in the select list. (CVS 5940) (check-in: [88a09dbb4b] user: danielk1977 branch: trunk, size: 145586)
09:43
[72318e824f] part of check-in [4c765758c1] Fix an assert() failure that can occur after an OOM error. (CVS 5939) (check-in: [4c765758c1] user: danielk1977 branch: trunk, size: 145526)
2008-11-19
09:05
[e01537d4d8] part of check-in [88134322c3] Changes to avoid "unused parameter" compiler warnings. (CVS 5921) (check-in: [88134322c3] user: danielk1977 branch: trunk, size: 145506)
2008-11-17
19:18
[18c6d96f4f] part of check-in [8009220c36] Modifications to avoid unsigned/signed comparisons in various files. (CVS 5914) (check-in: [8009220c36] user: danielk1977 branch: trunk, size: 145486)
2008-11-12
12:27
[b03c6fe474] part of check-in [e89f9c8063] Fix a faulty assert in select.c. Ticket #3494. (CVS 5892) (check-in: [e89f9c8063] user: drh branch: trunk, size: 145512)
2008-11-11
18:28
[058d5c2279] part of check-in [ea5f4baa04] Cleanup in flattenSubquery. Add OOM tests for flattenSubquery. Fix issues with OOM errors causes problems for flattenSubquery. Ticket #3485. (CVS 5882) (check-in: [ea5f4baa04] user: drh branch: trunk, size: 145506)
2008-10-31
10:53
[0d79c6c0b4] part of check-in [bfce91429b] Change the way sqlite3VdbeSetColName() is called so as to remove a few lines of code. This also fixes #3470. (CVS 5853) (check-in: [bfce91429b] user: danielk1977 branch: trunk, size: 143676)
2008-10-30
22:13
[59ffe26fe8] part of check-in [cd1662e964] Fix a faulty assert() in the merge implementation of the UNION operator. Ticket #3467. (CVS 5852) (check-in: [cd1662e964] user: drh branch: trunk, size: 143541)
2008-10-07
19:53
[d910d7350d] part of check-in [79df72ee83] Raise the hard upper bound on SQLITE_MAX_FUNCTION_ARG to 1000 from 100. The default upper bound is still 100, but it can now be raised as high as 1000 at compile-time. (CVS 5780) (check-in: [79df72ee83] user: drh branch: trunk, size: 143521)
01:18
[c1c555ee71] part of check-in [486b1124f7] Removed redundant assert(). (CVS 5773) (check-in: [486b1124f7] user: shane branch: trunk, size: 143514)
2008-10-06
16:18
[34f32ee034] part of check-in [83a7e446b2] Allow INDEXED BY and NOT INDEXED to be used in UPDATE and DELETE statements. (CVS 5772) (check-in: [83a7e446b2] user: danielk1977 branch: trunk, size: 143557)
05:32
[75d4ffe971] part of check-in [98ca5580f5] Allow INDEXED BY and NOT INDEXED clauses in SELECT statements. (CVS 5766) (check-in: [98ca5580f5] user: danielk1977 branch: trunk, size: 143041)
2008-09-23
09:36
[f118f8db2c] part of check-in [01d26b3df7] Fix for ticket #3382 was mistakenly removed by (5712). Add an assert to prevent it from being removed again. (CVS 5733) (check-in: [01d26b3df7] user: drh branch: trunk, size: 142611)
2008-09-17
00:13
[4d25fe8da3] part of check-in [f8b759f197] Fix for tickets #3378 and #3381 that preserves the aliasing optimization. And yet, this fix feels uncomfortable. Seeking an alternative... (CVS 5712) (check-in: [f8b759f197] user: drh branch: trunk, size: 142539)
2008-09-16
15:55
[9cf9aac53a] part of check-in [bd58be6ecf] Initialize variable pKeyDup in multiSelectOrderBy(). Technically it doesn't need to be initialized, but the reasoning required to come to that conclusion is too complicated for some automated systems. So it is initialized to keep some compilers happy. Ticket #3382. (CVS 5710) (check-in: [bd58be6ecf] user: danielk1977 branch: trunk, size: 142178)
2008-09-13
01:20
[b4bc253622] part of check-in [ced6bbd228] Fix issues with bizarrely quoted column names. Tickets #3370, #3371, and #3372. (CVS 5696) (check-in: [ced6bbd228] user: drh branch: trunk, size: 142170)
2008-09-01
15:52
[eec7c5f28a] part of check-in [d04d703367] Defer deleting Table objects associated with flattened subqueries until all code has been generated, in case some expression node still references the Table object. Ticket #3346. (CVS 5650) (check-in: [d04d703367] user: drh branch: trunk, size: 142105)
2008-08-26
12:56
[8187927315] part of check-in [4995a1d1c9] Do not flatten subqueries where the subquery has a LIMIT and the outer query has a WHERE clause. Ticket #3334. (CVS 5613) (check-in: [4995a1d1c9] user: drh branch: trunk, size: 141386)
2008-08-25
17:23
[1042eafb5c] part of check-in [4ad096bda1] Fix bug in the premutation testing that was causing many permutations from begin skipped. There are now 16 errors reported by the permutation test. (CVS 5610) (check-in: [4ad096bda1] user: drh branch: trunk, size: 141202)
2008-08-22
16:29
[3db954ccab] part of check-in [cc36b4e016] Enhanced test coverage. (CVS 5598) (check-in: [cc36b4e016] user: drh branch: trunk, size: 141149)
2008-08-21
14:54
[e71462393f] part of check-in [8593218c7c] Make sure "rowid" columns in views are named correctly. Ticket #3308. (CVS 5580) (check-in: [8593218c7c] user: drh branch: trunk, size: 141305)
14:15
[eed74c3d00] part of check-in [6855711595] Reinsert an SCopy operation that was removed in (5523) because coverage testing indicated that it was dead code. Ticket #3324 shows that the code was not as dead as we thought it was. (CVS 5578) (check-in: [6855711595] user: drh branch: trunk, size: 141249)
2008-08-20
16:35
[0a0ed2d14b] part of check-in [daf730d1de] Refactor the name resolution procedures in the code generator. (CVS 5569) (check-in: [daf730d1de] user: drh branch: trunk, size: 141545)
2008-08-14
00:19
[defdb8cdf7] part of check-in [8947c72f93] Do not flatten the right term of a LEFT join. Ticket #3300. (CVS 5565) (check-in: [8947c72f93] user: drh branch: trunk, size: 147726)
2008-08-08
18:06
[390d1bdde0] part of check-in [02232e7144] Move a variable initialization earlier to work around MS compiler complaints. (CVS 5549) (check-in: [02232e7144] user: drh branch: trunk, size: 147511)
2008-08-04
03:51
[c1899b14f5] part of check-in [9ca975c8fd] Fix (make test) with SQLITE_OMIT_COMPOUND_SELECT. Ticket #3235. (CVS 5530) (check-in: [9ca975c8fd] user: danielk1977 branch: trunk, size: 147519)
2008-08-02
03:50
[23106fd9a9] part of check-in [f1e44eb323] Additional coverage testing. Fix a segfault following OOM in sqltie3_load_extension(). (CVS 5523) (check-in: [f1e44eb323] user: drh branch: trunk, size: 147468)
2008-08-01
18:47
[95fb28783e] part of check-in [b65f493c75] Fix problems in test scripts. Add new test cases to improve test coverage. (CVS 5521) (check-in: [b65f493c75] user: drh branch: trunk, size: 147219)
2008-07-28
19:34
[ef18af5624] part of check-in [e48f9697e9] Implement the "lookaside" memory allocation cache. Use of this cache makes the speed1.test script run about 15% faster. Added new interfaces to control the cache. (CVS 5488) (check-in: [e48f9697e9] user: drh branch: trunk, size: 147271)
2008-07-24
15:50
[a152b1436d] part of check-in [7455310931] Update the implementation of sqlite3ResultSetOfSelect() to (hopefully) make it clearer that malloc failures cannot possibly result in a crash. Ticket #3247. (CVS 5470) (check-in: [7455310931] user: drh branch: trunk, size: 147858)
2008-07-22
05:00
[859ea5194b] part of check-in [1ffe7a9957] flattenSubquery() needed if either SQLITE_OMIT_SUBQUERY or SQLITE_OMIT_VIEW not defined. (CVS 5445) (check-in: [1ffe7a9957] user: shane branch: trunk, size: 147836)
2008-07-15
20:56
[f3a9d9f4ee] part of check-in [61f6e19755] Update column naming rules. Ticket #3221. Rules for column naming are still subject to change (except for the AS rule which we promise to keep the same) but are more consistent now. And the rules are tested using a new test script. (CVS 5416) (check-in: [61f6e19755] user: drh branch: trunk, size: 147676)
00:27
[972bdef506] part of check-in [7cf91e08c0] Increased test coverage. (CVS 5414) (check-in: [7cf91e08c0] user: drh branch: trunk, size: 147393)
2008-07-11
21:02
[b909e21358] part of check-in [c80a5d0993] Detect and handles the case where a row is modified or deleted while it is being read during SELECT processing. (CVS 5399) (check-in: [c80a5d0993] user: drh branch: trunk, size: 147339)
2008-07-10
17:59
[fcf51df181] part of check-in [9c8b97ef59] Fix a crash in flattenSubquery(). (CVS 5388) (check-in: [9c8b97ef59] user: danielk1977 branch: trunk, size: 147352)
00:32
[0c887fe1a8] part of check-in [636cd72329] Remove unused code. Test coverage enhancements. Modify the algorithm used to select column names for VIEWs of joins so that the constructed column names omits the underlying table names. (CVS 5386) (check-in: [636cd72329] user: drh branch: trunk, size: 147290)
2008-07-09
01:39
[e6edf11f02] part of check-in [c6cf08477c] Additional test coverage in select.c and expr.c. (CVS 5381) (check-in: [c6cf08477c] user: drh branch: trunk, size: 148365)
2008-07-08
23:40
[02b7877754] part of check-in [cbd3c1585b] Remove obsolete code from select.c, including the "affinity" parameter to the sqlite3Select() module. (CVS 5380) (check-in: [cbd3c1585b] user: drh branch: trunk, size: 148703)
19:34
[5ff8bc0ec2] part of check-in [8ed04b1e26] Completely rework the sqlite3SetString() primitive so that it honors the SQLITE_LIMIT_LENGTH and avoids the use of strlen(). (CVS 5374) (check-in: [8ed04b1e26] user: drh branch: trunk, size: 152404)
18:05
[46997b3399] part of check-in [fa07c360b7] Improved testing of the min/max optimization. (CVS 5373) (check-in: [fa07c360b7] user: drh branch: trunk, size: 152408)
17:43
[183a68a0af] part of check-in [6c2adade34] Prevent the flattening optimization from transforming a to a query with an illegal ORDER BY clause. (CVS 5372) (check-in: [6c2adade34] user: danielk1977 branch: trunk, size: 152424)
2008-07-02
16:10
[3e44f39106] part of check-in [cec4eba1a1] Fix a memory leak that can occur following a malloc failure. (CVS 5339) (check-in: [cec4eba1a1] user: danielk1977 branch: trunk, size: 151979)
13:13
[31c8ab4c95] part of check-in [8b88b64bb3] Call the authorizer callback the same number of times whether or not the query flattening occurs. (CVS 5338) (check-in: [8b88b64bb3] user: danielk1977 branch: trunk, size: 151979)
2008-07-01
18:26
[154b3feee7] part of check-in [8f9d1abb31] Fix errors in in.test. Also add a few tests to selectB.test. (CVS 5337) (check-in: [8f9d1abb31] user: danielk1977 branch: trunk, size: 151722)
17:39
[0b01cf5fb4] part of check-in [56109b9a1f] Fix another memory leak related to UNION ALL and sub-selects. (CVS 5336) (check-in: [56109b9a1f] user: danielk1977 branch: trunk, size: 151680)
16:05
[8e9951054a] part of check-in [6ee71f4ddb] Fix a memory leak to do with the recent UNION ALL sub-select optimization. (CVS 5333) (check-in: [6ee71f4ddb] user: danielk1977 branch: trunk, size: 151621)
14:39
[d1b633882c] part of check-in [a79786a961] Fix a problem with LIMIT and OFFSET clauses on the parent query when optimizing a UNION ALL sub-select. (CVS 5332) (check-in: [a79786a961] user: danielk1977 branch: trunk, size: 151442)
14:09
[727e546cd9] part of check-in [3ef468e704] Optimize sub-selects and views that use UNION ALL. This optimization isn't very well tested yet. (CVS 5331) (check-in: [3ef468e704] user: danielk1977 branch: trunk, size: 151311)
2008-06-30
18:12
[afaac3f04b] part of check-in [6fcb3bffe2] Call the query flattener while processing the parent query. Previously, it was called while processing the sub-queries. (CVS 5330) (check-in: [6fcb3bffe2] user: danielk1977 branch: trunk, size: 148531)
2008-06-27
00:52
[5b213de002] part of check-in [0b01ec5cf7] Remove unused variable. Fix a compiler warning. (CVS 5319) (check-in: [0b01ec5cf7] user: drh branch: trunk, size: 148737)
00:47
[c4f8aa2a9e] part of check-in [a400578269] Tweaks to the IN expression code generator. Fix an an unrelated bug in the compound SELECT code generator. (CVS 5318) (check-in: [a400578269] user: drh branch: trunk, size: 148762)
2008-06-26
18:04
[e27de53be4] part of check-in [d45a97be71] Fix handling of "x IN (...)" and "x NOT IN (...)" expressions when the set contains an SQL NULL value. (CVS 5314) (check-in: [d45a97be71] user: danielk1977 branch: trunk, size: 148750)
2008-06-25
00:12
[79f60dc4a7] part of check-in [8bbfa97837] The compound-select merge optimization passes quick.test with no errors. (CVS 5299) (check-in: [8bbfa97837] user: drh branch: trunk, size: 149041)
2008-06-24
12:46
[dfc7e6ba4c] part of check-in [95037e6dbf] Fix a problem in sqlite3ExprIsInteger() causing failures on select1-4.9.2. Other bug fixes in compound-merge. The compound-merge is still disabled in this check-in using "#if 0" due to additional bugs. (CVS 5295) (check-in: [95037e6dbf] user: drh branch: trunk, size: 144873)
00:32
[1ebcd83ab5] part of check-in [e2ba324cbc] The compound-select merge optimization is mostly working with this check-in. But there are still a few problems and so the optimization is disabled by and "#if 0". This check-in is to synchronize with the other changes happening in parallel. (CVS 5291) (check-in: [e2ba324cbc] user: drh branch: trunk, size: 145108)
2008-06-22
12:37
[ea3e5e233c] part of check-in [663a590e30] Fix a bug in the KEYINFO handling within select.c. Change the OP_Move opcode to take a count and to move multiple registers. Initial code for the compound-select merge optimization is added but is incomplete and is commented out. (CVS 5272) (check-in: [663a590e30] user: drh branch: trunk, size: 139999)
2008-06-20
18:13
[8393c47a17] part of check-in [083113652f] Add new Compare and Jump codes to the virtual machine. Use them in the implementation of aggregate queries. (CVS 5257) (check-in: [083113652f] user: drh branch: trunk, size: 127742)
15:24
[672a4812f7] part of check-in [6b9d92fc3f] Change the SRT_Subroutine mode into SRT_Coroutine. Use co-routines in the INSERT processing logic. (CVS 5255) (check-in: [6b9d92fc3f] user: drh branch: trunk, size: 128180)
2008-06-06
15:04
[669687459e] part of check-in [ef1956eebc] Remove the subroutine return stack from the VDBE. Return addresses for subroutines are now stored in registers. (CVS 5191) (check-in: [ef1956eebc] user: drh branch: trunk, size: 128250)
2008-05-01
17:03
[da43ce3080] part of check-in [227a6f67c2] Fix harmless compiler warnings. (CVS 5073) (check-in: [227a6f67c2] user: drh branch: trunk, size: 127900)
2008-04-17
19:14
[b02ee16591] part of check-in [0d2e258e1a] Additional work on ticket #3015. The previous fix (check-in (4919)) did not appear to work in all cases and it disabled indexing in some places where it should not have. New test cases added to help insure that the current fix is better. (CVS 5026) (check-in: [0d2e258e1a] user: drh branch: trunk, size: 127922)
2008-04-15
12:14
[5b8824a326] part of check-in [d04246a463] Fix a code generator bug caused by the new CSE optimization. Add test cases to prevent a recurrence. (CVS 5011) (check-in: [d04246a463] user: drh branch: trunk, size: 127943)
2008-04-10
13:33
[1abe53c844] part of check-in [fba97f7874] First cut at optimizing single-row updates to use a one-pass algorithm. (CVS 4973) (check-in: [fba97f7874] user: drh branch: trunk, size: 127960)
2008-04-01
05:07
[53bfb7c4da] part of check-in [91cc646e2b] Fix the CSE mechanism so that it takes into account column affinity changes that might be imposed by comparison operators. (CVS 4949) (check-in: [91cc646e2b] user: drh branch: trunk, size: 127900)
2008-03-31
23:48
[0d1b44c9ef] part of check-in [c29ee0fed2] Avoid duplicate OP_Column opcodes by remembering prior results. This is similar to CSE, but only applies to columns. (CVS 4943) (check-in: [c29ee0fed2] user: drh branch: trunk, size: 128009)
17:41
[61fcc616b6] part of check-in [b266924b89] In setQuotedToken(), only make a malloced copy if the argument contains one or more " characters. (CVS 4941) (check-in: [b266924b89] user: danielk1977 branch: trunk, size: 127471)
2008-03-27
17:59
[f47faa4af9] part of check-in [1a58a87023] Allow creation of ephemeral pseudo-tables - pseudo-tables that copy a pointer to a row when inserted instead of copying the row data. (CVS 4924) (check-in: [1a58a87023] user: danielk1977 branch: trunk, size: 126949)
2008-03-26
12:50
[5b5197016a] part of check-in [72ae456239] Comment change on the previous check-in. No changes to code. (CVS 4918) (check-in: [72ae456239] user: drh branch: trunk, size: 126882)
12:46
[84f9392a7b] part of check-in [50de87dc80] Make sure an imbalance in the number of columns on a compound SELECT is detected and reported as an error before it can cause an assertion fault or array-bounds overflow in the code generator. Oops: part of the fix for ticket #3015 got included with this check-in by mistake. (CVS 4917) (check-in: [50de87dc80] user: drh branch: trunk, size: 126701)
2008-03-25
17:23
[831714d4f0] part of check-in [ee381b4356] Modify the {quote: IdxDelete} opcode so that it takes an array of registers rather than a record formed using {quote: MakeRecord.} This avoids a needless packing and unpacking of the record to be deleted. (CVS 4916) (check-in: [ee381b4356] user: drh branch: trunk, size: 126394)
09:47
[c06849a0d0] part of check-in [0471536481] Use a vdbe memory cell to allocate the space required for vdbe cursors. (CVS 4912) (check-in: [0471536481] user: danielk1977 branch: trunk, size: 126596)
2008-03-22
01:07
[35063b078b] part of check-in [8ef26646cf] Add the SQLITE_OMIT_DECLTYPE compile-time option. Remove more code when SQLITE_ENABLE_COLUMN_METADATA is not defined. (CVS 4906) (check-in: [8ef26646cf] user: drh branch: trunk, size: 126634)
2008-03-20
14:03
[2a0f383a16] part of check-in [60c77882b2] Initial implementation of per-connection limits and the sqlite3_limit() API. The sqllimits1.test script crashes. SQLITE_LIMIT_PAGE_COUNT and SQLITE_LIMIT_VDBE_OP are currently ignored. (CVS 4897) (check-in: [60c77882b2] user: drh branch: trunk, size: 126468)
2008-03-04
17:45
[d0a1e01a2a] part of check-in [9c6694bb61] Various renames & cleanups to limit exported symbols on amalgamation build (CVS 4819) (check-in: [9c6694bb61] user: mlcreech branch: trunk, size: 126421)
2008-02-15
14:33
[aef06a4b15] part of check-in [6d33cbd99c] Do not apply the query flattening optimization when the outer query is an aggregate and the inner query contains an ORDER BY clause. Ticket #2943. (CVS 4791) (check-in: [6d33cbd99c] user: drh branch: trunk, size: 126395)
2008-02-13
18:25
[1d78069107] part of check-in [990237e27e] Where possible, avoid freeing buffers allocated for vdbe memory cells in case they can be reused. (CVS 4783) (check-in: [990237e27e] user: danielk1977 branch: trunk, size: 126315)
2008-02-06
23:52
[394aa3542e] part of check-in [e9fcb79399] Do not release registers used to hold the results of a compound select after just the first select has run. Ticket #2927. For now, we will never release the registers used to hold the result set, since the same register set will be used for each select. This is not an unacceptable register leak and it is the safest approach. (CVS 4778) (check-in: [e9fcb79399] user: drh branch: trunk, size: 126303)
2008-01-25
15:04
[1a5d0aaf8f] part of check-in [50815a82e0] Error messages says "no such view" instead of "no such table" when trying to DROP a VIEW that does not exist. (CVS 4750) (check-in: [50815a82e0] user: drh branch: trunk, size: 126570)
2008-01-24
14:27
[00adbc4fbb] part of check-in [c6635a71db] Fix a segfault that may follow a malloc failure during compilation of an INSTEAD OF trigger. (CVS 4749) (check-in: [c6635a71db] user: danielk1977 branch: trunk, size: 126576)
2008-01-23
17:13
[cf9243f67f] part of check-in [9d98a3f0dd] Fix another segfault that can occur following a malloc failure in the SQL compiler. (CVS 4748) (check-in: [9d98a3f0dd] user: danielk1977 branch: trunk, size: 126561)
15:44
[8aa0f336af] part of check-in [6bd8db3839] Fix a couple of segfaults that could occur after a malloc() failure in the SQL compiler. (CVS 4747) (check-in: [6bd8db3839] user: danielk1977 branch: trunk, size: 126540)
14:51
[9c273d069d] part of check-in [45c59802f6] Testing coverage enhancements to sqlite3_get_table() and to the SELECT code generator. (CVS 4746) (check-in: [45c59802f6] user: drh branch: trunk, size: 126498)
2008-01-19
03:35
[9fb094cc0c] part of check-in [d9ebe9d78c] Cleanup and simplification of constraint processing. Simplifications to the VM for better test coverage. (CVS 4729) (check-in: [d9ebe9d78c] user: drh branch: trunk, size: 127024)
2008-01-17
17:15
[d9a394a256] part of check-in [5ba4e5adf6] Reuse registers better in the inner loop of a SELECT statement. (CVS 4719) (check-in: [5ba4e5adf6] user: drh branch: trunk, size: 127090)
16:22
[fb2d665395] part of check-in [706b41b70b] Registerification of the VDBE is complete. The operand stack has been removed from the code. All instructions operate out of registers only. (CVS 4718) (check-in: [706b41b70b] user: drh branch: trunk, size: 126597)
02:36
[841eba5f83] part of check-in [b3a141b2b0] Registerification of the WHERE clause logic. (CVS 4716) (check-in: [b3a141b2b0] user: drh branch: trunk, size: 126310)
2008-01-15
02:22
[578f7b0104] part of check-in [a13d3e953f] Fix for a couple of minor memory leaks. (CVS 4712) (check-in: [a13d3e953f] user: drh branch: trunk, size: 126310)
2008-01-13
19:02
[16ba6ec0b3] part of check-in [23181f8689] Fix some issues with out-of-memory recovery. (CVS 4710) (check-in: [23181f8689] user: drh branch: trunk, size: 126329)
2008-01-12
21:35
[34c138d907] part of check-in [110c000d86] The sqlite3_trace() callback now prints a message as each trigger fires within a statement. (CVS 4709) (check-in: [110c000d86] user: drh branch: trunk, size: 126308)
19:03
[fc9cebb203] part of check-in [426f31ecdd] Continuing work toward converting the VM to a register machine. (CVS 4708) (check-in: [426f31ecdd] user: drh branch: trunk, size: 126218)
12:48
[9e3c65ca3d] part of check-in [a6dddebcc5] Continuing work toward converting the VM into a register machine. (CVS 4707) (check-in: [a6dddebcc5] user: drh branch: trunk, size: 126414)
2008-01-10
23:50
[ff00897172] part of check-in [8cbd46517f] More work toward converting the VM into a register-based machine. (CVS 4704) (check-in: [8cbd46517f] user: drh branch: trunk, size: 126351)
03:46
[095296a572] part of check-in [173698c963] Continuing work toward registerizing the code generator. (CVS 4703) (check-in: [173698c963] user: drh branch: trunk, size: 131645)
2008-01-09
23:04
[7b88e17052] part of check-in [e3cf1c1c11] All essential opcodes can now operate out of registers and completely avoid the stack. Many still optionally use the stack to support legacy code generation, but the stack is not required. The next step is to update all code generation to avoid using the stack. (CVS 4700) (check-in: [e3cf1c1c11] user: drh branch: trunk, size: 130688)
02:15
[8570d4db93] part of check-in [92deff07bb] Continued work toward converting to a register-based VM. (CVS 4698) (check-in: [92deff07bb] user: drh branch: trunk, size: 131524)
2008-01-08
23:54
[d6bdf86c76] part of check-in [8862ce9cee] Registerify the comparison opcodes. (CVS 4697) (check-in: [8862ce9cee] user: drh branch: trunk, size: 131620)
2008-01-07
19:20
[1162f736db] part of check-in [aa48867cfa] Registerify the AUTOINCREMENT processing and the OP_IsNull and OP_NotNull operators. (CVS 4692) (check-in: [aa48867cfa] user: drh branch: trunk, size: 131546)
10:16
[31faeb6199] part of check-in [38020592f1] Comment changes in select.c. (CVS 4691) (check-in: [38020592f1] user: danielk1977 branch: trunk, size: 131488)
2008-01-06
00:25
[3dc81bc22d] part of check-in [8201f71729] Registerify the SRT_Subroutine destination for SELECT results. (CVS 4690) (check-in: [8201f71729] user: drh branch: trunk, size: 130190)
2008-01-05
18:48
[faf793d135] part of check-in [6bb1b1bc18] Modify OP_RegMakeRec to take a base register and count and optionally store results in the register specified by P3. (CVS 4689) (check-in: [6bb1b1bc18] user: drh branch: trunk, size: 129950)
18:44
[fcde4b33ef] part of check-in [2b98b0fca8] Fix a memory leak introduced with #4687. (CVS 4688) (check-in: [2b98b0fca8] user: danielk1977 branch: trunk, size: 129940)
17:39
[33c60380c8] part of check-in [c449e04f18] First pass at optimizing max()/min() as described in #2853. Some refinements to come. (CVS 4687) (check-in: [c449e04f18] user: danielk1977 branch: trunk, size: 129843)
05:20
[102eb03b6d] part of check-in [3e8a07dd3c] Register-ify the OP_AddImm and all casting opcodes. Omit the OP_MemIncr opcode. (CVS 4683) (check-in: [3e8a07dd3c] user: drh branch: trunk, size: 128297)
04:06
[1a6664131f] part of check-in [cc149eb9ca] Get rid of OP_Dup, OP_MemStore, OP_MemLoad, and OP_MemMove. Replace with OP_Copy, OP_SCopy, and OP_Move. Add the infrastructure for operation properties in1, in2, in3, out2, and out3 but do not yet use any of these. (CVS 4682) (check-in: [cc149eb9ca] user: drh branch: trunk, size: 128301)
2008-01-04
22:01
[30110ce6ce] part of check-in [fe057a88d0] Implement the out2-prerelease opcode design pattern. (CVS 4681) (check-in: [fe057a88d0] user: drh branch: trunk, size: 128316)
2008-01-03
23:44
[62b9cfb2c7] part of check-in [61bfb77c42] Change the sqlite3ExprCode() function so that callers can request that the result of the expression be left on the stack or in a register. (CVS 4673) (check-in: [61bfb77c42] user: drh branch: trunk, size: 128321)
18:44
[6aec65bf2d] part of check-in [4f3967073d] Update OP_Rowid, OP_Column and related opcodes to use registers. (CVS 4671) (check-in: [4f3967073d] user: drh branch: trunk, size: 128348)
18:03
[dae0e2ed88] part of check-in [0b849805c3] Registers (aka memory cells) in the VM are now numbered starting with 1 instead of 0. A register number of 0 means "no such register". (CVS 4669) (check-in: [0b849805c3] user: drh branch: trunk, size: 128347)
09:51
[539a71c9b3] part of check-in [46501f490a] Change the OP_Insert opcode to read the key and data to insert from memory cells, not the stack. (CVS 4666) (check-in: [46501f490a] user: danielk1977 branch: trunk, size: 128346)
07:54
[1f8579efbb] part of check-in [35da261daf] Change OP_OpenRead and OP_OpenWrite so that the database number is read from the P3 operand, not the stack. (CVS 4663) (check-in: [35da261daf] user: danielk1977 branch: trunk, size: 128364)
00:01
[fb57c9f49f] part of check-in [027875e4d4] Refactoring the VM. The P3 parameter is changed to P4. A P5 parameter is added (though not currently used.) Add routines sqlite3VdbeAddOpX() where X is one of 0, 1, 2, 3, or 4. (CVS 4660) (check-in: [027875e4d4] user: drh branch: trunk, size: 128400)
2008-01-02
17:11
[cc4064f931] part of check-in [fbd17a8976] Minor optimizations for sub-selects in EXISTS(...) expressions: Discard any DISTINCT or ORDER BY clauses and do not calculate any column values. (CVS 4658) (check-in: [fbd17a8976] user: danielk1977 branch: trunk, size: 128157)
16:27
[6a3790a03f] part of check-in [86dcdfe6d7] Combine the eDest and iParm arguments to sqlite3Select() into a single type - "SelectDest". (CVS 4657) (check-in: [86dcdfe6d7] user: danielk1977 branch: trunk, size: 127717)
14:28
[c0a225dc31] part of check-in [4c7f35da77] Add opcodes OP_ResultRow and OP_RegMakeRec which are register-based equivalents to OP_Callback and OP_MakeRecord. Use the new opcodes. (CVS 4656) (check-in: [4c7f35da77] user: drh branch: trunk, size: 126798)
00:34
[55b1a99e1d] part of check-in [051ec01f27] Begin setting a foundation on which to convert the VM from a stack-based to a register-based machine. Everything is still mostly stack based with this check-in. This change merely begins adding infrastructure to support a register-based architecture. (CVS 4652) (check-in: [051ec01f27] user: drh branch: trunk, size: 125640)
2008-01-01
19:02
[247d668f5b] part of check-in [e08a33ed72] Optimize trigger compilation to avoid populating the OLD.* and NEW.* pseudo-tables with data that will never be used. Some testing to come. (CVS 4651) (check-in: [e08a33ed72] user: danielk1977 branch: trunk, size: 125682)
2007-12-14
17:24
[5a13702741] part of check-in [4a00805014] Fix a C++-ism in recent changes to select.c. (CVS 4633) (check-in: [4a00805014] user: drh branch: trunk, size: 124697)
16:11
[bb0a08eceb] part of check-in [86f45d7bb6] Fix a typo in the previous check-in. Also simplify a line in select.c. (CVS 4631) (check-in: [86f45d7bb6] user: drh branch: trunk, size: 124696)
2007-12-13
21:54
[e8cfdc85ef] part of check-in [4e91a267fe] Change all instances of "it's" in comments to either "its" or "it is", as appropriate, in case the comments are ever again read by a pedantic grammarian. Ticket #2840. (CVS 4629) (check-in: [4e91a267fe] user: drh branch: trunk, size: 124731)
19:15
[7eedf1fc81] part of check-in [993a213024] Fix a memory leak that can occur following a malloc() failure. (CVS 4628) (check-in: [993a213024] user: danielk1977 branch: trunk, size: 124740)
07:58
[14c4a8e9d7] part of check-in [2f88b9b3e3] Adjust the test suite to account for recent changes related to #2822. Most changes are related to English language error messages only. (CVS 4622) (check-in: [2f88b9b3e3] user: danielk1977 branch: trunk, size: 124714)
03:45
[c2de6d7ba6] part of check-in [56063ec84b] ORDER BY in a compound SELECT will first match against the left-most SELECT. If there is no match there, it begins working its way to the right. (CVS 4621) (check-in: [56063ec84b] user: drh branch: trunk, size: 124706)
02:45
[63cc67c9a9] part of check-in [bbddf16ac9] Towards getting ORDER BY to match against the correctin columns. This version only looks at the left-most column in a compound SELECT. That is the correct thing to do, but not what SQLite has historically done. (CVS 4620) (check-in: [bbddf16ac9] user: drh branch: trunk, size: 123953)
2007-12-10
18:51
[b7408624b5] part of check-in [0d9b0e6e3a] Further modifications to do with ORDER BY and compound SELECT queries. Related to ticket #2822. (CVS 4606) (check-in: [0d9b0e6e3a] user: danielk1977 branch: trunk, size: 121482)
2007-12-08
21:10
[2c08239b55] part of check-in [62a78d212c] Better resolution of ORDER BY terms in compound queries. Candidate solution for ticket #2822. Needs more testing and documentation before going final. (CVS 4602) (check-in: [62a78d212c] user: drh branch: trunk, size: 122487)
2007-11-23
13:42
[7c0ab94b8f] part of check-in [596694752c] Avoid a double-free in an out-of-memory situation with a USING clause or NATURAL JOIN. Ticket #2789. (CVS 4551) (check-in: [596694752c] user: drh branch: trunk, size: 121634)
2007-11-21
15:24
[963e2b68f7] part of check-in [2655a3f2d1] Handle out-of-memory situations inside the query flattener. Ticket #2784. (CVS 4549) (check-in: [2655a3f2d1] user: drh branch: trunk, size: 121663)
2007-11-12
15:40
[aef87a179e] part of check-in [cf41d6a00f] Fix a code comment in select.c. No code changes. (CVS 4539) (check-in: [cf41d6a00f] user: danielk1977 branch: trunk, size: 121434)
15:29
[19fb48509a] part of check-in [e563312347] Where possible, transform the DISTINCT qualifier to a GROUP BY clause. GROUP BY clauses may be optimized by indices, DISTINCT qualifiers cannot. (CVS 4538) (check-in: [e563312347] user: danielk1977 branch: trunk, size: 121372)
2007-08-31
17:42
[4706a6115d] part of check-in [d119427314] Allow sqllimits1.test to be run from a regular build of testfixture. Add the 'amalgamation-testfixture' target to main.mk - to build testfixture via sqlite3.c. (CVS 4354) (check-in: [d119427314] user: danielk1977 branch: trunk, size: 121069)
2007-08-30
11:48
[e5cc50e8d2] part of check-in [d3e5022638] Fixes for failures in fuzz_malloc.test. (CVS 4334) (check-in: [d3e5022638] user: danielk1977 branch: trunk, size: 121021)
2007-08-29
12:31
[c8045b76f4] part of check-in [e38ef81b85] Modifications to the malloc failure tests to test transient and persistent failures. (CVS 4321) (check-in: [e38ef81b85] user: danielk1977 branch: trunk, size: 120983)
2007-08-16
10:09
[98c367bce3] part of check-in [77b1671351] More work on refactoring of malloc() interfaces. There are still many errors. (CVS 4233) (check-in: [77b1671351] user: danielk1977 branch: trunk, size: 120953)
04:30
[4df152ea0c] part of check-in [deb7ecd65f] Half-way through a major refactoring of the memory allocation. I have not even attempted to compile so I am certain there are countless errors. (CVS 4231) (check-in: [deb7ecd65f] user: drh branch: trunk, size: 120790)
2007-07-18
18:17
[3b167744fc] part of check-in [a80a3c9d0a] Get the min/max optimization working with descending indices. Ticket #2514. (CVS 4161) (check-in: [a80a3c9d0a] user: drh branch: trunk, size: 119455)
2007-06-26
10:38
[e363327d0e] part of check-in [7f887a6a00] Allow virtual tables to mark columns as 'hidden'. Hidden columns do not show up in "*" expansion, the implicit column list of an INSERT statement, or the results of a "PRAGMA table_info" statement. (CVS 4127) (check-in: [7f887a6a00] user: danielk1977 branch: trunk, size: 119171)
2007-06-24
06:32
[2ee53f929f] part of check-in [d5b7224f37] When expanding '*' in the result set of a SELECT, quote the expanded identifiers. Fix for #2450. (CVS 4111) (check-in: [d5b7224f37] user: danielk1977 branch: trunk, size: 118852)
2007-06-15
15:31
[33a258fc9c] part of check-in [1d10a48934] Fix a memory leak that was discovered by the tests that were added to cover ticket #2339. (CVS 4069) (check-in: [1d10a48934] user: drh branch: trunk, size: 118432)
2007-06-07
10:55
[a96d80c049] part of check-in [0d71ad4591] Add the SQLITE_MAX_COMPOUND_SELECT compile-time parameter for limiting the number of terms in a compound select statement. Set the default limit to 100. (CVS 4046) (check-in: [0d71ad4591] user: drh branch: trunk, size: 118241)
2007-05-31
08:20
[6d40db6c1f] part of check-in [d2282e64f1] Extend out-of-memory testing with fuzzily generated sql some. One fix for a problem found by the same. (CVS 4044) (check-in: [d2282e64f1] user: danielk1977 branch: trunk, size: 118051)
2007-05-14
16:50
[c10b98aecc] part of check-in [af76928fc5] Fix a problem with ORDER BY and compound SELECT queries. (CVS 3995) (check-in: [af76928fc5] user: danielk1977 branch: trunk, size: 117990)
15:49
[0075d98428] part of check-in [1c33829c9e] Fix a bug in "flattening" optimization. Occured if the parent of the flattened sub-query is also the parent of a sub-query that uses a compound op (i.e. UNION, INTERSECT etc.). (CVS 3994) (check-in: [1c33829c9e] user: danielk1977 branch: trunk, size: 117988)
14:05
[f3e6058cef] part of check-in [b1d1b16e98] Prevent sub-queries with "LIMIT 0" from leaving an extra value on the vdbe stack. Also updates to fuzz.test. (CVS 3993) (check-in: [b1d1b16e98] user: danielk1977 branch: trunk, size: 117946)
11:34
[3f563bb096] part of check-in [5627ff74be] Remove terms with operator TK_AS from the expression tree. Ticket #2356. (CVS 3991) (check-in: [5627ff74be] user: drh branch: trunk, size: 117890)
2007-05-10
10:46
[d43bbdedb8] part of check-in [2c9c94a24d] Add code to enforce the MAX_EXPR_DEPTH limit. (CVS 3968) (check-in: [2c9c94a24d] user: danielk1977 branch: trunk, size: 118130)
2007-05-09
22:56
[87bcf7406a] part of check-in [66954bdd81] Make sure compound queries inside a subquery only return a single result column. Ticket #2347. (CVS 3967) (check-in: [66954bdd81] user: drh branch: trunk, size: 117595)
2007-05-08
13:58
[114e7ebaa2] part of check-in [c59d436095] Add more code to enforce the limits specified in limits.h. (CVS 3946) (check-in: [c59d436095] user: drh branch: trunk, size: 117080)
2007-05-06
20:04
[a306d03fc7] part of check-in [9600a99804] Do not flatten subqueries that are part of a compound SELECT and which have both an ORDER BY and a LIMIT clause. Ticket #2339. (CVS 3932) (check-in: [9600a99804] user: drh branch: trunk, size: 116802)
2007-05-04
13:15
[e6a2546de6] part of check-in [ba4845b32b] Eliminate all uses of sprintf() and strcpy(). These were not being misused. But getting rid of them removes a library dependency. And it avoids warnings from the OpenBSD compiler. Ticket #2336. (CVS 3916) (check-in: [ba4845b32b] user: drh branch: trunk, size: 116493)
2007-05-03
13:02
[3c8f3bc7fd] part of check-in [678d672b73] Use memmove() instead of memcpy() when moving between memory regions that might overlap. Ticket #2334. (CVS 3905) (check-in: [678d672b73] user: drh branch: trunk, size: 116469)
2007-04-16
17:07
[b914abca0b] part of check-in [cdc7608b8d] Fix a memory leak introduced by (3842) associated with ticket #2296. (CVS 3848) (check-in: [cdc7608b8d] user: drh branch: trunk, size: 115508)
15:06
[f120e92719] part of check-in [8d6c3bfc4d] Ensure sqlite3_finalize() can be called from within the xDisconnect() method of virtual tables. (CVS 3845) (check-in: [8d6c3bfc4d] user: danielk1977 branch: trunk, size: 115468)
2007-04-13
16:06
[4fa2b45a9c] part of check-in [cfc6f933dc] Match ORDER BY terms to columns using names in compound queries. Make sure this works for subqueries, especially in the right-hand side of an IN operator. Ticket #2296. (CVS 3842) (check-in: [cfc6f933dc] user: drh branch: trunk, size: 115466)
2007-04-12
21:25
[bd1742051f] part of check-in [0dd3e2e47b] Changes toward fixes for tickets #2296 and #2291. (CVS 3838) (check-in: [0dd3e2e47b] user: drh branch: trunk, size: 115415)
03:54
[e61a72f8ea] part of check-in [4062ddf3c7] Get the column affinities right when processing an IN operator where the right-hand side is a subquery with an ORDER BY clause. Ticket #2295. This bug has likely been present since version 3.0.0 and it has just now been noticed, so it seems to be a obscure case. (CVS 3837) (check-in: [4062ddf3c7] user: drh branch: trunk, size: 115355)
2007-04-06
01:04
[6d6e7c992f] part of check-in [fd4da6b134] Changes to increase test coverage. (CVS 3819) (check-in: [fd4da6b134] user: drh branch: trunk, size: 115385)
2007-04-01
23:49
[41b1997441] part of check-in [18aec1ddfb] Fix some warnings about unused and uninitialized variables. (CVS 3788) (check-in: [18aec1ddfb] user: drh branch: trunk, size: 115409)
2007-03-29
05:51
[30af458c6a] part of check-in [ad4a6b1a91] Change BtreeMoveto so that it can be biased to the right or to the center. Use a right bias when appending and a center bias when searching. This gives about a 15% reduction in calls to sqlite3VdbeRecordCompare. (CVS 3741) (check-in: [ad4a6b1a91] user: drh branch: trunk, size: 115405)
2007-03-02
07:27
[4d68a0d7f9] part of check-in [ddb4d0af57] Disable the "SELECT max(rowid) ..." optimization for virtual tables. Ticket #2250. (CVS 3669) (check-in: [ddb4d0af57] user: danielk1977 branch: trunk, size: 115389)
2007-02-24
13:23
[6a090150d6] part of check-in [6fc1827523] Make sure the INSERT xfer optimization does not trigger if the CHECK constraints on the two tables are not identical. Ticket #2252. (CVS 3660) (check-in: [6fc1827523] user: drh branch: trunk, size: 115285)
11:52
[7808a4079c] part of check-in [e11bbf174c] Make sure that integer values are converted to real when pulled from a REAL table column by GROUP BY. Ticket #2251. Also make sure default values are correctly expanded. There may be other places in the code where this issue comes up - we need to look further. (CVS 3659) (check-in: [e11bbf174c] user: drh branch: trunk, size: 115248)
2007-02-14
09:19
[05081fdfdb] part of check-in [cb78f7cb0f] Use OP_VColumn instead of OP_Column when querying virtual tables for values to save in aggregate context records. #2230. (CVS 3644) (check-in: [cb78f7cb0f] user: danielk1977 branch: trunk, size: 115475)
2007-02-01
23:02
[63b2163f35] part of check-in [85cca7cd25] First cut at adding the COLLATE operator. Regression tests pass (or at least the quick set does) and a few new tests have been added. But many more tests are needed. Rules for combining collations need to be worked out. (CVS 3624) (check-in: [85cca7cd25] user: drh branch: trunk, size: 115363)
2007-01-26
19:23
[628f49827d] part of check-in [1b26d68756] Add code to select.c for printing the contents of parse-tree structures. The code is normally omitted. You must compile with -DSQLITE_TEST or -DSQLITE_DEBUG to enable it. (CVS 3606) (check-in: [1b26d68756] user: drh branch: trunk, size: 115570)
19:04
[d46aceb4eb] part of check-in [942e7193bb] Fix a (harmless) assertion fault on nested views where the inner views are compound selects. Ticket #2192. (CVS 3605) (check-in: [942e7193bb] user: drh branch: trunk, size: 112560)
2006-12-16
16:25
[52f09127b5] part of check-in [7393c81b8c] Query optimizer enhancement: In "FROM a,b,c left join d" allow the C table to be reordered with A and B. This used to be the case but the capability was removed by (3203) and (3052) in response to ticket #1652. This change restores the capability. (CVS 3529) (check-in: [7393c81b8c] user: drh branch: trunk, size: 112523)
2006-10-13
15:34
[6ba6d8ead4] part of check-in [b886eaa334] Make sure the names of all expressions in compound SELECT statements used as subqueries are correctly resolved. Ticket #2018. (CVS 3477) (check-in: [b886eaa334] user: drh branch: trunk, size: 112561)
2006-09-29
14:01
[e247a5e1ea] part of check-in [fcde639119] Make sure memory does not leak when patching up column names so that they are unique in a join or view. Tickets #1952 and #2002. (CVS 3451) (check-in: [fcde639119] user: drh branch: trunk, size: 112366)
2006-08-11
19:08
[0d4724930a] part of check-in [924ea730f4] Make sure sufficient memory is allocated to hold the collating sequence pointers for all columns of an ORDER BY clause even if the ORDER BY clause contains more columns than where originally in the table. Ticket #1911. (CVS 3344) (check-in: [924ea730f4] user: drh branch: trunk, size: 112409)
2006-07-11
13:15
[aeec8efbe8] part of check-in [b1f326e695] Prevent memory leak and possible NULL pointer deference after malloc failure. Ticket #1886. (CVS 3329) (check-in: [b1f326e695] user: drh branch: trunk, size: 112274)
2006-06-21
07:02
[380fa06c99] part of check-in [643e63e588] Fix a problem with virtual tables and joins. (CVS 3278) (check-in: [643e63e588] user: danielk1977 branch: trunk, size: 112186)
2006-06-20
13:07
[6dd3fdfeae] part of check-in [3e19a7d8ea] Fix some problems with virtual tables and joins in where.c. (CVS 3277) (check-in: [3e19a7d8ea] user: danielk1977 branch: trunk, size: 112154)
11:01
[668ab7cf8b] part of check-in [c6ea353bd9] Modifications so that compilation and testing with the various OMIT macros defined works. (CVS 3276) (check-in: [c6ea353bd9] user: danielk1977 branch: trunk, size: 112090)
2006-06-16
21:13
[c1965c6364] part of check-in [2119e7bf55] Rework the way UPDATE works for virtual tables. (CVS 3262) (check-in: [2119e7bf55] user: drh branch: trunk, size: 112124)
2006-06-11
23:41
[38eda11d95] part of check-in [898ec36b41] Progress toward CREATE VIRTUAL TABLE. Still not even close to working... (CVS 3211) (check-in: [898ec36b41] user: drh branch: trunk, size: 112096)
2006-04-26
17:39
[8daba07a04] part of check-in [7f3ef7ddba] Get LIMIT 0 working on subqueries. Ticket #1784. (CVS 3177) (check-in: [7f3ef7ddba] user: drh branch: trunk, size: 112084)
2006-04-11
14:16
[cb5d86615e] part of check-in [d83e0230c0] Allow constant terms in the ORDER BY or GROUP BY clauses. Ticket #1768. (CVS 3173) (check-in: [d83e0230c0] user: drh branch: trunk, size: 112084)
2006-04-07
13:50
[3519dc6458] part of check-in [e64809f0ae] Return the correct declared column type, origin column name, origin database name, etc. from aggregate queries. Ticket #1726 and #1755. (CVS 3169) (check-in: [e64809f0ae] user: drh branch: trunk, size: 112240)
2006-03-26
01:21
[ca8ee9b54a] part of check-in [80cda9f7ce] SQLite now always chooses the column names for compound selects using the left-most select. This makes SQLite work like other SQL database, but it also is a change from historical behavior and may break some scripts. Ticket #1721. (CVS 3153) (check-in: [80cda9f7ce] user: drh branch: trunk, size: 112216)
2006-03-17
13:56
[eefb46a67c] part of check-in [8f60139f68] Miscellaneous code cleanup. (CVS 3143) (check-in: [8f60139f68] user: drh branch: trunk, size: 111978)
00:04
[c95d5cd433] part of check-in [6b3717aeb4] Much faster sorting when there are a large number of columns in the result set. (CVS 3141) (check-in: [6b3717aeb4] user: drh branch: trunk, size: 112530)
2006-03-09
17:28
[38203fd285] part of check-in [36830fafa4] Correct names returned from a query against a view. Ticket #1709, #1688, #1711. (CVS 3128) (check-in: [36830fafa4] user: drh branch: trunk, size: 112126)
2006-03-06
20:55
[c196faee62] part of check-in [e510e6dd9d] Code changes resulting from Coverity analysis. http://scan.coverity.com/ Found 1 potential segfault in sqlite3_mprintf(). Also 2 failures to fclose() following a malloc() failure. And lots of cases where unnecessary conditionals could be removed from the code. (CVS 3126) (check-in: [e510e6dd9d] user: drh branch: trunk, size: 112126)
2006-02-24
02:53
[46e1d5bf79] part of check-in [4b22e4b847] Remove unused parameters on internal APIs. Suppress warnings from CodeWarrior. (CVS 3110) (check-in: [4b22e4b847] user: drh branch: trunk, size: 112058)
2006-02-10
07:07
[7d069e875d] part of check-in [5e8611e13d] Fix the origin APIs so that they correctly handle views and subqueries that cannot be flattened. (CVS 3072) (check-in: [5e8611e13d] user: danielk1977 branch: trunk, size: 112184)
03:06
[7ed6f28cdc] part of check-in [6ebb8f9bb2] Add a symbol P3_TRANSIENT to pass to VdbeSetColName() to make it copy the string parameter up to the first 0 byte. (CVS 3070) (check-in: [6ebb8f9bb2] user: danielk1977 branch: trunk, size: 112198)
02:27
[ace67e13cd] part of check-in [82f502cdc1] Add the column_origin_name() etc. APIs. (CVS 3069) (check-in: [82f502cdc1] user: danielk1977 branch: trunk, size: 112502)
2006-01-24
12:09
[daee9b2070] part of check-in [d86f18a427] Rename some variables to avoid hiding others. Also add "static" to two function signatures that were missing it. (CVS 3024) (check-in: [d86f18a427] user: danielk1977 branch: trunk, size: 109184)
2006-01-23
18:42
[8b3ffcb68f] part of check-in [4f56949bd6] Bug fix in cases where a compound select has an ORDER BY clause with multiple terms. (CVS 3011) (check-in: [4f56949bd6] user: drh branch: trunk, size: 109149)
2006-01-22
21:52
[11ad28afb3] part of check-in [3e1e6affe2] Performance optimization in btree.c. (CVS 2990) (check-in: [3e1e6affe2] user: drh branch: trunk, size: 109150)
00:42
[bdfc4b1615] part of check-in [3c2eee5e1f] Code size reductions in select.c. (CVS 2989) (check-in: [3c2eee5e1f] user: drh branch: trunk, size: 109151)
2006-01-21
22:19
[4e9072092d] part of check-in [af18c0f431] Do not flatten subqueries in a join where the subquery includes a LIMIT. Ticket #1634. This is just an initial fix. Many test cases need to be added prior to closing the ticket. (CVS 2987) (check-in: [af18c0f431] user: drh branch: trunk, size: 109176)
2006-01-20
18:10
[7a7f4f73a1] part of check-in [507653a98c] More compiler warnings fixed - or in some cases comments are added to explain that the compiler is wrong. (CVS 2984) (check-in: [507653a98c] user: drh branch: trunk, size: 108246)
2006-01-18
16:51
[e80ac3438d] part of check-in [ac090f2ab3] Use a global variable protected by a mutex instead of thread-specific-data to record malloc() failures. (CVS 2972) (check-in: [ac090f2ab3] user: danielk1977 branch: trunk, size: 108246)
2006-01-13
06:33
[28d449c776] part of check-in [dd70595542] Minor modification to restoreOrClearCursorPosition() to improve efficiency. Do not allocate the extra 8-bytes if memory-management is not enabled. (CVS 2936) (check-in: [dd70595542] user: danielk1977 branch: trunk, size: 108351)
2006-01-11
21:41
[7b19d350cb] part of check-in [5d9c6aa964] Automatically deallocate thread-specific data when it is no longer being used. Ticket #1601. Also implemented the suggestion of ticket #1603. Memory management is now off by default at compile-time. The sqlite3_enable_memory_management() API has been removed. (CVS 2919) (check-in: [5d9c6aa964] user: drh branch: trunk, size: 108344)
2006-01-10
17:58
[579cfdd250] part of check-in [0f0213be4d] Store collation sequence names instead of pointers in sharable schema data structures. (CVS 2904) (check-in: [0f0213be4d] user: danielk1977 branch: trunk, size: 108289)
2006-01-09
16:12
[acfeda959f] part of check-in [3e75d3d5ef] Fix some errors to do with attached databases and text encodings in shared-cache mode. (CVS 2895) (check-in: [3e75d3d5ef] user: danielk1977 branch: trunk, size: 108186)
06:29
[d97a43973d] part of check-in [82b81f69c7] Rename DbSchema to "Schema" and SqliteTsd to "ThreadData". (CVS 2893) (check-in: [82b81f69c7] user: danielk1977 branch: trunk, size: 108145)
00:09
[72b7b83fbf] part of check-in [32998fe8ed] Remove benign reference to an uninitialized variable. Ticket #1590. (CVS 2890) (check-in: [32998fe8ed] user: drh branch: trunk, size: 108102)
2006-01-08
18:10
[48d3ecfb1b] part of check-in [b2ac0be07e] Get LIMIT and OFFSET working again for negative limits and offsets. Ticket #1586. (CVS 2889) (check-in: [b2ac0be07e] user: drh branch: trunk, size: 108105)
05:02
[ad632ffd92] part of check-in [55e703ecac] Reduce memory requirements for ORDER BY combined with LIMIT. Ticket #1586. (CVS 2887) (check-in: [55e703ecac] user: drh branch: trunk, size: 107750)
2006-01-07
13:21
[77bcb71f60] part of check-in [23b587b05b] In shared-cache mode, lock all required tables before beginning to execute the body of the statement program. (CVS 2881) (check-in: [23b587b05b] user: danielk1977 branch: trunk, size: 106943)
2006-01-05
14:22
[a60e5c7fad] part of check-in [5dec3a392b] Fix for ticket #1582 (Double delete of invalid LIMIT clause Expr* applied to a UNION ALL query). (CVS 2861) (check-in: [5dec3a392b] user: danielk1977 branch: trunk, size: 106873)
11:34
[7a78520fcd] part of check-in [deeda0dc06] Add the shared schema/pager modifications. Very few tests so far. (CVS 2859) (check-in: [deeda0dc06] user: danielk1977 branch: trunk, size: 106873)
2006-01-03
15:16
[5b0ccd6688] part of check-in [837dc77ff9] Always case 0 to (char*) on varargs functions. Otherwise there are problems on 64-bit machines. (CVS 2854) (check-in: [837dc77ff9] user: drh branch: trunk, size: 106760)
2005-12-09
20:02
[2292b065bc] part of check-in [83a5915155] Clean up annoying (and pointless) compiler warnings about differing signedness. (CVS 2810) (check-in: [83a5915155] user: drh branch: trunk, size: 106753)
2005-12-06
12:52
[0e4d3627fe] part of check-in [e1606658f1] Some elements of the new malloc() failure handling. Not all cases work properly yet. Also, library is not threadsafe if malloc() fails right now. (CVS 2800) (check-in: [e1606658f1] user: danielk1977 branch: trunk, size: 106716)
2005-11-16
13:47
[4a9e5366f4] part of check-in [b3882b434a] Fix a problem with the sorting of literals in a compound query. Ticket #1501. (CVS 2770) (check-in: [b3882b434a] user: drh branch: trunk, size: 106610)
2005-11-14
22:29
[095d5b7a9c] part of check-in [ce06c123d0] Create separate affinities for INTEGER and REAL. (CVS 2766) (check-in: [ce06c123d0] user: drh branch: trunk, size: 106610)
2005-11-03
00:41
[be02f123e8] part of check-in [2313d912ba] First cut at supporting CHECK constraints. Everything appears to work, but much more testing is needed as well as documentation. (CVS 2754) (check-in: [2313d912ba] user: drh branch: trunk, size: 106610)
2005-10-06
16:53
[80c95f3ceb] part of check-in [edca8913ca] More efficient handling of the LIMIT clause. Scalar subqueries and EXISTS on compound SELECT statements now working properly. Ticket #1473. (CVS 2747) (check-in: [edca8913ca] user: drh branch: trunk, size: 106703)
2005-09-20
18:13
[034c7f7447] part of check-in [655e75ac7d] Add VM code comments on the group-by processing. Extra group-by test case. (CVS 2731) (check-in: [655e75ac7d] user: drh branch: trunk, size: 105991)
17:42
[240f456bc8] part of check-in [2471957fee] Code cleanup and simplification. Three new Mem opcodes added. The sqlite3VdbeJumpHere function added. (CVS 2730) (check-in: [2471957fee] user: drh branch: trunk, size: 105486)
13:55
[4a5271874f] part of check-in [f22d0f64a0] Cleanup the implementation and the documentation of the new 0x200 P1 flag on the VDBE comparison operands. (CVS 2729) (check-in: [f22d0f64a0] user: drh branch: trunk, size: 105767)
13:12
[52b72b7fe1] part of check-in [d9b0c97053] NULLs compare equal to each other when computing GROUP BY categories. (CVS 2728) (check-in: [d9b0c97053] user: drh branch: trunk, size: 105767)
2005-09-19
21:05
[c3fe1994da] part of check-in [ea10f9785e] ON-clause terms in a LEFT JOIN that restrict only the left table, should not really restrict the left table but instead rows that fail to meet the condition to be joined with NULL rows from the right table. (CVS 2725) (check-in: [ea10f9785e] user: drh branch: trunk, size: 105415)
17:35
[459fb935f1] part of check-in [6cc57fcf15] Do not optimize views with an ORDER BY clause if they are used in a UNION ALL that also has an ORDER BY clause. Ticket #1444. (CVS 2723) (check-in: [6cc57fcf15] user: drh branch: trunk, size: 104393)
15:37
[2d6a485a3f] part of check-in [92126a2161] Fix uninitialized value on a UNION ALL select with an ORDER BY clause. (CVS 2722) (check-in: [92126a2161] user: drh branch: trunk, size: 104329)
2005-09-12
23:03
[9ef1dddd43] part of check-in [37116550d3] Bug fix in the new COUNT(DISTINCT) logic. Ticket #1420. (CVS 2689) (check-in: [37116550d3] user: drh branch: trunk, size: 104287)
2005-09-11
11:56
[67653a6fe6] part of check-in [2f397bd814] COUNT(DISTINCT x) is now fully functional, though it could benefit from additional testing. (CVS 2688) (check-in: [2f397bd814] user: drh branch: trunk, size: 104287)
2005-09-10
15:28
[a255ca7edd] part of check-in [415b8b2462] Use of the CROSS keyword in a join prevents table reordering. Ticket #1414. (CVS 2683) (check-in: [415b8b2462] user: drh branch: trunk, size: 102865)
2005-09-08
12:57
[2bba89bb64] part of check-in [0c3e368d47] Aggregates with GROUP BY can sometimes return no result rows. (CVS 2674) (check-in: [0c3e368d47] user: drh branch: trunk, size: 102840)
01:58
[7e52f53ccf] part of check-in [7283f7c29d] Optimizations and refinements. Improvements to test coverage. (CVS 2667) (check-in: [7283f7c29d] user: drh branch: trunk, size: 102834)
00:13
[5f4a9396fc] part of check-in [bcc7d722ce] All regression tests now pass. But I am sure there must still be problems. New tests need to be added. (CVS 2666) (check-in: [bcc7d722ce] user: drh branch: trunk, size: 102088)
2005-09-07
22:48
[4549cbef5d] part of check-in [7e85a162d0] More bug fixes. But there are still tests that fail. (CVS 2664) (check-in: [7e85a162d0] user: drh branch: trunk, size: 101961)
22:09
[25df0f7aa1] part of check-in [c3ac58592f] Bug fixes in aggregate processing. Fewer tests fail. (CVS 2663) (check-in: [c3ac58592f] user: drh branch: trunk, size: 102020)
21:22
[2f96522065] part of check-in [17039ec3ff] Rewrite the aggregate handling logic so that it runs in O(1) space. This is the first cut at the code. Many regression tests fail. (CVS 2662) (check-in: [17039ec3ff] user: drh branch: trunk, size: 101907)
2005-09-05
20:06
[79bd7f9734] part of check-in [7b56763a8b] Fix bugs introduced by checkin (2656) and do some modest code enhancements. (CVS 2657) (check-in: [7b56763a8b] user: drh branch: trunk, size: 93788)
2005-09-01
12:16
[aabc227c88] part of check-in [81259a01f1] All regression tests now pass with the new bounded-memory sort code. There is still lots of opportunity for optimization, however. (CVS 2654) (check-in: [81259a01f1] user: drh branch: trunk, size: 93841)
03:07
[a0b10feee2] part of check-in [09db0a2424] Sorting is now done using a sorting index rather than loading the entire result set into memory and doing a merge sort. The old merge sort technique was a carry-over from SQLite version 1. The new method uses a bounded amount of memory and scales to much larger result sets. There are still errors: some 39 regression tests fail. (CVS 2653) (check-in: [09db0a2424] user: drh branch: trunk, size: 93599)
2005-08-31
18:20
[cf566f9953] part of check-in [a25801df06] {quote: KeyInfo} generation moved to a common subroutine. (CVS 2652) (check-in: [a25801df06] user: drh branch: trunk, size: 93918)
2005-08-30
00:54
[a185b91fd0] part of check-in [4ab994a87e] Minor code enhancements. (CVS 2642) (check-in: [4ab994a87e] user: drh branch: trunk, size: 94096)
2005-08-28
01:34
[f8a9993bcd] part of check-in [07b4892149] Add an assert to verify that floating point values and integers use the same byte order. Add a comment to the SELECT code generator. (CVS 2635) (check-in: [07b4892149] user: drh branch: trunk, size: 94337)
2005-08-14
20:47
[f441648eb1] part of check-in [98338abf9e] General code cleanup resulting in smaller footprint. (CVS 2595) (check-in: [98338abf9e] user: drh branch: trunk, size: 94083)
2005-07-08
17:13
[c611471052] part of check-in [3bb9ce5f20] Change the name of the OpenTemp opcode to OpenVirtual which is more descriptive of what it does. (CVS 2541) (check-in: [3bb9ce5f20] user: drh branch: trunk, size: 94312)
2005-06-12
21:35
[28b752e589] part of check-in [36f2da1f8d] Update older opcode names to be more meaningful in light of the latest code design. (CVS 2506) (check-in: [36f2da1f8d] user: drh branch: trunk, size: 94192)
12:01
[266416bb8a] part of check-in [97b348a5ad] Elminiate a VM opcode that was no longer needed. (CVS 2505) (check-in: [97b348a5ad] user: drh branch: trunk, size: 94692)
2005-06-06
21:19
[ce4b9fd78d] part of check-in [e73d25c741] Reference count Table structures so that they are not deallocated too soon. Ticket #1210. (CVS 2498) (check-in: [e73d25c741] user: drh branch: trunk, size: 94693)
16:34
[a057b1bb71] part of check-in [0d57f851ae] Honor the full_column_names pragma on * results. Ticket #1263. (CVS 2493) (check-in: [0d57f851ae] user: drh branch: trunk, size: 95810)
2005-05-26
14:41
[071a484044] part of check-in [7f67b9f0f3] If SSE is enabled, set the P1 field of OP_AggInit instructions to the number of arguments that will be passed to the aggregate function. (CVS 2484) (check-in: [7f67b9f0f3] user: danielk1977 branch: trunk, size: 95519)
2005-05-19
08:43
[43cc2a76e3] part of check-in [79a41674be] Always use a more specific type (P3_FUNCDEF) instead of P3_POINTER as the P3 type of a vdbe instruction. (CVS 2463) (check-in: [79a41674be] user: danielk1977 branch: trunk, size: 95324)
2005-05-16
22:37
[5a96555ea2] part of check-in [582cb77d72] Fix an uninitialized variable. Ticket #1244. (CVS 2460) (check-in: [582cb77d72] user: drh branch: trunk, size: 95316)
2005-04-29
02:10
[def26b6fe7] part of check-in [0667eae9a9] Prevent a segfault described by ticket #1229. (CVS 2450) (check-in: [0667eae9a9] user: drh branch: trunk, size: 95282)
2005-04-22
02:38
[277cf8893d] part of check-in [88b39436f0] Remove some vestigal code. Add the experimental sqlite3_transfer_bindings() API. (CVS 2446) (check-in: [88b39436f0] user: drh branch: trunk, size: 94688)
2005-03-28
03:39
[a324af36af] part of check-in [bcb5d72ef1] Fix some memory leaks that occur after a malloc failure. (CVS 2421) (check-in: [bcb5d72ef1] user: drh branch: trunk, size: 94699)
2005-03-21
03:53
[8569575085] part of check-in [e7844a01c2] Assorted fixes to the handling of various malloc() failures. (CVS 2413) (check-in: [e7844a01c2] user: danielk1977 branch: trunk, size: 94604)
2005-02-12
08:59
[69e6093d52] part of check-in [f7858d8830] Fix a problem with sub-queries and the flattening optimization. Also handle an extra case of database corruption. (CVS 2324) (check-in: [f7858d8830] user: danielk1977 branch: trunk, size: 94537)
2005-02-08
07:50
[37dd84fd22] part of check-in [f0d3ca10c5] Fix for correlated subqueries where the parent is an aggregate. Ticket #1105. (CVS 2318) (check-in: [f0d3ca10c5] user: danielk1977 branch: trunk, size: 94447)
2005-02-05
12:48
[6217e1f72c] part of check-in [515e5033a5] Allow expressions (including variables) in LIMIT and OFFSET clauses. Ticket #1096. (CVS 2316) (check-in: [515e5033a5] user: danielk1977 branch: trunk, size: 94330)
2005-02-04
04:07
[16c750c000] part of check-in [2eb9087055] Remove code for SQL cursors. (CVS 2312) (check-in: [2eb9087055] user: danielk1977 branch: trunk, size: 94070)
2005-01-31
12:42
[fee51a0d40] part of check-in [dfbd684a91] Assorted minor changes to speed up loading the database schema. (CVS 2293) (check-in: [dfbd684a91] user: danielk1977 branch: trunk, size: 94806)
2005-01-30
11:11
[4382c77876] part of check-in [9843c0dd79] Respect collation sequences in views. Ticket #1088. (CVS 2291) (check-in: [9843c0dd79] user: danielk1977 branch: trunk, size: 94891)
2005-01-29
08:32
[b34d70980c] part of check-in [b1b50f3158] Modify sub-query handling. Tickets #1083 and #1084. (CVS 2286) (check-in: [b1b50f3158] user: danielk1977 branch: trunk, size: 94878)
2005-01-26
03:58
[32fe60f1af] part of check-in [0642d3e3d6] Allow GROUP BY on non-aggregate queries. Ticket #1064 (CVS 2276) (check-in: [0642d3e3d6] user: danielk1977 branch: trunk, size: 90810)
2005-01-21
08:13
[e204ca5292] part of check-in [c6fc49e610] Exclude a few more lines of code using OMIT macros. (CVS 2253) (check-in: [c6fc49e610] user: danielk1977 branch: trunk, size: 90959)
2005-01-20
22:48
[d8f5c8b449] part of check-in [38401dfbd5] Bug fixes and enhancements entered while on jury recess. (CVS 2246) (check-in: [38401dfbd5] user: drh branch: trunk, size: 90433)
13:36
[8a4a38310c] part of check-in [d30fdf0f2c] Added the SQLITE_OMIT_SUBQUERY compile-time option and the EXISTS operator. Regression tests are currently failing with an assertion fault. (CVS 2245) (check-in: [d30fdf0f2c] user: drh branch: trunk, size: 90432)
13:03
[1686f2503c] part of check-in [417bbba93a] Remove a few more lines of code when SQLITE_OMIT_** macros are defined. (CVS 2244) (check-in: [417bbba93a] user: danielk1977 branch: trunk, size: 90192)
2005-01-19
23:24
[e147c81d57] part of check-in [d8b2a7e091] Continued refactoring of the name resolution logic and query optimizer. (CVS 2236) (check-in: [d8b2a7e091] user: drh branch: trunk, size: 90135)
2005-01-18
17:40
[29bc58118d] part of check-in [c06add57bf] Make sure USING and NATURAL work on joins even if the columns are renamed using an AS phrase. Ticket #523. (CVS 2233) (check-in: [c06add57bf] user: drh branch: trunk, size: 89965)
17:20
[f9239c5936] part of check-in [b1d4c42d2b] CREATE TABLE ... AS ... uses short names for columns. Ticket #1036. (CVS 2232) (check-in: [b1d4c42d2b] user: drh branch: trunk, size: 89610)
16:02
[56f018292c] part of check-in [9295050af1] Column names coming back from a SELECT are now just the name of the source column without the "table." prefix. In other words, "PRAGMA short_column_names=ON" is now the default. This makes the names of columns behave more like other SQL engines. The old behavior can be restored by setting "PRAGMA short_column_names=OFF". (CVS 2231) (check-in: [9295050af1] user: drh branch: trunk, size: 88987)
14:45
[767e9d0f06] part of check-in [88d4834fec] Continue refactoring name resolution. Fix for ticket #1047. (CVS 2230) (check-in: [88d4834fec] user: drh branch: trunk, size: 88978)
04:00
[37b9ddb968] part of check-in [0142ae6f00] Refinements to the name resolution logic. Change the name of the keywordhash.c file to keywordhash.h. (CVS 2229) (check-in: [0142ae6f00] user: drh branch: trunk, size: 88721)
2005-01-17
22:08
[cfd5f30611] part of check-in [4a7534396a] Infrastructure changes to handle name resolution differently. This is needed to fix various long-standing problems with column names in joins. It will also make the implementation of correlated subqueries easier. (CVS 2228) (check-in: [4a7534396a] user: drh branch: trunk, size: 88653)
08:57
[f74bdde6e7] part of check-in [5a9da62ae3] Fix a bug reported on the mailing list concerning a conflict between "INSERT INTO ... SELECT" statements and the "SELECT max(x) FROM tbl" optimization. (CVS 2227) (check-in: [5a9da62ae3] user: danielk1977 branch: trunk, size: 88662)
2005-01-15
01:52
[e29c70ec5f] part of check-in [92f9d2b2f4] Test coverage improvements. (CVS 2215) (check-in: [92f9d2b2f4] user: drh branch: trunk, size: 88309)
2005-01-03
02:26
[af6ffcf020] part of check-in [8ef2c644eb] Allow GROUP BY on aggregate queries only. Ticket #1039. (CVS 2176) (check-in: [8ef2c644eb] user: drh branch: trunk, size: 88123)
2004-12-25
01:03
[080c0d1d68] part of check-in [5fd1f47118] Fix ticket #1046 by removing code and simplifying the query optimizer. Remarkably, this simplification also makes the optimizer do a better job. Ticket #1051 was fixed as a side-effect. (CVS 2172) (check-in: [5fd1f47118] user: drh branch: trunk, size: 87991)
2004-12-16
21:09
[ac6610b4b2] part of check-in [ece0085f86] Make sure LIMITs are handled correctly on UNION operators. Ticket #1035. (CVS 2166) (check-in: [ece0085f86] user: drh branch: trunk, size: 87994)
2004-11-23
01:47
[36cc9da999] part of check-in [8b61d1ae1c] More work on the implementation of cursors, but they are still not functioning. (CVS 2142) (check-in: [8b61d1ae1c] user: drh branch: trunk, size: 87949)
2004-11-22
19:12
[b00478f33d] part of check-in [fc8c1393c8] Add initial infrastructure for cursors. In where.c, optimize out clauses of the form "ORDER BY rowid" if a table scan is being performed. Do a reverse table scan if "ORDER BY rowid DESC" is present. (CVS 2141) (check-in: [fc8c1393c8] user: drh branch: trunk, size: 88140)
10:02
[7b17db766e] part of check-in [91acd87e52] Back out changes allowing writes to tables that have open cursors. (CVS 2133) (check-in: [91acd87e52] user: danielk1977 branch: trunk, size: 87268)
2004-11-16
15:50
[cf4b7952d6] part of check-in [a2e1c35b32] Perform deletes in a single pass. (CVS 2104) (check-in: [a2e1c35b32] user: danielk1977 branch: trunk, size: 87272)
2004-10-31
02:22
[156990c636] part of check-in [be661acfa8] Insert #ifdefs that can optionally remove features at compiletime resulting in a database engine with a smaller footprint. (CVS 2034) (check-in: [be661acfa8] user: drh branch: trunk, size: 87260)
2004-10-06
15:41
[de51ec24ae] part of check-in [d790c84c5a] Convert many constants to have type "const". (CVS 2006) (check-in: [d790c84c5a] user: drh branch: trunk, size: 86834)
2004-09-25
14:39
[96b1489111] part of check-in [9ef4c24a9a] Code cleanup: get rid of the sqlite3SetNString utility function. (CVS 1984) (check-in: [9ef4c24a9a] user: drh branch: trunk, size: 86828)
13:12
[97c5f11b2b] part of check-in [cb631a135d] Code simplifications and size reductions. (CVS 1983) (check-in: [cb631a135d] user: drh branch: trunk, size: 86968)
2004-09-19
02:15
[13a4e6d0ca] part of check-in [4871c77f8f] Add comments to unused P3 fields of selected instructions when NDEBUG is not defined. This makes VDBE program dumps more readable during debugging. (CVS 1973) (check-in: [4871c77f8f] user: drh branch: trunk, size: 87023)
2004-09-08
15:09
[5f60fc164a] part of check-in [a1f532520c] Always cast 0 to (char*)0 when it is an argument in a varargs function. (CVS 1948) (check-in: [a1f532520c] user: drh branch: trunk, size: 86912)
2004-09-06
17:24
[6e3ec12a01] part of check-in [3ddf5a9d1c] Fix a naming conflict between sqlite versions 2 and 3. An open sqlite3 connection now *must* be called "sqlite3". You cannot call it "sqlite". This might break existing code. (CVS 1941) (check-in: [3ddf5a9d1c] user: drh branch: trunk, size: 86905)
2004-09-01
03:06
[1453457953] part of check-in [9c411c3c8d] Optimizations on the SELECT code generator. (CVS 1926) (check-in: [9c411c3c8d] user: drh branch: trunk, size: 86902)
2004-08-29
16:25
[400b2dcc8e] part of check-in [9cc765be46] Corrections to transient table handling in compound select statments. Tickets #826 and #875. (CVS 1912) (check-in: [9cc765be46] user: drh branch: trunk, size: 86832)
01:31
[5fa9db32e2] part of check-in [307478593d] Progress toward fixing iproblems with compound selects. (CVS 1911) (check-in: [307478593d] user: drh branch: trunk, size: 87524)
2004-08-21
17:54
[24b9ab865e] part of check-in [bd6649c5aa] Optimizations to the code generator. (CVS 1899) (check-in: [bd6649c5aa] user: drh branch: trunk, size: 85257)
2004-07-26
23:32
[cbed45f4af] part of check-in [76fe68cff6] Honor the ORDER BY clause in a subquery that is the right-hand side of an IN operator. Ticket #827. (CVS 1871) (check-in: [76fe68cff6] user: drh branch: trunk, size: 86044)
2004-07-20
01:45
[a1c18cab14] part of check-in [9937ffb08e] Handle quotes on table names in TABLE.* terms in SELECT. Ticket #680. (CVS 1834) (check-in: [9937ffb08e] user: drh branch: version_2, size: 80613)
01:45
[aefda62666] part of check-in [826b6797a9] Handle quotes on the table name in TABLE.* terms in SELECT statements. Ticket #680. (CVS 1833) (check-in: [826b6797a9] user: drh branch: trunk, size: 86062)
00:20
[05218c258f] part of check-in [ef0d5ebe96] Correct handling of views on tables with quoted column names. Ticket #756. (CVS 1827) (check-in: [ef0d5ebe96] user: drh branch: version_2, size: 80609)
00:20
[540ac0efcb] part of check-in [8ac5a8ad5e] Correct handling of views on tables with quoted column names. Ticket #756. (CVS 1826) (check-in: [8ac5a8ad5e] user: drh branch: trunk, size: 86061)
2004-07-19
23:38
[b8d0a83255] part of check-in [9d4f43f030] Refinements to the LIMIT patch (1823) for ticket #749. (CVS 1825) (check-in: [9d4f43f030] user: drh branch: trunk, size: 86026)
23:33
[894bdac940] part of check-in [db5ae13db3] Limit occurs after DISTINCT. Ticket #749. (CVS 1824) (check-in: [db5ae13db3] user: drh branch: version_2, size: 80581)
23:16
[d4585c55c4] part of check-in [e6bc8aa808] LIMIT occurs after DISTINCT. Ticket #749. (CVS 1823) (check-in: [e6bc8aa808] user: drh branch: trunk, size: 86057)
2004-07-18
21:33
[6f0bbf8da5] part of check-in [b6e8b7a13c] An improved fix for the min() problem of ticket #800. (CVS 1804) (check-in: [b6e8b7a13c] user: drh branch: trunk, size: 85535)
21:14
[b8fe5c69d4] part of check-in [223521c04e] Min() and max() ignore NULL values. Ticket #800. (CVS 1803) (check-in: [223521c04e] user: drh branch: version_2, size: 80087)
20:52
[d92ac23242] part of check-in [166234a2b6] min() ignores NULL values. Ticket #800. (CVS 1802) (check-in: [166234a2b6] user: drh branch: trunk, size: 85709)
2004-06-21
10:45
[f02a65af34] part of check-in [4d02df6349] Avoid opening a temp table for aggregate queries with no GROUP BY clause. (CVS 1649) (check-in: [4d02df6349] user: danielk1977 branch: trunk, size: 85390)
07:36
[7305795965] part of check-in [ee9dffd986] Update sqlite3_column_decltype() to return NULL as the declartion type for an expression that is not a column reference. (CVS 1646) (check-in: [ee9dffd986] user: danielk1977 branch: trunk, size: 85482)
2004-06-19
14:49
[9aa82bbc63] part of check-in [99d0436e0e] Omit the sqlite3VdbeCode() routine. Use sqlite3NameFromToken() more to reduce the amount of code. (CVS 1639) (check-in: [99d0436e0e] user: drh branch: trunk, size: 85404)
2004-06-17
07:53
[91570af7f1] part of check-in [a71a9ff114] Remove redundant opcodes OP_MakeKey and OP_MakeIdxKey. (CVS 1612) (check-in: [a71a9ff114] user: danielk1977 branch: trunk, size: 85453)
2004-06-16
12:02
[ee37ea91be] part of check-in [7974c9a6f5] Trivial modifications to prevent compiler warnings. (CVS 1607) (check-in: [7974c9a6f5] user: danielk1977 branch: trunk, size: 85420)
2004-06-15
02:44
[7036757825] part of check-in [4f5e253082] (1) Vdbe makes a copy of column types. (2) Don't invalidate other cursors when a statement or transaction is rolled back. (3) Update capi2.test for the new API. (CVS 1597) (check-in: [4f5e253082] user: danielk1977 branch: trunk, size: 85416)
2004-06-12
09:25
[164d1a68b3] part of check-in [5903f53828] (1) Modifications to the user-function interface and (2) Internal changes to automatically created indices. (CVS 1575) (check-in: [5903f53828] user: danielk1977 branch: trunk, size: 85238)
2004-06-11
13:19
[d29488f86e] part of check-in [8d56118f64] Have the vdbe aggregator use a btree table instead of a hash table. (CVS 1569) (check-in: [8d56118f64] user: danielk1977 branch: trunk, size: 85275)
10:51
[3559dcd25b] part of check-in [66835ee670] Fix various collation sequence issues. (CVS 1568) (check-in: [66835ee670] user: danielk1977 branch: trunk, size: 84724)
2004-06-10
10:50
[6cb407796d] part of check-in [edf069b9f4] Add the sqlite3_collation_needed() API and fix some error handling cases involving unknown collation sequences. (CVS 1562) (check-in: [edf069b9f4] user: danielk1977 branch: trunk, size: 81937)
2004-06-09
09:55
[1f8355e702] part of check-in [c634e71f19] Some progress on user-defined collation sequences. (CVS 1544) (check-in: [c634e71f19] user: danielk1977 branch: trunk, size: 81921)
2004-06-07
10:00
[0ac0adeb2a] part of check-in [31c1668dbc] Tables created with the CREATE TABLE <tbl> AS SELECT ... syntax now inherit column declaration types from the SELECT statement. (CVS 1538) (check-in: [31c1668dbc] user: danielk1977 branch: trunk, size: 81110)
2004-06-05
00:01
[02d7111601] part of check-in [cb1ffabf86] Critical bugs fixed in btree.c. Incompatible file format change. Unrelated comment fix in select.c (CVS 1530) (check-in: [cb1ffabf86] user: drh branch: trunk, size: 80884)
2004-05-29
11:24
[0297717eb7] part of check-in [3225de8902] Transform OP_HexBlob and OP_String8 to OP_Blob and OP_String the first time they are executed. (CVS 1492) (check-in: [3225de8902] user: danielk1977 branch: trunk, size: 81182)
2004-05-28
13:13
[ee54bf2faa] part of check-in [c8a40218c2] Fix a bug in the sqlite3_column_decltype() API. (CVS 1486) (check-in: [c8a40218c2] user: danielk1977 branch: trunk, size: 81176)
2004-05-27
23:56
[26f726b398] part of check-in [203af2b2e3] Add API functions sqlite3_open_varargs(), sqlite3_open16_varargs() and sqlite3_complete16(). (CVS 1479) (check-in: [203af2b2e3] user: danielk1977 branch: trunk, size: 81132)
10:30
[2ba142a490] part of check-in [c9e3015faf] A few more bugfixes. Test cases pass now. (CVS 1472) (check-in: [c9e3015faf] user: danielk1977 branch: trunk, size: 81175)
2004-05-26
16:54
[e90e2a1472] part of check-in [36e0316259] Remove dataType and includeTypes flags from function definitions. Added new P3_FUNCDEF type for P3 arguments on opcodes. Fixes to several user functions. 28 tests fail now. (CVS 1464) (check-in: [36e0316259] user: drh branch: trunk, size: 81149)
10:11
[53f1aea3fa] part of check-in [d5659f2ee6] Add some tests for the new API. Many more to come. (CVS 1462) (check-in: [d5659f2ee6] user: danielk1977 branch: trunk, size: 81177)
06:18
[4299604786] part of check-in [0317bef4b0] Use the new form of the sqlite3_create_function() API. (CVS 1460) (check-in: [0317bef4b0] user: danielk1977 branch: trunk, size: 81826)
2004-05-25
23:35
[867cab23c0] part of check-in [9385ad5ca8] Move the sqlite3_exec() function to legacy.c. (CVS 1455) (check-in: [9385ad5ca8] user: danielk1977 branch: trunk, size: 81826)
2004-05-21
03:01
[7d77a8bed7] part of check-in [25643a0137] Eliminate the OP_SortMakeRec and OP_SortCallback opcodes. Sort using the standard record format. (CVS 1426) (check-in: [25643a0137] user: drh branch: trunk, size: 81775)
02:14
[4cd54ac74b] part of check-in [3b55095e03] Most sorting problems are fixed. Dead code has been removed. 3 test failures remain but will be fixed by the new function API once it gets implemented. (CVS 1425) (check-in: [3b55095e03] user: drh branch: trunk, size: 81743)
01:29
[d77f773165] part of check-in [0736b7e840] Sorting bug fixes. Now only 17 tests fail. (CVS 1422) (check-in: [0736b7e840] user: drh branch: trunk, size: 81979)
2004-05-20
22:16
[97c78398a8] part of check-in [a6cb09d7af] Add internal support for collating sequences. This breaks 244 tests. (CVS 1420) (check-in: [a6cb09d7af] user: drh branch: trunk, size: 81377)
03:02
[2510f0f16b] part of check-in [a7f02db738] Bug fix associated with misc3.test. (CVS 1414) (check-in: [a7f02db738] user: drh branch: trunk, size: 83690)
2004-05-19
14:56
[d01c03462d] part of check-in [8f249c45cb] Change opcode names and comments to better describe the operation of the incrKey flag. OP_MoveTo becomes OP_MoveGe. (CVS 1407) (check-in: [8f249c45cb] user: drh branch: trunk, size: 83690)
2004-05-18
22:38
[2981cafe3b] part of check-in [ae37e8a0bf] Remove dead code from vdbeaux.c. Add comments describing desired changes to OP_Sort processing in select.c (CVS 1398) (check-in: [ae37e8a0bf] user: drh branch: trunk, size: 83690)
09:58
[f376f3bead] part of check-in [a62872aacd] Fix many problems with manifest types and column affinity. Most things are working now. (CVS 1392) (check-in: [a62872aacd] user: danielk1977 branch: trunk, size: 83411)
01:23
[62431fb1a1] part of check-in [202a470f2c] Omit the '\0' at the end of UTF-8 strings on disk (it is implied). Also don't store the number of rows at the beginning of each table record. (CVS 1390) (check-in: [202a470f2c] user: danielk1977 branch: trunk, size: 80751)
2004-05-17
10:48
[b62bb2507d] part of check-in [0f6c9b05e6] More changes to support the new types model. Compound SELECTs are currently broken. (CVS 1389) (check-in: [0f6c9b05e6] user: danielk1977 branch: trunk, size: 80479)
2004-05-11
06:55
[ca99ae4db1] part of check-in [941d0fdc97] More minor changes to accomadate the new btree. All the select* tests pass now. (CVS 1353) (check-in: [941d0fdc97] user: danielk1977 branch: trunk, size: 80058)
2004-05-10
10:34
[9290439282] part of check-in [2242423e31] Change the names of external symbols from sqlite_XXX to sqlite3_XXX. (CVS 1338) (check-in: [2242423e31] user: danielk1977 branch: trunk, size: 80196)
2004-05-08
08:23
[d3868613e7] part of check-in [8af6474c49] Change lots of internal symbols from sqliteXXX to sqlite3XXX so that the library links again. It doesn't work yet, due to changes in the btree layer calling convention. (CVS 1324) (check-in: [8af6474c49] user: danielk1977 branch: trunk, size: 80194)
2004-03-13
14:00
[3833e2b64c] part of check-in [31c94acc72] Fix the min/max optimizer so that it works when the FROM clause is a subquery. Ticket #658. (CVS 1293) (check-in: [31c94acc72] user: drh branch: trunk, size: 79891)
2004-03-02
18:37
[fb4360976f] part of check-in [5aaa2939ba] Make sure a LIMIT clause on a SELECT cleans up the vdbe stack so that if it occurs inside a trigger, it won't cause a stack overflow. Ticket #640. (CVS 1282) (check-in: [5aaa2939ba] user: drh branch: trunk, size: 79784)
2004-02-25
13:47
[a8b0f9bfe9] part of check-in [adbe31adf1] Min() and max() functions honor the distinction between TEXT and NUMERIC data. Ticket #623. typeof() is now a user function. Some tests are now failing due to ticket #521. (CVS 1272) (check-in: [adbe31adf1] user: drh branch: trunk, size: 79671)
2004-02-22
20:05
[902000034e] part of check-in [51f1e8f753] Use sqliteVdbeOp3 instead of sqliteVdbeChangeP3 where applicable. (CVS 1266) (check-in: [51f1e8f753] user: drh branch: trunk, size: 79727)
2004-02-20
14:50
[9a41dace75] part of check-in [574dd444e7] The name of a result column is now the name of column it originated from, by default. This can be turned off with PRAGMA short_column_names=OFF. This is to be more like PostgreSQL. More testing needed. (CVS 1250) (check-in: [574dd444e7] user: drh branch: trunk, size: 80222)
2004-02-16
03:44
[3b8eaf1a95] part of check-in [f72134852b] Remove the NullCallback opcode. Handle the empty_result_set pragma inside the sqlite_exec() function. (CVS 1244) (check-in: [f72134852b] user: drh branch: trunk, size: 80217)
2004-02-14
23:59
[330166e328] part of check-in [2dbc4593ca] Eliminate obsolete code associated with the older callback functionality. (CVS 1243) (check-in: [2dbc4593ca] user: drh branch: trunk, size: 80478)
16:31
[7cbd9cca52] part of check-in [9771ad1e81] The sqlite_exec() function is now implemented using sqlite_compile() and sqlite_step(). This opens up lots of opportunity to remove old code. (CVS 1240) (check-in: [9771ad1e81] user: drh branch: trunk, size: 80746)
2004-02-13
16:22
[da4f383736] part of check-in [aa0490ccd4] Fix a bug in the query flattener when trying to find the datatype of the rowid of a view. Also fix a problem with sqlite_compile() and authorization failures. (CVS 1236) (check-in: [aa0490ccd4] user: drh branch: trunk, size: 80734)
2004-02-12
15:31
[a3a203f9b6] part of check-in [12c7a83f8e] Always reload the schema after a rollback. Ticket #594. (CVS 1229) (check-in: [12c7a83f8e] user: drh branch: trunk, size: 80647)
2004-02-09
14:37
[a0211d1a6a] part of check-in [1cff18868d] After code is generated for a subquery, delete the Select structure in order to force the temporary table to be used and to prevent the subquery from being evaluated a second time. Ticket #601. (CVS 1216) (check-in: [1cff18868d] user: drh branch: trunk, size: 80655)
2004-01-30
02:01
[b7694067df] part of check-in [af73fbca83] Make sure min() and max() optimizations work for subqueries. Ticket #587. (CVS 1201) (check-in: [af73fbca83] user: drh branch: trunk, size: 80203)
2004-01-24
20:18
[b5bc89a56d] part of check-in [3626f6d4a1] Add the ability to group FROM terms using parentheses. Names of columns in a join no longer include the table name. (CVS 1197) (check-in: [3626f6d4a1] user: drh branch: trunk, size: 80045)
2004-01-19
04:57
[131b1af582] part of check-in [7972ee3219] comment typos (CVS 1192) (check-in: [7972ee3219] user: jplyon branch: trunk, size: 79629)
2004-01-14
13:38
[2712bd4d31] part of check-in [c9e7996fb9] Ignore NULLs in a subquery as the right operand of IN. Ticket #565. (CVS 1175) (check-in: [c9e7996fb9] user: drh branch: trunk, size: 79626)
2003-09-27
13:39
[d79ac60ba1] part of check-in [824430b3ce] Remove support for the Oracle8 outer join syntax. (CVS 1106) (check-in: [824430b3ce] user: drh branch: trunk, size: 79380)
2003-07-20
01:16
[2fa83d6c97] part of check-in [543479e3ae] Fix the LIMIT clause so that it applies to the entire query in a compound query. Prior to this change LIMITs on compound queries did not work at all. Ticket #393. (CVS 1058) (check-in: [543479e3ae] user: drh branch: trunk, size: 81440)
2003-07-19
00:44
[f1f3b2c2f4] part of check-in [c35e507176] Make sure the min() and max() optimizer works correctly when there is a LIMIT clause. Ticket #396. (CVS 1057) (check-in: [c35e507176] user: drh branch: trunk, size: 79647)
2003-07-16
11:51
[98385a4f86] part of check-in [a31d0bd90a] Make LIMIT 0 return no rows. LIMIT -1 still returns all rows. Ticket #346. (CVS 1053) (check-in: [a31d0bd90a] user: drh branch: trunk, size: 79404)
02:19
[20a38bc2a6] part of check-in [e6a752bfef] Allow negative values for LIMIT and OFFSET. Add tests for negative LIMITs and OFFSETs. Make the OFFSET work even if LIMIT is 0 or negative. (CVS 1052) (check-in: [e6a752bfef] user: drh branch: trunk, size: 79124)
2003-06-16
00:40
[29c53228a4] part of check-in [dd8943e858] Do not flatten a subquery which is the right term of a LEFT OUTER JOIN if the subquery contains a WHERE clause. Ticket #350. (CVS 1027) (check-in: [dd8943e858] user: drh branch: trunk, size: 78749)
2003-05-31
16:21
[76b3a5cda7] part of check-in [7202d4f1a8] Tighter binding of views, triggers, and indices to their respective databases. Ticket #323. Much more testing needs to be done to the sqliteFix...() routines in attach.c. (CVS 990) (check-in: [7202d4f1a8] user: drh branch: trunk, size: 78015)
2003-05-17
17:35
[15d9213080] part of check-in [01398fb78b] Fix problems with TEMP indices that lead to corrupt databases. These problems were discovered while working on ticket #317. No sure yet if that ticket is fixed. (CVS 981) (check-in: [01398fb78b] user: drh branch: trunk, size: 77973)
2003-05-06
20:35
[c06b4605bc] part of check-in [6d4b6597e5] Restrain the flattener in the presence of outer joins. Ticket #306. (CVS 958) (check-in: [6d4b6597e5] user: drh branch: trunk, size: 78044)
2003-05-02
16:04
[3fe63e3a29] part of check-in [ad57693e9f] Enhance the query flattener to handle subqueries that are joins. All regressions pass but new tests need to be added before release. Ticket #272. (CVS 948) (check-in: [ad57693e9f] user: drh branch: trunk, size: 77383)
14:32
[493360f300] part of check-in [be7aed2011] VDBE cursors numbers for tables in a join do not have to be consecutive. This is one step on the road to fixing ticket #272. (CVS 947) (check-in: [be7aed2011] user: drh branch: trunk, size: 75718)
2003-04-29
16:20
[d1c876b907] part of check-in [c6bf62e41c] The sqlite_complete() function should ignore carriage-return characters. (Oops - some unrelated edits also made it into this check-in.) (CVS 942) (check-in: [c6bf62e41c] user: drh branch: trunk, size: 77737)
2003-04-24
01:45
[dfc13cb62b] part of check-in [206b17397b] Fix some issues with INSTEAD OF triggers. (CVS 930) (check-in: [206b17397b] user: drh branch: trunk, size: 77081)
2003-04-22
20:30
[92a66f0122] part of check-in [c675a55041] Update the authorizer API so that it reports the database that table and indices belong to and so that it reports when actions are taken in response to a trigger. (CVS 928) (check-in: [c675a55041] user: drh branch: trunk, size: 76444)
2003-04-17
22:57
[07140aaf5f] part of check-in [1e5e00fb73] Fix triggers to work in an ATTACHed database. Ticket #295. (CVS 915) (check-in: [1e5e00fb73] user: drh branch: trunk, size: 76441)
12:44
[84168d6ef8] part of check-in [98ef611006] Make sure the min() and max() optimizations work on empty indexed tables. Ticket #296. (CVS 914) (check-in: [98ef611006] user: drh branch: trunk, size: 76547)
2003-03-31
13:36
[14e2e2a512] part of check-in [e80afe75b3] Minor follow-on changes to the recent ATTACH patch. (CVS 892) (check-in: [e80afe75b3] user: drh branch: trunk, size: 76547)
02:12
[7d69e56933] part of check-in [1d3fc97721] Add the sqliteErrorMsg() function and use it to generate error message text during parsing and code generation. This simplifies the code somewhat and makes it easier to handle names with a database prefix. (CVS 891) (check-in: [1d3fc97721] user: drh branch: trunk, size: 76546)
2003-03-27
12:51
[afdc06d460] part of check-in [d2fb2bb50c] Changes to the "sqlite" structure that allow simultaneous operations on multiple database files. Many regession tests pass - but not all of them. Do not use this version except for debugging SQLite itself. (CVS 883) (check-in: [d2fb2bb50c] user: drh branch: trunk, size: 77383)
2003-03-19
03:14
[06ddc007c2] part of check-in [875da9eed9] Modifications to the VDBE to support more than one database file. (CVS 878) (check-in: [875da9eed9] user: drh branch: trunk, size: 77327)
2003-02-02
12:41
[d12d4c12d6] part of check-in [b687923158] Make the GROUP BY clause work even if there are no aggregate functions. (CVS 859) (check-in: [b687923158] user: drh branch: trunk, size: 77342)
2003-01-31
17:16
[77018f4719] part of check-in [187d9c4058] Allow double-quoted strings as string constants in the IN operator. As a side-efffect, allow the GROUP BY clause to refer to columns by their integer column number. Ticket #237. (CVS 856) (check-in: [187d9c4058] user: drh branch: trunk, size: 77315)
2003-01-29
14:06
[13b8e5ea8a] part of check-in [162b259188] The callback-free API is now working, though much more testing is need. (CVS 853) (check-in: [162b259188] user: drh branch: trunk, size: 76636)
2003-01-19
03:59
[c3c0b82635] part of check-in [f6a8706872] Update comments. No changes to code. (CVS 841) (check-in: [f6a8706872] user: drh branch: trunk, size: 76536)
2003-01-18
20:11
[6537324463] part of check-in [71cc292dce] Fix datatype reporting and collating sequence selection so that it works correctly on views and with the UNION, EXCEPT, and INTERCEPT operators. (CVS 839) (check-in: [71cc292dce] user: drh branch: trunk, size: 73668)
2003-01-13
23:27
[5ce75c1381] part of check-in [45de93f913] Revise the sqlite_set_authorizer API to provide more detailed information about the SQL statement being authorized. Only partially tested so far. (CVS 830) (check-in: [45de93f913] user: drh branch: trunk, size: 70479)
2003-01-12
18:02
[1b7d20b659] part of check-in [52d5007f64] Initial check-in of the code for the new sqlite_set_authorizer() API function. The code is mostly untested at this point. (CVS 827) (check-in: [52d5007f64] user: drh branch: trunk, size: 70473)
2003-01-11
14:19
[b52c1dccbf] part of check-in [e84d3afe7b] Document the SHOW_DATATYPES pragma and add tests for it to the test suite. Make sure datatypes are show even for aliased columns. Tickets #220 and #221. (CVS 822) (check-in: [e84d3afe7b] user: drh branch: trunk, size: 70416)
13:30
[754af8fabc] part of check-in [86deb12d68] Remove the ColumnCount opcode, which had become a no-op. (CVS 821) (check-in: [86deb12d68] user: drh branch: trunk, size: 70608)
2002-12-03
02:34
[cc8640e5d4] part of check-in [33c6fd6b3d] Allow an aggregate function in the HAVING clause even if no aggregates appear in the result set. Ticket #187. (CVS 793) (check-in: [33c6fd6b3d] user: drh branch: trunk, size: 70595)
02:22
[a03c317ff8] part of check-in [dbf7893234] Honor ORDER BY clauses in VIEWs. Ticket #193. (CVS 792) (check-in: [dbf7893234] user: drh branch: trunk, size: 70594)
2002-10-27
19:35
[ce82596a2e] part of check-in [31df3690d0] Minimal support for oracle8 outer join syntax. (CVS 771) (check-in: [31df3690d0] user: drh branch: trunk, size: 70268)
2002-10-22
23:38
[4a6f3fb86a] part of check-in [3b68aa25c4] Correctly handle column names and string constants in parentheses. Fix for ticket #179. (CVS 770) (check-in: [3b68aa25c4] user: drh branch: trunk, size: 67976)
2002-10-20
15:53
[987e0c6134] part of check-in [3ef2925650] Work around a bug in the Borland C compiler. Ticket #172. (CVS 765) (check-in: [3ef2925650] user: drh branch: trunk, size: 68202)
2002-09-08
17:23
[74a025cd68] part of check-in [23fe36c7e8] Fix for ticket #147: Honor the ORDER BY and LIMIT clauses in a SELECT even if the destination of that SELECT is a subroutine call. (CVS 747) (check-in: [23fe36c7e8] user: drh branch: trunk, size: 68134)
2002-08-28
03:00
[6cd3673edb] part of check-in [723362e74f] Slightly faster INSERTs from a SELECT by avoiding an intermediate table. But it didn't make nearly as much difference as I had hoped. (CVS 732) (check-in: [723362e74f] user: drh branch: trunk, size: 67756)
2002-08-25
19:20
[e79db94a78] part of check-in [c602603e7c] Fix for ticket #136: Added the OP_RenameCursor VDBE instruction and used it to make cursor numbers right on nested subqueries. Also added OP_Gosub and OP_Return but have not actually used them for anything yet. (CVS 727) (check-in: [c602603e7c] user: drh branch: trunk, size: 67619)
18:29
[bef25919ad] part of check-in [b957dafc26] Fix the memory leak introduced by check-in (725). (CVS 726) (check-in: [b957dafc26] user: drh branch: trunk, size: 66800)
2002-08-24
18:24
[7aa3c37844] part of check-in [22d8726e61] Change the way token memory is allocated in an effort to fix ticket #136. There is now a memory leak when using views of views. (CVS 725) (check-in: [22d8726e61] user: drh branch: trunk, size: 66612)
2002-08-04
00:52
[f504cc5422] part of check-in [18745c67ac] Fix for ticket #131: When a SELECT contains a GROUP BY clause it cannot use an index for sorting. It has to sort as a separate operation after the GROUP BY is complete. (CVS 702) (check-in: [18745c67ac] user: drh branch: trunk, size: 66256)
2002-07-18
00:34
[a43eabfc2e] part of check-in [20d152fcdd] Fix for ticket #107: Fix a design defect in indices that was causing queries to fail when using an index on a column containing an empty string. This fix is an incompatible file-format change. (CVS 681) (check-in: [20d152fcdd] user: drh branch: trunk, size: 66212)
2002-07-11
12:18
[f4e7221a31] part of check-in [b98727246d] Turn of the reporting of datatypes in the 4th callback argument unless the SHOW_DATATYPES pragma is ON. Eliminate the NULL pointer that used to separate the beginning of datatypes from the end of column names so that the callback can test to see whether or not datatypes are provided. This is an incompatible changes, but since the prior behavior was never documented, we will let it in. (CVS 670) (check-in: [b98727246d] user: drh branch: trunk, size: 66212)
2002-07-10
21:26
[9e67a79bda] part of check-in [ff8b6f4ee8] When reporting back the datatype of columns, use the text of the datatype as it appears in the CREATE TABLE statement, if available. Also: removed the ".reindex" command from the shell. (CVS 669) (check-in: [ff8b6f4ee8] user: drh branch: trunk, size: 66023)
2002-07-05
21:42
[1c7c0b42c2] part of check-in [b4737a16c9] All the code is now in place for SQLite to distinguish between NUMERIC and TEXT datatypes. Still need to turn on the new code and test it. (CVS 659) (check-in: [b4737a16c9] user: drh branch: trunk, size: 65802)
2002-06-29
02:20
[63a10ea636] part of check-in [91c0db66c8] Add a few more tests and fix a few bugs that the tests uncovered. (CVS 652) (check-in: [91c0db66c8] user: drh branch: trunk, size: 64195)
2002-06-28
12:18
[473670ff00] part of check-in [96515b813e] Additional test cases added. The following bug fixed: A segfault was occurring if a VIEW consisted of a join with a USING clause. (CVS 651) (check-in: [96515b813e] user: drh branch: trunk, size: 64138)
2002-06-26
02:45
[92ffd8b5ef] part of check-in [bdb006b809] The datatype of the i-th column in the result set is given by the azColName(argc+1+i) parameter to the callback. (CVS 647) (check-in: [bdb006b809] user: drh branch: trunk, size: 64038)
2002-06-24
22:01
[f7d74f20f5] part of check-in [8b6574cfa8] Partial fix for a problem with LEFT OUTER JOIN. It used to be that the test for the right-hand table not matching the left table occurred after all ON, USING, WHERE clause processing. The test should occur after ON and USING clauses are checked but before the WHERE clause is check. This fix works as long as the total number of "AND" separated terms in the ON, USING, and WHERE clause does not exceed 32. To do: make this work for any number of terms and add test cases. that (CVS 639) (check-in: [8b6574cfa8] user: drh branch: trunk, size: 63638)
12:20
[3e83a18bae] part of check-in [d861489e1f] Fix a VDBE stack leak in LEFT OUTER JOIN. Fix a bug in the code generator for JOIN ... USING(...). (CVS 638) (check-in: [d861489e1f] user: drh branch: trunk, size: 63169)
2002-06-22
02:33
[d71b59805f] part of check-in [8aa73ce612] An optimization: avoid the use of an intermediate table on UNION ALL if there is no ORDER BY clause. (CVS 637) (check-in: [8aa73ce612] user: drh branch: trunk, size: 63169)
2002-06-21
23:01
[346da88a44] part of check-in [9d55231079] Fix for bugs #77 and #80: Rework the LIMIT mechanism to be reentrant and to clean up the VDBE stack properly. (CVS 636) (check-in: [9d55231079] user: drh branch: trunk, size: 62712)
2002-06-20
03:38
[3eadcde4c7] part of check-in [43c5aff5d0] Fix for ticket #73: The ORDER BY clause is significant for subqueries. This passes all regression tests, but more testing is needed to exercise all paths through the new code. (CVS 631) (check-in: [43c5aff5d0] user: drh branch: trunk, size: 62208)
2002-06-19
14:27
[514b4b12f7] part of check-in [f09e19b43e] The query optimizer now attempts to satisfy an ORDER BY clause using an index. Sorting is still used if there are no suitable indices. (CVS 628) (check-in: [f09e19b43e] user: drh branch: trunk, size: 60365)
2002-06-14
22:38
[6c3a92d7a0] part of check-in [699cf36208] Make the LIMIT clause work even if the destination of the SELECT is something other than a callback. (Ticket #66) (CVS 619) (check-in: [699cf36208] user: drh branch: trunk, size: 60354)
2002-06-06
23:42
[1d5cb1ae0b] part of check-in [d939294994] Bug fix: do not segfault if a SELECT without a FROM clause includes the * wildcard in the result column list. (CVS 609) (check-in: [d939294994] user: drh branch: trunk, size: 59228)
18:54
[0293ec0190] part of check-in [7ac5bd293c] Added the %fallback directive to the lemon parser generator and used this in the parser to make the parse tables much smaller. This reduced the size of the library by 15K. (CVS 605) (check-in: [7ac5bd293c] user: drh branch: trunk, size: 59129)
2002-06-02
16:09
[ad9061b473] part of check-in [7acbf84b49] Enhance the ORDER BY clause so that an integer term means to sort by the corresponding column. (CVS 602) (check-in: [7acbf84b49] user: drh branch: trunk, size: 59274)
2002-05-31
15:51
[9a9f76d7d6] part of check-in [da61aa1d23] Refinements to NULL processing: NULLs are indistinct for DISTINCT and UNION. Multiplying a NULL by zero yields zero. In a CASE expression, a NULL comparison is considered false, not NULL. With these changes, NULLs in SQLite now work the same as in PostgreSQL and in Oracle. (CVS 600) (check-in: [da61aa1d23] user: drh branch: trunk, size: 58434)
2002-05-27
12:24
[6e84ac2be5] part of check-in [f8041f3d4d] A SELECT statement inside the body of a TRIGGER uses the SRT_Discard target to discard the query results. Such selects are intended to be used to call user-defined functions for their side-effects. They do not return results. (CVS 594) (check-in: [f8041f3d4d] user: drh branch: trunk, size: 58209)
03:25
[f3c814e8fd] part of check-in [f562d54230] Fix the "alias.*" bug found by Bernie Cosell and reported on the newsgroup. (CVS 593) (check-in: [f562d54230] user: drh branch: trunk, size: 57873)
2002-05-26
20:54
[9b404b6eeb] part of check-in [9051173742] NULL values are distinct. A comparison involving a NULL is always false. Operations on a NULL value yield a NULL result. This change makes SQLite operate more like the SQL spec, but it may break existing applications that assumed the old behavior. All the old tests pass but we still need to add new tests to better verify the new behavior. Fix for ticket #44. (CVS 589) (check-in: [9051173742] user: drh branch: trunk, size: 57829)
2002-05-25
00:18
[bbf00ee2b4] part of check-in [d8d04c14f1] Additional testing of LEFT OUTER JOIN. (CVS 588) (check-in: [d8d04c14f1] user: drh branch: trunk, size: 57706)
2002-05-24
20:31
[8f0ec9de36] part of check-in [99bd1f5b9a] Initial implementation of LEFT OUTER JOIN including the expanded SQL92 join syntax. The basic functionality is there but there is still a lot of testing to do. (CVS 587) (check-in: [99bd1f5b9a] user: drh branch: trunk, size: 57516)
16:14
[6e9f995908] part of check-in [e238643efd] Add support for the full SQL join syntax. This is just a parser enhancement. We now recognize all kinds of joins, but we don't actually do anything with them yet. (CVS 586) (check-in: [e238643efd] user: drh branch: trunk, size: 52310)
02:04
[c46f4e0784] part of check-in [a167b71d8c] Split the IdList structure into IdList and SrcList. SrcList is used to represent a FROM clause and IdList is used for everything else. This change allows SrcList to grow to support outer joins without burdening the other uses of IdList. (CVS 584) (check-in: [a167b71d8c] user: drh branch: trunk, size: 50550)
2002-05-08
11:54
[1b623a7d82] part of check-in [08f27cb368] Fix for tickets #32 and #33: Generate the names of the result set early, before doing the flattening optimization or evaluating subqueries. Otherwise, the result set column names are generated incorrectly or after they are needed. (CVS 553) (check-in: [08f27cb368] user: drh branch: trunk, size: 50534)
2002-04-30
19:20
[5e9fe2cdbb] part of check-in [24e4cf73d2] Fix for ticket #31: Do not attempt the flattening optimization if the subselect does not contain a FROM clause. Handle the special case where a WHERE clause is constant. (CVS 548) (check-in: [24e4cf73d2] user: drh branch: trunk, size: 50355)
2002-04-23
17:10
[0486011944] part of check-in [a06d9acdd5] Fix for ticket #22: In the code generator for compound SELECT statements, take care not to generate column name headers if the output is an intermediate table. Otherwise the column headers are not generated correctly if a compound SELECT statement appears as an expression in part of the WHERE clause. (CVS 543) (check-in: [a06d9acdd5] user: drh branch: trunk, size: 50309)
2002-04-04
02:10
[92aef3f69e] part of check-in [c2320eabfe] Fix for bug #2: Add support for TABLE.* in SELECT statements. (CVS 518) (check-in: [c2320eabfe] user: drh branch: trunk, size: 50219)
2002-03-23
00:31
[9323800e29] part of check-in [aaf7fd4cef] Fix a bug in subquery generation when the subquery is a compound select. Also added new tests to cover this case. (CVS 435) (check-in: [aaf7fd4cef] user: drh branch: trunk, size: 48855)
2002-03-14
14:33
[08b9d8acf7] part of check-in [a3a360b308] Bug fix: allow ROWID as a column in SELECT statements where the FROM clause includes views which are flattened. (CVS 431) (check-in: [a3a360b308] user: drh branch: trunk, size: 48688)
2002-03-07
02:02
[1288243cac] part of check-in [0a51323561] Fix a bug in the sorting of compound selects. (CVS 423) (check-in: [0a51323561] user: drh branch: trunk, size: 48610)
2002-03-03
18:59
[49c78aa0c9] part of check-in [6121e5ab93] VIEWs are bound to tables when they are used, not when they are first entered. This works around the problem of what to do if a table is deleted that a view refers to. (CVS 415) (check-in: [6121e5ab93] user: drh branch: trunk, size: 48624)
03:03
[68d4ee84e6] part of check-in [000441c8fe] Suppress superfluous OP_OpenTemps when flattening subqueries. (CVS 412) (check-in: [000441c8fe] user: drh branch: trunk, size: 48514)
02:49
[285a9cfa67] part of check-in [2c05389eda] Bug fixes and additional tests for the subquery flattener. (CVS 411) (check-in: [2c05389eda] user: drh branch: trunk, size: 48376)
2002-03-02
17:04
[b99de04f6f] part of check-in [d5d3e79cc5] Subquery flattening is implemented and passes all regression tests. We still need to add addition tests to the suite to further exercise the flattener, however. (CVS 408) (check-in: [d5d3e79cc5] user: drh branch: trunk, size: 47222)
2002-02-28
01:46
[1851abd794] part of check-in [6af10cc53a] Fix the coredump. There are still problems in the test suite though. (CVS 402) (check-in: [6af10cc53a] user: drh branch: trunk, size: 42484)
00:41
[0aeaf678ba] part of check-in [50797fee50] Completely remove the old SQL function system and replace it with the new user functions. The code currently compiles but it coredumps on the test suite. Do not use in its present state. (CVS 400) (check-in: [50797fee50] user: drh branch: trunk, size: 42468)
2002-02-27
19:00
[a8e90e8f83] part of check-in [633951f0fa] Revise the API for user-defined functions. (CVS 398) (check-in: [633951f0fa] user: drh branch: trunk, size: 43420)
01:47
[c74b6349d5] part of check-in [668ef6380e] Bug fixes in the VIEW implementation. (CVS 396) (check-in: [668ef6380e] user: drh branch: trunk, size: 41242)
2002-02-24
03:25
[410e4dfff7] part of check-in [1e037eb303] Code for user-defined aggregates added. Legacy tests all pass but there has been no testing of the new user-defined aggregate code. (CVS 392) (check-in: [1e037eb303] user: drh branch: trunk, size: 40268)
2002-02-23
02:32
[61d4a73995] part of check-in [39fed2df11] Code to implement CREATE VIEW is in place. A quick smoke test shows that it works, but there are probably still many bugs. (CVS 387) (check-in: [39fed2df11] user: drh branch: trunk, size: 39610)
2002-02-21
12:01
[f0cbfd2d90] part of check-in [b2a9807fed] Change the SQLITE_MASTER format to version 2 in preparation for adding views. (CVS 386) (check-in: [b2a9807fed] user: drh branch: trunk, size: 39520)
2002-02-19
22:42
[282f37b2fd] part of check-in [1686196a8a] New ROWIDs are numbered sequentially. (CVS 383) (check-in: [1686196a8a] user: drh branch: trunk, size: 39090)
15:00
[6dadbd3ba1] part of check-in [cc5abfe392] Optimize simple min() and max() queries. (CVS 382) (check-in: [cc5abfe392] user: drh branch: trunk, size: 38787)
2002-02-18
03:21
[d2bbaf4cba] part of check-in [607c0c49b2] Test and documentation updates for sub-queries. (CVS 373) (check-in: [607c0c49b2] user: drh branch: trunk, size: 35493)
01:17
[48c14a44da] part of check-in [89ffa9ff13] Add support for subqueries in the FROM clause of a SELECT. Still need to add tests for this feature. (CVS 372) (check-in: [89ffa9ff13] user: drh branch: trunk, size: 35290)
2002-02-17
00:30
[631fe7c1e0] part of check-in [2336b1eada] Make the sqliteParseInfoReset() function locale to the select.c file. (CVS 371) (check-in: [2336b1eada] user: drh branch: trunk, size: 33831)
2002-02-13
23:22
[4b4a25c57c] part of check-in [df6bf627a5] Bug fix: if PRAGMA full_column_names=ON is set and you do a query like this: "SELECT rowid,* FROM ...", then an assertion failed. Bummer. (CVS 368) (check-in: [df6bf627a5] user: drh branch: trunk, size: 33303)
2002-02-03
19:06
[b32d3f3861] part of check-in [20ea737536] Fix a serious bug in INSERT when the source is a SELECT. (CVS 366) (check-in: [20ea737536] user: drh branch: trunk, size: 33278)
2002-01-28
15:53
[fc11d5a8c2] part of check-in [dbcfe198fb] Bug fix: The IN operator was not working if either side derived from an INTEGER PRIMARY KEY. (CVS 354) (check-in: [dbcfe198fb] user: drh branch: trunk, size: 33278)
2002-01-22
14:11
[de0d1d12e2] part of check-in [035984a5b0] Constant ORDER BY or GROUP BY expressions are an error. (CVS 352) (check-in: [035984a5b0] user: drh branch: trunk, size: 33254)
03:13
[f944a94d50] part of check-in [3684beab0f] The right-hand side of an AS in a SELECT can be used within expressions of the WHERE, ORDER BY, GROUP BY, and/or HAVING clauses. (CVS 350) (check-in: [3684beab0f] user: drh branch: trunk, size: 32864)
2002-01-04
03:09
[bddd8b5d07] part of check-in [011be9a9d2] An attempt to delete a single row using a WHERE clause that specifies the rowid would result in an error if the rowid did not exist. This problem has been resolved. (CVS 338) (check-in: [011be9a9d2] user: drh branch: trunk, size: 32845)
2001-12-31
02:48
[79120c805d] part of check-in [18e606f748] Comment changes. Change the use of BTree so that either the key is an integer or the data is empty. (CVS 337) (check-in: [18e606f748] user: drh branch: trunk, size: 32845)
2001-12-22
14:49
[bb7bf8d6e6] part of check-in [29cab124b4] Bug fixing in the new integer primary key code. (CVS 334) (check-in: [29cab124b4] user: drh branch: trunk, size: 33031)
2001-12-16
20:05
[76a8fafb29] part of check-in [ffbdd43f5d] Added the ability to say things like "SELECT rowid, * FROM table1;" (CVS 332) (check-in: [ffbdd43f5d] user: drh branch: trunk, size: 32976)
2001-11-07
16:48
[fa1c7144a9] part of check-in [decbeb9151] New Next opcode and indexing style implemented. (CVS 304) (check-in: [decbeb9151] user: drh branch: trunk, size: 32197)
14:22
[a97d3d27c5] part of check-in [e6ca23fa45] Incremental update. We are in the middle of modifying the index system to support range queries without doing a complete table scan. (CVS 303) (check-in: [e6ca23fa45] user: drh branch: trunk, size: 32067)
2001-11-06
14:10
[da60dfdd44] part of check-in [177012249a] Added support for LIMIT. (CVS 302) (check-in: [177012249a] user: drh branch: trunk, size: 32067)
04:00
[008d79761a] part of check-in [eb07768ae9] Implement indices that occur in sort order and the LIMIT...OFFSET clause of SELECT statements. (CVS 301) (check-in: [eb07768ae9] user: drh branch: trunk, size: 31851)
2001-11-01
14:41
[c34b02eafa] part of check-in [e1370276c2] Remove cruft: restrict the number of sorters and lists in the VDBE to one since no more than one was ever used anyway. This eliminates several op-codes and simplifies the implementation of several others. (CVS 297) (check-in: [e1370276c2] user: drh branch: trunk, size: 31480)
2001-10-22
02:58
[d14511afac] part of check-in [f8328a5f11] More changes for 2.0.7. (CVS 293) (check-in: [f8328a5f11] user: drh branch: trunk, size: 31711)
2001-10-20
12:30
[898b27a324] part of check-in [a835658e50] 2.0.7 (CVS 292) (check-in: [a835658e50] user: drh branch: trunk, size: 31655)
2001-10-19
16:44
[10957c2fd5] part of check-in [8467d84fc6] Version 2.0.6 (CVS 291) (check-in: [8467d84fc6] user: drh branch: trunk, size: 31638)
2001-10-18
12:34
[0e8089c5ae] part of check-in [22948fc685] Support for UTF-8 and ISO8859 characters in identifiers. Bug fix in the column name generator for selects (was coreing). (CVS 290) (check-in: [22948fc685] user: drh branch: trunk, size: 31431)
2001-10-15
00:44
[75bb3ca7fd] part of check-in [747bf1b30b] Added support for the COUNT_CHANGES pragma in order to help out the ODBC driver. Fixed a but on count(*) when applied to empty tables. (CVS 289) (check-in: [747bf1b30b] user: drh branch: trunk, size: 31401)
2001-10-13
01:06
[ff4dc2271b] part of check-in [288ef1247b] Remove the P3 and label arguments from the internal sqliteVdbeAddOp() function. This makes the code easier to read and perhaps smaller as well. (CVS 286) (check-in: [288ef1247b] user: drh branch: trunk, size: 30822)
2001-10-06
16:33
[0ef8ca1b7d] part of check-in [b63b3f3684] Adding table column query capability to support ODBC. (CVS 278) (check-in: [b63b3f3684] user: drh branch: trunk, size: 30650)
2001-09-16
00:13
[7d90a64649] part of check-in [4e926efe2b] Disclaimed copyright. Preparing for release 2.0. (CVS 250) (check-in: [4e926efe2b] user: drh branch: trunk, size: 30600)
2001-09-14
03:24
[f1673b4d06] part of check-in [e7b65e37fd] All tests now pass. But there are still issues. For example, inserts are way too slow. And additional tests are needed for new features. (CVS 243) (check-in: [e7b65e37fd] user: drh branch: trunk, size: 31145)
2001-09-13
21:53
[1e37bea8f9] part of check-in [62c7bd11bc] Many problems fixed. Many problems yet to go. (CVS 242) (check-in: [62c7bd11bc] user: drh branch: trunk, size: 31127)
16:18
[0f7e6652b5] part of check-in [9ac8399c99] It runs. Simple tables can be created. INSERT and SELECT work. Much more testing is needed, however. (CVS 241) (check-in: [9ac8399c99] user: drh branch: trunk, size: 31076)
14:46
[391921bcc6] part of check-in [a0a1e701ab] The BTree changes are now integrated and the whole thing compiles and links. I have not yet tried to run it, though. (CVS 239) (check-in: [a0a1e701ab] user: drh branch: trunk, size: 30966)
13:46
[e5977916f5] part of check-in [6ecc8b20d4] The code is in place to replace GDBM with BTree. But I have not yet attempted to compile it. I am sure the code contains bugs. (CVS 238) (check-in: [6ecc8b20d4] user: drh branch: trunk, size: 30960)
2001-04-11
14:28
[52bb7d081a] part of check-in [86b30cd097] better handling of out-of-memory errors (CVS 207) (check-in: [86b30cd097] user: drh branch: trunk, size: 30955)
2001-04-04
11:48
[a6bfdaa92d] part of check-in [35a8feed0d] Added transaction support (CVS 196) (check-in: [35a8feed0d] user: drh branch: trunk, size: 29796)
2001-02-19
23:23
[faac634ef0] part of check-in [4fb52b4824] Repairs to the previous fix (CVS 186) (check-in: [4fb52b4824] user: drh branch: trunk, size: 29731)
2001-01-15
22:51
[0cadab95c8] part of check-in [c6ffb7ec6a] continued progress toward version 2.0 (CVS 177) (check-in: [c6ffb7ec6a] user: drh branch: trunk, size: 29727)
2000-10-16
22:06
[c1de8ac341] part of check-in [f7ea08b931] Added an interrupt capability (CVS 153) (check-in: [f7ea08b931] user: drh branch: trunk, size: 29637)
2000-07-29
13:06
[d382e96c22] part of check-in [3bf434d93a] better column labels in select results (CVS 110) (check-in: [3bf434d93a] user: drh branch: trunk, size: 29647)
2000-06-21
13:59
[aaf23d4a6e] part of check-in [e1bf96a467] :-) (CVS 104) (check-in: [e1bf96a467] user: drh branch: trunk, size: 29379)
2000-06-19
19:09
[2a91f683d6] part of check-in [8cce4d279d] :-) (CVS 102) (check-in: [8cce4d279d] user: drh branch: trunk, size: 29336)
2000-06-08
15:10
[3a12d76074] part of check-in [61c381e7e6] :-) (CVS 81) (check-in: [61c381e7e6] user: drh branch: trunk, size: 29337)
13:36
[b1ffe8e6a0] part of check-in [bf98cf82a7] remove all memory leaks (CVS 80) (check-in: [bf98cf82a7] user: drh branch: trunk, size: 29337)
11:25
[d0b54f5f5a] part of check-in [305b043f4f] :-) (CVS 79) (check-in: [305b043f4f] user: drh branch: trunk, size: 29307)
11:13
[f3720cad99] part of check-in [923c14fe12] :-) (CVS 78) (check-in: [923c14fe12] user: drh branch: trunk, size: 29253)
01:55
[561f34a858] part of check-in [b3fb15ccde] :-) (CVS 77) (check-in: [b3fb15ccde] user: drh branch: trunk, size: 29076)
00:28
[5d97d2542a] part of check-in [1902923308] :-) (CVS 76) (check-in: [1902923308] user: drh branch: trunk, size: 29039)
00:19
[409c388580] part of check-in [c47d552e7e] :-) (CVS 75) (check-in: [c47d552e7e] user: drh branch: trunk, size: 28861)
2000-06-07
23:51
[21d1097e32] part of check-in [2ffeb8509c] :-) (CVS 74) (check-in: [2ffeb8509c] user: drh branch: trunk, size: 28207)
14:42
[4834ab68a3] part of check-in [5d773b5d4e] :-) (CVS 1697) (check-in: [5d773b5d4e] user: drh branch: trunk, size: 21607)
2000-06-06
22:13
[74fa3af62b] part of check-in [65d2100d33] :-) (CVS 63) (check-in: [65d2100d33] user: drh branch: trunk, size: 21318)
21:56
[db29a091b6] part of check-in [f4d9089c5d] :-) (CVS 62) (check-in: [f4d9089c5d] user: drh branch: trunk, size: 21329)
18:00
[5fd6fbd73f] part of check-in [a8fa6719d5] :-) (CVS 59) (check-in: [a8fa6719d5] user: drh branch: trunk, size: 16455)
17:27
[77906ffaae] part of check-in [db88a0c2d4] GROUP BY and HAVING installed (CVS 58) (check-in: [db88a0c2d4] user: drh branch: trunk, size: 16451)
13:54
[a1891cfce0] part of check-in [54d198189b] added IN and BETWEEN operators (CVS 57) (check-in: [54d198189b] user: drh branch: trunk, size: 12971)
01:50
[d90d577aa7] part of check-in [bd8b2645cc] :-) (CVS 55) (check-in: [bd8b2645cc] user: drh branch: trunk, size: 12686)
2000-06-05
18:54
[ab379f9692] part of check-in [c02268bdf4] :-) (CVS 52) (check-in: [c02268bdf4] user: drh branch: trunk, size: 12532)
16:01
[98f417b72e] part of check-in [ce45dea902] separate Select structure (CVS 51) (check-in: [ce45dea902] user: drh branch: trunk, size: 10625)
2000-06-04
12:58
[2dff3d237d] part of check-in [6ea5cebf05] rework the VDBE engine. NULL is now distinct from "" (CVS 49) (check-in: [6ea5cebf05] user: drh branch: trunk, size: 9044)
2000-06-03
18:06
[2f4ae48dea] part of check-in [27c0678623] added default values (CVS 46) (check-in: [27c0678623] user: drh branch: trunk, size: 8996)
2000-06-02
01:51
[ce21eb2db2] part of check-in [d3c31defba] :-) (CVS 36) (check-in: [d3c31defba] user: drh branch: trunk, size: 8986)
2000-05-31
20:00
[25cada7cb2] part of check-in [1f0c4ffd98] added DISTINCT on select (CVS 27) (check-in: [1f0c4ffd98] user: drh branch: trunk, size: 8986)
18:20
[719ca9605a] part of check-in [35a8f523e8] :-) (CVS 25) (check-in: [35a8f523e8] user: drh branch: trunk, size: 8206)
15:34
Added: [540fae9163] part of check-in [dee7a8be88] added aggregate functions like count(*) (CVS 21) (check-in: [dee7a8be88] user: drh branch: trunk, size: 8094)