/ All files named "src/select.c"
Login

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

History for src/select.c

2020-11-08
20:44
[31387e56] part of check-in [76d2eb86] Use NEVER and ALWAYS macros to confirm that the return value from sqlite3ExprSkipCollateAndLikely() is never NULL in some of its use cases. (check-in: [76d2eb86] user: drh branch: trunk, size: 254676)
2020-11-02
00:40
[507c5419] part of check-in [6646d789] Fix an another OSS-Fuzz discovered assertion fault due to ALTER TABLE and strange triggers. (check-in: [6646d789] user: drh branch: trunk, size: 254653)
2020-10-19
20:49
[645aa47f] part of check-in [75a02888] 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: [75a02888] user: drh branch: trunk, size: 254673)
01:23
[aabd9087] part of check-in [5481fa8c] 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: [5481fa8c] user: drh branch: cte-enhancement, size: 254673)
2020-09-30
15:36
[0d9ce195] part of check-in [69f9eb73] 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: [69f9eb73] user: drh branch: trunk, size: 253135)
2020-09-17
00:46
[6c3f7d60] part of check-in [7d2b590d] DISTINCT may not be ignored inside a UNION ALL common table expression. Fix for ticket [c51489c3b8f919c5] (check-in: [7d2b590d] user: drh branch: trunk, size: 253179)
2020-08-19
23:32
[233e884d] part of check-in [871f2ddc] 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: [871f2ddc] user: drh branch: trunk, size: 253269)
2020-08-10
21:16
[02c5b12c] part of check-in [ed4c742c] Merge recent trunk enhancements into begin-concurrent. (check-in: [ed4c742c] user: drh branch: begin-concurrent, size: 253279)
2020-08-08
17:02
[510fdf81] part of check-in [5ecd03a2] Change the name of sqlite3SelectTrace to sqlite3_unsupported_selecttrace. (check-in: [5ecd03a2] user: dan branch: trunk, size: 253264)
2020-07-30
19:19
[52f65324] part of check-in [e8a66515] Merge latest trunk changes into this branch. (check-in: [e8a66515] user: dan branch: begin-concurrent, size: 253110)
17:37
[d977d463] part of check-in [96e3dba2] Fix compiler warnings in MSVC. (check-in: [96e3dba2] user: drh branch: trunk, size: 253095)
2020-07-29
16:18
[781c973d] part of check-in [a80ae2c9] 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: [a80ae2c9] user: drh branch: typos, size: 253091)
2020-07-23
14:27
[9ccea209] part of check-in [dd39418e] Merge fixes from trunk. (check-in: [dd39418e] user: drh branch: larger-databases, size: 253090)
14:12
[860ee5f1] part of check-in [6a3111cd] 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: [6a3111cd] user: drh branch: trunk, size: 253090)
2020-07-22
13:38
[0e75d640] part of check-in [9ce1710a] Continuing work toward supporting unsigned 32-bit page numbers. (check-in: [9ce1710a] user: drh branch: larger-databases, size: 253193)
2020-07-20
18:07
[39c6b63d] part of check-in [5cc20093] Fix a corner-case error in the new UPDATE FROM logic helpfully discovered by OSSFuzz. (check-in: [5cc20093] user: drh branch: trunk, size: 253193)
13:11
[835a86f1] part of check-in [de2a9081] Faster column name lookup in the columnIndex() routine using hashing. (check-in: [de2a9081] user: drh branch: trunk, size: 252857)
2020-07-17
18:07
[ee84981a] part of check-in [587ded60] Use #ifdef to omit code that is only reachable when the SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option is used. (check-in: [587ded60] user: drh branch: update-from, size: 252774)
16:31
[d338c9b9] part of check-in [d90a37e9] Make it an error to repeat the target object/alias of an UPDATE statement in its FROM clause. (check-in: [d90a37e9] user: dan branch: update-from, size: 252671)
2020-07-15
11:00
[a48570f6] part of check-in [53b8b507] Update this branch with changes from trunk. (check-in: [53b8b507] user: dan branch: update-from, size: 251924)
2020-07-14
22:20
[5293c60d] part of check-in [81e64509] Now appears to work. All legacy tests pass. Need to add new tests, however. (check-in: [81e64509] user: drh branch: minmax-opt-exp, size: 250980)
01:03
[d9f067b2] part of check-in [61443872] Merge latest changes from trunk. This branch still does not work. (check-in: [61443872] user: drh branch: minmax-opt-exp, size: 250788)
2020-07-13
18:04
[01d1daa9] part of check-in [5ee3c27e] Merge latest trunk changes with this branch. (check-in: [5ee3c27e] user: dan branch: update-from, size: 251957)
2020-07-10
21:43
[2a509939] part of check-in [1e87da9c] Remove unnecessary code from the window functions implementation. (check-in: [1e87da9c] user: drh branch: trunk, size: 251013)
19:09
[14d212b9] part of check-in [4a64c16f] An attempt to get the Min/Max optimization working with IN constraints. Not currently working. (check-in: [4a64c16f] user: drh branch: minmax-opt-exp, size: 251310)
2020-07-01
14:07
[860daa05] part of check-in [2094da75] 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: [2094da75] user: dan branch: trunk, size: 251535)
2020-06-29
16:30
[bc25f48e] part of check-in [1b426603] Do not run resetAccumulator() after a malloc failure. (check-in: [1b426603] user: drh branch: trunk, size: 251327)
2020-06-19
15:24
[10ab055a] part of check-in [7a876209] Extend the refactoring into extensions. Clean up stray newlines. (check-in: [7a876209] user: drh branch: trunk, size: 251299)
2020-06-17
12:37
[bbd52d84] part of check-in [d55b8e79] Merge miscellaneous fixes from trunk into the 3.32 branch. (check-in: [d55b8e79] user: drh branch: branch-3.32, size: 251333)
2020-06-15
13:51
[6ddd86a7] part of check-in [10fa79d0] Fix a defect in the query-flattener optimization identified by ticket [8f157e8010b22af0]. (check-in: [10fa79d0] user: drh branch: trunk, size: 251301)
2020-06-13
21:24
[1a791ad4] part of check-in [cc1fffde] Avoid deleting expression nodes in the flattener code, as they may be referenced by AggInfo objects further up the stack. Ticket [e367f31901ea8700] (check-in: [cc1fffde] user: dan branch: trunk, size: 251390)
2020-06-11
16:04
[929e1c0d] part of check-in [98cea4a3] Add a new assert() to the SELECT processing. (check-in: [98cea4a3] user: drh branch: trunk, size: 251272)
15:53
[4cf6adb5] part of check-in [32a88bdd] 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: [32a88bdd] user: dan branch: trunk, size: 251071)
15:47
[954e6ef6] part of check-in [50b4a1c7] 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: [50b4a1c7] user: dan branch: mistake, size: 251070)
00:57
[733ae255] part of check-in [30c6d895] 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: [30c6d895] user: drh branch: trunk, size: 250637)
2020-06-10
11:01
[62ad2c28] part of check-in [d31850fe] 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: [d31850fe] user: dan branch: branch-3.32, size: 250870)
11:01
[fbdbf6d5] part of check-in [7e2833fb] Disable AggInfo consistency checks when unwinding after an OOM. (check-in: [7e2833fb] user: dan branch: branch-3.32, size: 250805)
10:58
[b7bbec20] part of check-in [094dcfe7] 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: [094dcfe7] user: dan branch: trunk, size: 250928)
03:07
[4daa7ac6] part of check-in [65179814] Disable AggInfo consistency checks when unwinding after an OOM. (check-in: [65179814] user: drh branch: trunk, size: 250863)
2020-06-09
14:56
[0944abec] part of check-in [9a4cc1db] Crazy experimental change to refcount the AggInfo objects. (check-in: [9a4cc1db] user: drh branch: refcount-agginfo, size: 250671)
13:38
[a1f5efdb] part of check-in [a53bdd31] Give the expression pointer fields of AggInfo distinctive names in order to simplify tracking of all their uses. (check-in: [a53bdd31] user: drh branch: trunk, size: 250842)
11:59
[13018083] part of check-in [b5711b4e] Improved tree-view debugging output for aggregate functions. (check-in: [b5711b4e] user: drh branch: trunk, size: 250826)
2020-06-08
12:49
[bafed8a4] part of check-in [44a58d6c] 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: [44a58d6c] user: drh branch: branch-3.32, size: 250784)
2020-06-07
20:18
[fb79ed71] part of check-in [3c840b4d] 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: [3c840b4d] user: drh branch: persist-agginfo, size: 250794)
17:33
[6eb5d0c5] part of check-in [7682d8a7] 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: [7682d8a7] user: drh branch: persist-agginfo, size: 250858)
00:51
[0133ae36] part of check-in [765bbcce] 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: [765bbcce] user: drh branch: branch-3.32-early-winfunc-rewrite, size: 251135)
00:43
[090f3968] part of check-in [a6c2147c] 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: [a6c2147c] user: drh branch: early-winfunc-rewrite-dev, size: 251100)
2020-06-06
20:48
[cb56760c] part of check-in [05418b2a] Merge multiple changes from trunk to address concerns with window-function parse-tree rewriting. (check-in: [05418b2a] user: drh branch: branch-3.32-early-winfunc-rewrite, size: 250702)
19:54
[34c441aa] part of check-in [0e021887] Fix a possible ASAN violation inside of debug-only code following an OOM. (check-in: [0e021887] user: drh branch: early-winfunc-rewrite-dev, size: 250667)
18:34
[4dbe6dc1] part of check-in [03b32be4] 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: [03b32be4] user: drh branch: early-winfunc-rewrite-dev, size: 250624)
14:58
[a63301ff] part of check-in [3926ff17] Remove an incorrect assert() added earlier today. (check-in: [3926ff17] user: drh branch: early-winfunc-rewrite-dev, size: 249658)
14:44
[d6cc890f] part of check-in [2cddb24e] 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: [2cddb24e] user: drh branch: early-winfunc-rewrite-dev, size: 249705)
13:29
[89d5630c] part of check-in [3de19ee2] Avoid no-op calls to sqlite3SelectPrep() when processing sqlite3Select() for subqueries. This simplifies the ".selecttrace" debugging output. (check-in: [3de19ee2] user: drh branch: early-winfunc-rewrite-dev, size: 249699)
2020-06-05
15:56
[cba1c0e3] part of check-in [79eff1d0] Do parse-tree transformations required for window functions prior to running aggregate function analysis. Fix for ticket [c8d3b9f0a750a529]. (check-in: [79eff1d0] user: drh branch: branch-3.32-early-winfunc-rewrite, size: 249622)
14:53
[1708c0ef] part of check-in [2011e832] 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: [2011e832] user: dan branch: early-winfunc-rewrite, size: 249632)
14:25
[cff4a9ae] part of check-in [13ffedab] ALWAYS() and NEVER() macros added due to unreachable branches arising from the previous check-in. (check-in: [13ffedab] user: drh branch: early-winfunc-rewrite, size: 249567)
14:10
[1204f18a] part of check-in [fe702aa0] 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: [fe702aa0] user: drh branch: early-winfunc-rewrite, size: 249559)
2020-05-25
17:27
[f92fe19c] part of check-in [5e08e360] Merge version 3.32.1 into the begin-concurrent branch. (check-in: [5e08e360] user: drh branch: begin-concurrent, size: 249927)
01:31
[39a00a8b] part of check-in [d4bf60f4] Attempt to work around a false-positive warning in the CGo compiler. (check-in: [d4bf60f4] user: drh branch: cgo-warning-workaround, size: 249922)
2020-05-24
03:01
[e2a59548] part of check-in [dac43823] Move some utility Walker callbacks into the walker.c source file, as they seem to belong there better. (check-in: [dac43823] user: drh branch: trunk, size: 249912)
02:05
[7fe29026] part of check-in [f7e5a68a] Improvements to parse-tree tracing logic. No changes in deliverable code. (check-in: [f7e5a68a] user: drh branch: trunk, size: 250624)
2020-05-18
15:41
[23d31a8b] part of check-in [9e4a7b3e] Merge latest trunk changes into this branch. (check-in: [9e4a7b3e] user: dan branch: begin-concurrent, size: 250625)
2020-05-08
18:22
[ee4b02ad] part of check-in [0d23a0b2] Fix the count-optimization so that it honors the NOT INDEXED clause. (check-in: [0d23a0b2] user: drh branch: trunk, size: 250610)
2020-05-01
15:04
[1720bff2] part of check-in [2100b2c8] Merge recent trunk enhancements. (check-in: [2100b2c8] user: drh branch: approximate-analyze, size: 250538)
2020-04-29
20:11
[51882f7b] part of check-in [b717dc3c] Fix problems with using LIMIT and FROM clauses as part of single UPDATE statement. (check-in: [b717dc3c] user: dan branch: update-from, size: 251556)
17:41
[88ffd4e1] part of check-in [823ba94e] Fix various bugs in new feature on this branch. (check-in: [823ba94e] user: dan branch: update-from, size: 251035)
2020-04-27
20:55
[7e56a586] part of check-in [f353a1a6] Allow a FROM clause in UPDATE statements. (check-in: [f353a1a6] user: dan branch: update-from, size: 250728)
2020-04-25
15:01
[c310de94] part of check-in [ac31edd3] 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: [ac31edd3] user: dan branch: trunk, size: 250612)
2020-04-09
18:29
[150b1ce2] part of check-in [92f71a88] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [92f71a88] user: drh branch: begin-concurrent, size: 250590)
15:01
[af16360d] part of check-in [17901ea6] Merge trunk enhancements into the approximate-analyze branch. (check-in: [17901ea6] user: drh branch: approximate-analyze, size: 250501)
2020-04-06
18:16
[ab4eb1ae] part of check-in [1e4b6a93] Performance improvement for column name lookup. (check-in: [1e4b6a93] user: drh branch: trunk, size: 250575)
2020-04-04
00:29
[ac24b7dd] part of check-in [43612157] 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: [43612157] user: drh branch: branch-3.31, size: 249203)
00:15
[7aa91ab3] part of check-in [70c44811] 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: [70c44811] user: drh branch: trunk, size: 250533)
2020-04-03
13:39
[f57c7226] part of check-in [b6467491] 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: [b6467491] user: drh branch: branch-3.31, size: 249155)
13:19
[fd38aa7f] part of check-in [4a302b42] 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: [4a302b42] user: drh branch: trunk, size: 250485)
2020-03-31
18:41
[ef862666] part of check-in [c705ce26] Merge recent enhancements from trunk. (check-in: [c705ce26] user: drh branch: approximate-analyze, size: 250382)
2020-03-21
23:10
[6908c059] part of check-in [5d14a1c4] Fix to the recomputation of the colUsed field added by check-in [a9bb71ba708ba722]. This fixes ticket [5829597ac43811e3]. (check-in: [5d14a1c4] user: drh branch: trunk, size: 250456)
14:05
[ba6d286e] part of check-in [2383aa2c] Merge updates from trunk. (check-in: [2383aa2c] user: drh branch: explain-improvements, size: 250528)
00:05
[cb7588bf] part of check-in [a9bb71ba] Recompute the set of columns used for each table when the table is involved in query flattening. (check-in: [a9bb71ba] user: drh branch: trunk, size: 250510)
2020-03-19
21:17
[128d9d69] part of check-in [3cf7537b] Initial code for a proposed new sqlite3_stmt_mode() API. This is an incomplete snapshot of a work-in-progress. (check-in: [3cf7537b] user: drh branch: sqlite3_stmt_mode, size: 249156)
2020-03-17
13:41
[04a4138c] part of check-in [a9bfa47a] Remove the SQLITE_OMIT_BTREECOUNT option. Btree count is required. (check-in: [a9bfa47a] user: drh branch: approximate-analyze, size: 249064)
2020-03-16
18:52
[49d46ace] part of check-in [38e3dd38] 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: [38e3dd38] user: dan branch: trunk, size: 249138)
2020-02-27
16:21
[c94eec31] part of check-in [951b39ca] Fix harmless compiler warnings from MSVC. (check-in: [951b39ca] user: drh branch: trunk, size: 249164)
15:07
[ba2280da] part of check-in [59726777] 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: [59726777] user: dan branch: trunk, size: 249160)
2020-02-23
17:34
[466f5738] part of check-in [c431b3fd] Fix a problem with ALTER TABLE for views that have a nested FROM clause. Ticket [f50af3e8a565776b]. (check-in: [c431b3fd] user: drh branch: trunk, size: 249100)
2020-02-20
14:08
[59ba85dc] part of check-in [a67cf5b7] 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: [a67cf5b7] user: drh branch: trunk, size: 249079)
2020-02-13
22:12
[9e5b357f] part of check-in [c9a8defc] Fix problems in the constant propagation optimization that were introduced by check-in [1c3e5c20a9e6f501]. Fix for ticket [1dcb4d44964846ad] (check-in: [c9a8defc] user: drh branch: trunk, size: 249055)
2020-02-07
19:44
[28defa33] part of check-in [bcf876e6] During byte-code generation, strive to avoid jumps that merely jump to the following instruction. (check-in: [bcf876e6] user: drh branch: trunk, size: 249135)
2020-01-22
20:56
[f677c53a] part of check-in [bbbc2881] Merge version 3.31.0 (check-in: [bbbc2881] user: drh branch: begin-concurrent, size: 249141)
2020-01-21
16:23
[3f7aecf6] part of check-in [934ee8bd] Fix a problem with using views in SQLITE_OMIT_VIRTUAL_TABLE builds. Also some test case fixes required for the same builds. (check-in: [934ee8bd] user: dan branch: trunk, size: 249126)
14:42
[5924f8df] part of check-in [c7e29458] Fix an assert() that could fail in SQLITE_MUTATION_TEST builds following an error in a query that uses CTEs. (check-in: [c7e29458] user: dan branch: trunk, size: 249086)
2020-01-17
19:14
[1b787876] part of check-in [7584e4b6] Fix #ifdefs so it compiles cleanly with all SQLITE_OMIT compile-time options. Update compile-time option testing. (check-in: [7584e4b6] user: drh branch: trunk, size: 249070)
2020-01-16
17:53
[28211b0e] part of check-in [52206488] New testcase() macros in select.c, for coverage of the change from two check-ins ago. (check-in: [52206488] user: drh branch: trunk, size: 248957)
16:12
[3e3a7ba4] part of check-in [1bc783da] 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: [1bc783da] user: drh branch: trunk, size: 248842)
2020-01-15
13:34
[d9ce0406] part of check-in [95ba2f50] Merge fixes and enhancements from trunk into begin-concurrent. (check-in: [95ba2f50] user: drh branch: begin-concurrent, size: 248845)
2020-01-09
20:44
[924b61ce] part of check-in [5720924c] Merge in the untrusted-schema enhancements. See doc/trusted-schema.md for details. (check-in: [5720924c] user: drh branch: trunk, size: 248830)
20:33
[c88a3597] part of check-in [edbf911f] Fix a harmless compiler warning. (check-in: [edbf911f] user: drh branch: trunk, size: 248517)
13:08
[0ae5299e] part of check-in [d662129a] Simplified error message for the unsafe use of a virtual table. (check-in: [d662129a] user: drh branch: new-security-options, size: 248838)
2020-01-08
13:08
[fbae5d6d] part of check-in [5962921f] Merge recent changes from trunk. (check-in: [5962921f] user: drh branch: new-security-options, size: 248857)
04:36
[de96e8a2] part of check-in [1c3e5c20] Simplification of the logic in the constant-propagation optimization. (check-in: [1c3e5c20] user: drh branch: trunk, size: 248525)
01:43
[63ef2d19] part of check-in [6db1c349] Fix the constant propagation optimization so that it does not try to propagate constant expressions that have affinity. Ticket [82ac75ba0093e5dc] (check-in: [6db1c349] user: drh branch: trunk, size: 248306)
00:39
[bff6f4e1] part of check-in [ee0bc7ed] Fix a misworded comment. No code changes. (check-in: [ee0bc7ed] user: drh branch: trunk, size: 248233)
2020-01-07
18:10
[a2be95cc] part of check-in [3d87ff31] Enforce SQLITE_VTABRISK restrictions. (check-in: [3d87ff31] user: drh branch: new-security-options, size: 248631)
2020-01-06
17:06
[80d1aac7] part of check-in [1409758f] Ensure the SF_Aggregate flag on a SELECT statement is set if a DISTINCT is transformed to a GROUP BY. Ticket [9c944882]. (check-in: [1409758f] user: dan branch: trunk, size: 248299)
2020-01-03
13:55
[64bf450d] part of check-in [4889cbf8] Ensure that when a Select object is reset a new, empty, SrcList is allocated. (check-in: [4889cbf8] user: dan branch: trunk, size: 248266)
02:20
[6a2d755e] part of check-in [ff9492d3] 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: [ff9492d3] user: drh branch: trunk, size: 248202)
2020-01-02
21:41
[8791103f] part of check-in [bd57e6d9] Merge the latest enhancements from trunk. (check-in: [bd57e6d9] user: drh branch: two-size-lookaside, size: 248170)
2020-01-01
20:17
[ba1af88f] part of check-in [ce141732] 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: [ce141732] user: dan branch: trunk, size: 248102)
2019-12-31
14:49
[bf8e7222] part of check-in [39d55579] Merge recent enhancements from trunk. (check-in: [39d55579] user: drh branch: two-size-lookaside, size: 248173)
2019-12-30
20:42
[2a753ec7] part of check-in [d4813a8d] Fix a typo in a comment. No changes to code. (check-in: [d4813a8d] user: drh branch: trunk, size: 248105)
14:32
[71234f81] part of check-in [ab09ef42] Do not use HIDDEN columns for NATURAL joins. Fix for [7c0e06b16]. (check-in: [ab09ef42] user: dan branch: trunk, size: 248105)
2019-12-28
18:25
[dafb9d29] part of check-in [eeb76f62] 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: [eeb76f62] user: dan branch: trunk, size: 247901)
2019-12-27
20:54
[e18a64e8] part of check-in [d29edef9] 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: [d29edef9] user: dan branch: better-error-handling-1, size: 247764)
2019-12-26
00:53
[83e3aba7] part of check-in [a17b29f0] Fix an incorrect assert() added by check-in [fa58aad48a788802]. Problem found by dbsqlfuzz. (check-in: [a17b29f0] user: drh branch: trunk, size: 247748)
2019-12-25
23:54
[338c1e7e] part of check-in [fa58aad4] 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: [fa58aad4] user: drh branch: trunk, size: 247728)
2019-12-19
22:08
[b895d809] part of check-in [cba2a2a4] Continuation of [e2bddcd4c55ba3cb]: Add another spot where it is necessary to abort early due to prior errors in sqlite3WindowRewrite(). (check-in: [cba2a2a4] user: drh branch: trunk, size: 247068)
2019-12-18
20:51
[dd7e4096] part of check-in [86297431] 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: [86297431] user: drh branch: trunk, size: 247024)
2019-12-13
00:49
[3590f064] part of check-in [59d0f3af] Tie up the loose ends in the ExprList size reduction. (check-in: [59d0f3af] user: drh branch: exprlist-size-reduction, size: 246934)
2019-12-12
22:11
[b5702ca6] part of check-in [fdda76cf] 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: [fdda76cf] user: drh branch: exprlist-size-reduction, size: 246943)
20:22
[39a9e180] part of check-in [d3783357] 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: [d3783357] user: drh branch: two-size-lookaside, size: 246873)
2019-12-07
13:42
[0fe10579] part of check-in [26d991f2] Correctly deal with multi-row VALUES clauses that contain window functions. (check-in: [26d991f2] user: drh branch: trunk, size: 246866)
2019-12-04
01:42
[048c0d65] part of check-in [92893b79] 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: [92893b79] user: dan branch: trunk, size: 246805)
2019-11-22
10:14
[f403b7bd] part of check-in [bcdd66c1] 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: [bcdd66c1] user: dan branch: trunk, size: 246748)
2019-11-15
00:52
[50ccaf5f] part of check-in [2c35d3f6] Fix table-valued functions so that they will work as the right table in a LEFT JOIN. Ticket [2ae0c599b735d59e] (check-in: [2c35d3f6] user: drh branch: trunk, size: 246731)
2019-11-09
14:38
[887c3096] part of check-in [de6e6d68] Make sure the WITH stack in the Parse object is disabled following an error. (check-in: [de6e6d68] user: drh branch: trunk, size: 246702)
2019-10-26
15:40
[3395765e] part of check-in [346bdd49] Minor changes to help ensure the pointer returned by sqlite3VdbeGetOp() is not used after it becomes invalid. (check-in: [346bdd49] user: drh branch: trunk, size: 246651)
2019-10-22
00:03
[9c81d168] part of check-in [90f7c477] 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: [90f7c477] user: drh branch: trunk, size: 246514)
2019-10-16
12:18
[ac927000] part of check-in [11d472c1] Initial experimental code for generated column support. Non-functional. (check-in: [11d472c1] user: drh branch: generated-columns, size: 246537)
2019-10-12
23:38
[7ef05eeb] part of check-in [d1acf72a] 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: [d1acf72a] user: drh branch: trunk, size: 246532)
2019-10-10
15:17
[b3d64a7a] part of check-in [ccba7202] Be sure to rewrite column references inside FILTER clauses and window frame definitions when flattening queries. Fix for [1079ad19]. (check-in: [ccba7202] user: dan branch: trunk, size: 246516)
2019-10-09
17:06
[fd56dee1] part of check-in [5ba8cee8] An alternative, experimental lookaside memory allocator that uses two different slot sizes. (check-in: [5ba8cee8] user: sperry branch: 2-size-lookaside, size: 246265)
2019-09-30
16:14
[addc1c57] part of check-in [a003818f] Merge the 3.30.0 beta 1 changes from trunk. (check-in: [a003818f] user: drh branch: begin-concurrent, size: 246257)
2019-09-23
12:38
[f509982c] part of check-in [f907395e] Omit the sqlite3IntTokens array constant for a code simplification. (check-in: [f907395e] user: drh branch: trunk, size: 246242)
2019-09-21
17:31
[059edc06] part of check-in [8ea1dc72] Fix harmless compiler warnings. (check-in: [8ea1dc72] user: drh branch: trunk, size: 246267)
15:44
[4cd8fc7b] part of check-in [20f7951b] 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: [20f7951b] user: dan branch: trunk, size: 246261)
2019-09-20
21:12
[446a2bdd] part of check-in [5ef64b0f] Simplify the fix in the previous commit. (check-in: [5ef64b0f] user: dan branch: trunk, size: 245600)
20:52
[fd3ef107] part of check-in [b1d7e104] Fix a problem with queries containing a min() or max() function for which the FILTER clause excludes all rows. (check-in: [b1d7e104] user: dan branch: trunk, size: 245737)
2019-09-16
12:08
[e6ac5358] part of check-in [93b9ef3f] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [93b9ef3f] user: drh branch: begin-concurrent, size: 244536)
2019-09-10
15:33
[e2c87054] part of check-in [36997c4a] 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: [36997c4a] user: dan branch: trunk, size: 244521)
2019-09-09
19:49
[8685adae] part of check-in [1863b7bf] 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: [1863b7bf] user: dan branch: tkt-a7debbe0., size: 244649)
2019-08-27
19:59
[e4fe08c3] part of check-in [94085fb3] Add support for "ORDER BY ... NULLS FIRST" and "ORDER BY ... NULLS LAST". Use this to fix ticket [f8a7060e]. (check-in: [94085fb3] user: dan branch: trunk, size: 244005)
17:01
[c1dfbd69] part of check-in [7f5168a7] 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: [7f5168a7] user: drh branch: trunk, size: 243993)
2019-08-22
19:35
[ae8713c8] part of check-in [63e625c8] Merge fixes from trunk. Also fix a reference to the KeyInfo.aSortOrder field, which should now be KeyInfo.aSortFlags (check-in: [63e625c8] user: drh branch: nulls-last, size: 244117)
16:38
[d42f1f14] part of check-in [44578865] Fix the likely(), unlikely(), and likelihood() functions so that they have no affinity, just like any other function. Ticket [7e07a3dbf5a8cd26] (check-in: [44578865] user: drh branch: trunk, size: 244105)
2019-08-17
15:47
[51840208] part of check-in [db1e6080] Merge trunk changes into this branch. (check-in: [db1e6080] user: dan branch: nulls-last, size: 244108)
2019-08-15
21:27
[80b8b4c8] part of check-in [61b4bccd] 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: [61b4bccd] user: drh branch: trunk, size: 244096)
2019-08-12
16:36
[a8f5a499] part of check-in [07babb0f] 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: [07babb0f] user: dan branch: nulls-last, size: 243921)
2019-08-10
14:16
[11087458] part of check-in [712e4771] Remove two incorrect assert() statements from the logic used to derive column names and types from subqueries. (check-in: [712e4771] user: drh branch: trunk, size: 243921)
2019-08-09
20:26
[164270b9] part of check-in [eaf15d9b] Allow the RHS of a row-value IN operator to use a compound query with an ORDER BY clause. (check-in: [eaf15d9b] user: drh branch: trunk, size: 244104)
2019-08-07
13:25
[1c2c1d3c] part of check-in [193c87fc] 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: [193c87fc] user: drh branch: trunk, size: 243995)
2019-08-06
21:16
[29fd0dea] part of check-in [17b3d221] 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: [17b3d221] user: dan branch: trunk, size: 243976)
14:37
[db060061] part of check-in [e8234f69] 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: [e8234f69] user: drh branch: pending, size: 243864)
2019-08-05
19:44
[196bc499] part of check-in [7480db30] Fix the patch on this branch so that it works with sub-queries, as well as views. (check-in: [7480db30] user: dan branch: tkt-61c853-A, size: 243789)
19:34
[bee5951b] part of check-in [470ac8d5] 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: [470ac8d5] user: drh branch: tkt-61c853-B, size: 243820)
19:32
[5b0ef2a8] part of check-in [09cd0c0c] 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: [09cd0c0c] user: drh branch: tkt-61c853-A, size: 243823)
2019-07-24
23:15
[1b8b5afe] part of check-in [01cdc590] Fix faulty asserts in the code generator. Ticket [c52b09c7f38903b1] (check-in: [01cdc590] user: drh branch: trunk, size: 243724)
2019-07-22
16:20
[9817d812] part of check-in [d23f3316] Remove Window objects from the corresponding Select.pWin list when they are deleted. (check-in: [d23f3316] user: dan branch: winfunc-in-orderby, size: 243401)
2019-07-20
21:12
[2890d92d] part of check-in [23b11967] 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: [23b11967] user: drh branch: winfunc-in-orderby, size: 243434)
2019-07-18
20:55
[3c78ea0e] part of check-in [2f0a564f] Fix a problem where self-joins on views that are aggregate queries may return the wrong result. Cherrypick of [74ef97bf51dd531a]. (check-in: [2f0a564f] user: mistachkin branch: branch-3.28, size: 242362)
2019-07-16
19:44
[c4b4fe44] part of check-in [9e664585] Add new assert() statements in an attempt to help static analyzers avoid false-positives. (check-in: [9e664585] user: drh branch: trunk, size: 243375)
2019-07-13
16:22
[1ac359ae] part of check-in [5dac8c38] Rework the FILTER clause implementation to share more code with window functions. (check-in: [5dac8c38] user: dan branch: filter-clause, size: 243352)
09:56
[98362f19] part of check-in [86ab963c] Merge latest trunk changes into this branch. (check-in: [86ab963c] user: dan branch: filter-clause, size: 243260)
2019-07-08
21:06
[b922327d] part of check-in [7fff0803] Merge recent trunk enhancements into the begin-concurrent branch. (check-in: [7fff0803] user: drh branch: begin-concurrent, size: 242754)
12:01
[62f21307] part of check-in [28196d89] Ensure collation sequences and affinities work in window function queries. Fix for [9ece23d2]. (check-in: [28196d89] user: dan branch: trunk, size: 242739)
2019-07-05
17:38
[696107b0] part of check-in [81eed055] Minor tweak to patch on this branch to reclaim some cycles. (check-in: [81eed055] user: dan branch: filter-clause, size: 243392)
2019-07-02
11:56
[1774cc45] part of check-in [1f1ae2d6] Experimental implementation of FILTER clause for aggregate functions. (check-in: [1f1ae2d6] user: dan branch: filter-clause, size: 243352)
2019-06-03
13:53
[d9a1a0b2] part of check-in [583e5a0a] 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: [583e5a0a] user: mistachkin branch: branch-3.28, size: 242284)
2019-05-29
18:33
[9187f2c6] part of check-in [f9e85e6c] Add an assert() as an additional test for fix in check-in [523b42371122d9e1b3]. (check-in: [f9e85e6c] user: drh branch: trunk, size: 242871)
17:22
[87ea2169] part of check-in [523b4237] 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: [523b4237] user: drh branch: trunk, size: 242832)
2019-05-23
16:38
[ccd314a2] part of check-in [d2fe370c] Improvements to the view-self-join optimization so that it works on all VIEWs, not just on Common Table Expressions. (check-in: [d2fe370c] user: drh branch: trunk, size: 242760)
2019-05-22
22:49
[2db13eac] part of check-in [3cacc4b9] 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: [3cacc4b9] user: drh branch: trunk, size: 242685)
2019-05-15
18:42
[c620bcd0] part of check-in [05897ca4] 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: [05897ca4] user: drh branch: trunk, size: 242401)
2019-05-14
21:51
[67a30822] part of check-in [5d3a6e18] Merge the latest trunk enhancements into begin-concurrent. (check-in: [5d3a6e18] user: drh branch: begin-concurrent, size: 242301)
2019-05-03
17:19
[ef860c7e] part of check-in [74ef97bf] Fix a problem where self-joins on views that are aggregate queries may return the wrong result. (check-in: [74ef97bf] user: dan branch: trunk, size: 242286)
2019-04-23
12:30
[b7304d2f] part of check-in [8d478cfb] Improvement on the previous check-in. Parse.rc is less reliable than Parse.nErr for detecting SQLITE_TOOBIG errors. (check-in: [8d478cfb] user: drh branch: trunk, size: 242208)
2019-04-22
20:05
[e2c1f53e] part of check-in [5d85d80e] Early detection of SQLITE_TOOBIG when processing nested queries. (check-in: [5d85d80e] user: drh branch: trunk, size: 242179)
2019-04-19
13:38
[e6c6a75e] part of check-in [7713996a] Streamline the processing of the AND operator. Slightly smaller and faster. (check-in: [7713996a] user: drh branch: trunk, size: 242178)
2019-03-08
15:30
[baeeee1b] part of check-in [667cce3d] Merge all the latest enhancements from trunk. (check-in: [667cce3d] user: drh branch: begin-concurrent-pnu, size: 242184)
2019-03-01
21:12
[9263f5c3] part of check-in [9a0a93c8] Fix a minor comment typo. No code changes. (check-in: [9a0a93c8] user: drh branch: trunk, size: 242169)
2019-02-06
00:55
[c998f694] part of check-in [3d3b142f] If the query flattener detects an error, cause the SELECT code generator to abort immediately. (check-in: [3d3b142f] user: drh branch: trunk, size: 242168)
2019-01-24
16:51
[aa96c722] part of check-in [718ead55] 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: [718ead55] user: drh branch: literal-column-names, size: 242180)
15:51
[8e22fda4] part of check-in [b1601db7] Make sure the column name flags are restored correctly after an error inside of sqlite3ResultSetOfSelect(). (check-in: [b1601db7] user: drh branch: trunk, size: 242126)
2019-01-17
15:40
[f7260c83] part of check-in [df08d472] 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: [df08d472] user: drh branch: trunk, size: 242126)
2019-01-16
19:26
[5cbd6ab6] part of check-in [49fcde2f] Fix a problem in the code generator for sorting results with SRT_EphemTab and a LIMIT clause. (check-in: [49fcde2f] user: drh branch: trunk, size: 242173)
2019-01-02
19:46
[49f7cf25] part of check-in [86685679] 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: [86685679] user: dan branch: begin-concurrent-pnu-wal2, size: 241989)
2018-12-31
20:13
[4b0be1bf] part of check-in [4fcdc7a2] 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: [4fcdc7a2] user: drh branch: reuse-subqueries, size: 241974)
2018-12-29
02:26
[2493d094] part of check-in [4a0929ac] 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: [4a0929ac] user: drh branch: trunk, size: 242439)
2018-12-27
02:16
[c6a71c61] part of check-in [202dd033] 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: [202dd033] user: drh branch: trunk, size: 242341)
2018-12-18
17:47
[ca760497] part of check-in [a93ca38b] Merge latest begin-concurrent changes into this branch. (check-in: [a93ca38b] user: dan branch: begin-concurrent-pnu, size: 242156)
2018-12-07
02:01
[d292fc7d] part of check-in [65aafb55] 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: [65aafb55] user: drh branch: branch-3.26, size: 242136)
2018-12-06
19:15
[8c7317d5] part of check-in [f1b18d44] 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: [f1b18d44] user: drh branch: ticket-f09fcd17810f, size: 242141)
17:06
[06a122de] part of check-in [53d3b169] 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: [53d3b169] user: drh branch: trunk, size: 242085)
16:50
[44e04ad7] part of check-in [9c6dbcfa] When saving off the value of sqlite3.flags, take care to preserve all 64 bits. (check-in: [9c6dbcfa] user: drh branch: trunk, size: 242080)
2018-12-04
01:18
[8a0fb4fd] part of check-in [6770ed08] Attempt to make the parser a little faster by storing the ON and USING clause in a single OnUsing object. (check-in: [6770ed08] user: drh branch: on-using-opt, size: 242063)
2018-11-30
16:26
[e1cad752] part of check-in [81e626f4] Merge the mutex-free PRNG change into this branch. (check-in: [81e626f4] user: dan branch: begin-concurrent-pnu, size: 242095)
2018-11-20
16:02
[88f6aab4] part of check-in [dfab7170] Consolidate the two sqlite3SchemaToIndex() routines. (check-in: [dfab7170] user: dan branch: reuse-schema1, size: 242461)
2018-11-19
20:41
[594fd2e0] part of check-in [84be9220] Fix a problem with virtual tables in shared schemas. (check-in: [84be9220] user: dan branch: reuse-schema1, size: 242389)
2018-11-17
18:11
[eabefcb5] part of check-in [6d7a7e5f] Fix further problems with the feature on this branch. (check-in: [6d7a7e5f] user: dan branch: reuse-schema1, size: 242383)
2018-11-15
21:20
[08bbb3b8] part of check-in [31b6aee7] Fix some problems with the feature on this branch. Many problems remain. (check-in: [31b6aee7] user: dan branch: reuse-schema1, size: 242314)
2018-11-09
00:02
[0c08c5e6] part of check-in [8d663bfa] 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: [8d663bfa] user: drh branch: tkt787fa716-deadend, size: 242216)
2018-10-25
15:25
[0671309c] part of check-in [caebf879] 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: [caebf879] user: drh branch: branch-3.25, size: 242064)
14:15
[61e867a9] part of check-in [5d5b596f] 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: [5d5b596f] user: drh branch: trunk, size: 242080)
2018-09-27
13:10
[1604a230] part of check-in [b2849570] Disallow the use of window functions in the recursive part of a recursive CTE. Fix for ticket [e8275b415a2f03bee]. (check-in: [b2849570] user: drh branch: branch-3.25, size: 241425)
12:14
[33aacf1c] part of check-in [7fc29944] Disallow the use of window functions in the recursive part of a recursive CTE. Fix for ticket [e8275b415a2f03bee]. (check-in: [7fc29944] user: dan branch: trunk, size: 241441)
2018-09-20
19:02
[1b7ade8f] part of check-in [ad130bb8] 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: [ad130bb8] user: drh branch: trunk, size: 241288)
2018-09-19
20:14
[6bacf10a] part of check-in [24b0f66a] 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: [24b0f66a] user: drh branch: expr-simplify, size: 242071)
16:35
[45d01474] part of check-in [e4129cd3] Make sure Expr.eX changes back to EX_None after Expr.x.pRight is set to NULL due to an OOM. (check-in: [e4129cd3] user: drh branch: expr-simplify, size: 241787)
14:54
[f3070ba3] part of check-in [147c61a6] 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: [147c61a6] user: drh branch: expr-simplify, size: 241733)
2018-09-18
21:35
[af9efbee] part of check-in [8849a463] 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: [8849a463] user: drh branch: expr-simplify, size: 241374)
2018-09-17
15:19
[8afcc2b5] part of check-in [c6c9585f] 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: [c6c9585f] user: drh branch: trunk, size: 241272)
2018-09-08
20:09
[ed6192dd] part of check-in [20672012] Fix multiple issues with the ORDER BY LIMIT optimization. This is the proposed resolution to ticket [9936b2fa443fec03ff25]. (check-in: [20672012] user: drh branch: trunk, size: 241243)
2018-08-04
17:15
[ae7396a3] part of check-in [2041231d] Fix comments that were made obsolete by the removal of the column cache. (check-in: [2041231d] user: drh branch: omit-column-cache, size: 241248)
15:53
[a32bfa40] part of check-in [7d9072b0] Further logic simplifications that flow out of the omission of the column cache. (check-in: [7d9072b0] user: drh branch: omit-column-cache, size: 241777)
2018-08-03
23:04
[9d3d5f50] part of check-in [3f5f60cd] 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: [3f5f60cd] user: drh branch: omit-column-cache, size: 241781)
20:19
[18636c49] part of check-in [21235d9a] Fix the handling of sub-queries with LIMIT clauses by the optimization activated by compile-time symbol SQLITE_COUNTOFVIEW_OPTIMIZATION. (check-in: [21235d9a] user: dan branch: trunk, size: 242507)
2018-07-28
14:56
[22ed163c] part of check-in [e4b4737e] Fix an assert() statement that was made obsolete by the constant propagation enhancement. Problem discovered by OSSFuzz. (check-in: [e4b4737e] user: drh branch: trunk, size: 242381)
14:34
[a7c1a827] part of check-in [fcb88dd6] Improved debugging output when the ".selecttrace" option is used in the shell. (check-in: [fcb88dd6] user: drh branch: trunk, size: 242400)
2018-07-27
20:01
[25349273] part of check-in [865249de] Reduce the performance cost of the constant propagation optimization to less than 200,000 cycles. (check-in: [865249de] user: drh branch: propagate-const-opt, size: 242357)
17:51
[a86a20bd] part of check-in [598d6083] 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: [598d6083] user: drh branch: propagate-const-opt, size: 242322)
16:57
[7d2a980b] part of check-in [82c67efb] 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: [82c67efb] user: drh branch: propagate-const-opt, size: 242101)
2018-07-26
23:47
[81c6517a] part of check-in [57eb2abd] 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: [57eb2abd] user: drh branch: propagate-const-opt, size: 240615)
21:16
[cd399384] part of check-in [2fb82ad8] Initial implementation of the WHERE-clause constant propagation optimization. (check-in: [2fb82ad8] user: drh branch: propagate-const-opt, size: 240579)
2018-07-10
20:50
[2e9661d4] part of check-in [f2057542] Minor comment changes. Add ALWAYS() macros on some unreachable branches in the xStep() methods of built-in window functions. (check-in: [f2057542] user: drh branch: trunk, size: 236216)
19:48
[313460e5] part of check-in [a7cdc5bc] 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: [a7cdc5bc] user: drh branch: trunk, size: 236223)
05:11
[c06d56c1] part of check-in [a9a30726] New VDBE comments and coverage macros. (check-in: [a9a30726] user: drh branch: trunk, size: 236584)
2018-07-09
20:58
[ac70f376] part of check-in [0c8a2f25] Add a comment to restriction (6) of the push-down optimization. No changes to code. (check-in: [0c8a2f25] user: drh branch: trunk, size: 236471)
2018-07-05
21:22
[7b7c6773] part of check-in [fa653805] Use separate opcodes, OP_AggValue and OP_AggInverse, for the new callbacks associated with Window Functions, for improved readability of EXPLAIN output. (check-in: [fa653805] user: drh branch: trunk, size: 236446)
2018-06-27
19:48
[82aa95aa] part of check-in [336de43a] Avoid redundant ORDER BY operations when rewriting SELECT statements that contain window functions. (check-in: [336de43a] user: dan branch: exp-window-functions, size: 236447)
2018-06-23
16:26
[e364e5ea] part of check-in [c1abd2dd] Fix a problem with using LIMIT in window-function queries. (check-in: [c1abd2dd] user: dan branch: exp-window-functions, size: 236447)
07:59
[30565650] part of check-in [11d73339] Fix a problem with using a window-function SELECT as a FROM clause sub-query in some circumstances. (check-in: [11d73339] user: dan branch: exp-window-functions, size: 236409)
2018-06-22
20:51
[3e165256] part of check-in [5f04b016] Omit all window-function related code when building with SQLITE_OMIT_WINDOWFUNC. (check-in: [5f04b016] user: dan branch: exp-window-functions, size: 236130)
2018-06-19
18:11
[99ad73c5] part of check-in [f4b1b6f8] 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: [f4b1b6f8] user: dan branch: exp-window-functions, size: 235843)
2018-06-14
19:06
[7e8e439b] part of check-in [43eb1e75] 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: [43eb1e75] user: dan branch: exp-window-functions, size: 235845)
2018-06-12
18:40
[224312eb] part of check-in [fe7081e0] Fix some problems with using window-functions in aggregate queries. (check-in: [fe7081e0] user: dan branch: exp-window-functions, size: 235310)
2018-06-08
20:58
[0b0ce29b] part of check-in [19c983b5] Add support for the WINDOW clause. (check-in: [19c983b5] user: dan branch: exp-window-functions, size: 235310)
16:11
[d48879c0] part of check-in [236cb75b] Do not flatten sub-queries that contain window functions. (check-in: [236cb75b] user: dan branch: exp-window-functions, size: 235192)
2018-06-07
20:35
[3e7d9bc7] part of check-in [25102203] Merge latest trunk changes with this branch. (check-in: [25102203] user: dan branch: exp-window-functions, size: 235422)
2018-06-05
20:04
[8d3176c5] part of check-in [dce2dfbe] 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: [dce2dfbe] user: dan branch: exp-agg-opt, size: 234328)
2018-06-04
08:28
[2af92d42] part of check-in [83d6416a] Merge latest trunk changes into this branch. (check-in: [83d6416a] user: dan branch: exp-window-functions, size: 234270)
2018-06-02
21:04
[3ba9808f] part of check-in [91c1cb7a] Add support for window functions row_number(), rank(), dense_rank() and percent_rank(). (check-in: [91c1cb7a] user: dan branch: exp-window-functions, size: 234249)
2018-06-01
13:30
[3291892a] part of check-in [8cadaf58] Fix a bug in the SQLITE_ENABLE_SORTER_REFERENCES code causing an out-of-bounds array reference. (check-in: [8cadaf58] user: dan branch: trunk, size: 233176)
2018-05-23
20:55
[8a7f842a] part of check-in [3a203660] Add support for "ROWS BETWEEN <expr> PRECEDING AND <expr> FOLLOWING" window frames. (check-in: [3a203660] user: dan branch: exp-window-functions, size: 240250)
2018-05-21
19:45
[1ebe775c] part of check-in [bc4b81d6] Begin adding support for more esoteric window frames. (check-in: [bc4b81d6] user: dan branch: exp-window-functions, size: 240104)
2018-05-19
14:15
[34a5cb9e] part of check-in [19c2e4b2] Fix minor problems on this branch. (check-in: [19c2e4b2] user: dan branch: exp-window-functions, size: 244338)
2018-05-17
19:24
[2b4bc6bb] part of check-in [c9f0f140] 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: [c9f0f140] user: dan branch: exp-window-functions, size: 244920)
14:26
[0b9d051a] part of check-in [35af0b75] Handle multiple window-functions in a single query. (check-in: [35af0b75] user: dan branch: exp-window-functions, size: 244195)
2018-05-16
20:58
[0e82e32d] part of check-in [3781e520] Start of experimental implementation of SQL window functions. Does not yet work. (check-in: [3781e520] user: dan branch: exp-window-functions, size: 244172)
2018-05-05
16:50
[a35d462e] part of check-in [5d61e75f] 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: [5d61e75f] user: drh branch: trunk, size: 233155)
2018-05-03
23:20
[bf9185f4] part of check-in [c381f0ea] 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: [c381f0ea] user: drh branch: trunk, size: 233058)
22:52
[c937eb1f] part of check-in [81ab5e0d] Fix a branch that has become unreachable due to recent enhancements. (check-in: [81ab5e0d] user: drh branch: trunk, size: 229557)
19:47
[75ae3000] part of check-in [956fef36] Optimizations to the new EQP framework. (check-in: [956fef36] user: drh branch: rework-EQP, size: 229577)
01:37
[e612d71b] part of check-in [c75eee69] Enhance EXPLAIN QUERY PLAN to report the generation of constant rows using VALUES or just a SELECT without FROM. (check-in: [c75eee69] user: drh branch: rework-EQP, size: 230107)
2018-05-02
16:13
[29294be5] part of check-in [f2f52554] Improved EQP output for recursive CTEs and multi-value VALUES clauses. (check-in: [f2f52554] user: drh branch: rework-EQP, size: 230138)
14:24
[e66bb89e] part of check-in [82ca44b8] 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: [82ca44b8] user: drh branch: rework-EQP, size: 229900)
02:22
[41962df2] part of check-in [699a77e4] Improvements to the EQP display for compound select statements. (check-in: [699a77e4] user: drh branch: rework-EQP, size: 229398)
00:33
[8481fa6e] part of check-in [70b48a79] Begin reengineering the EXPLAIN QUERY PLAN function to provide more intuitive output. (check-in: [70b48a79] user: drh branch: rework-EQP, size: 229880)
2018-05-01
01:18
[f84fef1a] part of check-in [2a75e631] The ".selecttrace 0x4000" command causes the AST to be output to stdout as a table with four columns. (check-in: [2a75e631] user: drh branch: ast-trace-demo, size: 231661)
2018-04-30
19:32
[170834c5] part of check-in [ce4ef460] 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: [ce4ef460] user: drh branch: faster-order-by-limit, size: 234896)
2018-04-26
16:13
[daf07d8d] part of check-in [71bf91c2] 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: [71bf91c2] user: dan branch: sorter-limit-opt, size: 231395)
2018-04-24
17:34
[95dff440] part of check-in [aeb694e3] 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: [aeb694e3] user: drh branch: trunk, size: 231223)
00:08
[3dbce437] part of check-in [c7e6e848] Fix to check-in [ca34c2dd20ee071e] - avoid a NULL pointer dereference following an OOM. (check-in: [c7e6e848] user: drh branch: trunk, size: 231216)
2018-04-23
17:43
[9da61170] part of check-in [ca34c2dd] 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: [ca34c2dd] user: drh branch: trunk, size: 231212)
17:18
[e08e65b8] part of check-in [5682146e] The ".selecttrace 4" command now shows only a single parse tree after name resolution. (check-in: [5682146e] user: drh branch: trunk, size: 230923)
17:09
[96ed6724] part of check-in [8088d8ca] Do not restore the iSelectId value until after the last SELECTTRACE when debugging Select processing. (check-in: [8088d8ca] user: drh branch: trunk, size: 230910)
17:02
[f8ce9470] part of check-in [5c6339f9] In the ".selecttrace" output, include the EXPLAIN QUERY PLAN iSelectId as part of each Select identifier. (check-in: [5c6339f9] user: drh branch: trunk, size: 230910)
2018-04-18
19:56
[04ae9b4a] part of check-in [ef74090a] 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: [ef74090a] user: dan branch: trunk, size: 230873)
19:08
[9257a7f2] part of check-in [413015c0] Avoid a NULL-pointer deref following OOM. (check-in: [413015c0] user: drh branch: sorter-reference, size: 230826)
14:04
[6cf4c11b] part of check-in [9afeb0c8] Remove an unused local variable. (check-in: [9afeb0c8] user: drh branch: sorter-reference, size: 230795)
2018-04-16
21:12
[875b63fd] part of check-in [b25a7bb7] Add SQLITE_CONFIG_SORTERREF_SIZE configuration option. (check-in: [b25a7bb7] user: dan branch: sorter-reference, size: 230821)
10:34
[3e84cb86] part of check-in [dba3095f] Reduce the size of the NameContext object by grouping seldom-used fields into a union. (check-in: [dba3095f] user: drh branch: trunk, size: 223787)
2018-04-14
18:46
[c87425f0] part of check-in [9719cb46] Experimental change to "SELECT * FROM ... ORDER BY" processing to load some column values from the db after sorting. (check-in: [9719cb46] user: dan branch: sorter-reference, size: 230717)
2018-04-11
14:11
[41e857c1] part of check-in [f32cdb41] Minor simplification to internal function generateSortTail(). (check-in: [f32cdb41] user: dan branch: trunk, size: 223740)
2018-04-09
20:36
[dfcd77a9] part of check-in [a2c443c0] Minor changes to the input grammar resulting in a faster and slightly smaller parser. (check-in: [a2c443c0] user: drh branch: trunk, size: 223872)
2018-03-31
16:31
[16d1f351] part of check-in [823779d3] 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: [823779d3] user: dan branch: trunk, size: 223915)
2018-03-27
15:13
[e51efe54] part of check-in [f08c1731] 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: [f08c1731] user: drh branch: trunk, size: 223948)
2018-03-21
01:59
[2c408ab9] part of check-in [b5d3dd8c] Relax LEFT-JOIN restrictions on the push-down optimization. (check-in: [b5d3dd8c] user: drh branch: join-strength-reduction, size: 223583)
2018-03-20
22:52
[926d122e] part of check-in [08833dda] Do a more thorough job of cleaning traces of the strength-reduced LEFT JOIN. (check-in: [08833dda] user: drh branch: join-strength-reduction, size: 223051)
21:16
[965e1791] part of check-in [5b7abecc] 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: [5b7abecc] user: drh branch: join-strength-reduction, size: 223040)
18:08
[69ed6ca9] part of check-in [5ad668d4] Improvements to the HAVING-to-WHERE optimization. The code uses less space and less CPU, and there is now ".selecttrace" output. (check-in: [5ad668d4] user: drh branch: trunk, size: 221708)
13:00
[97a2131f] part of check-in [85a31557] Remove a debugging statement accidently left in check-in [eddc35f3057e59fd] (check-in: [85a31557] user: drh branch: push-down-disable, size: 221718)
11:24
[05029801] part of check-in [eddc35f3] Add the ability to disable the push-down optimization using the 0x1000 bit of SQLITE_TESTCTRL_OPTIMIZATIONS. (check-in: [eddc35f3] user: drh branch: push-down-disable, size: 221728)
2018-03-19
22:28
[a69962ae] part of check-in [03e541f6] Minor improvements to ".selecttrace". No changes to non-debug code. (check-in: [03e541f6] user: drh branch: trunk, size: 221594)
16:06
[1e9f5389] part of check-in [30704d2a] Improved ".selecttrace" output formatting. No changes in non-debug code. (check-in: [30704d2a] user: drh branch: trunk, size: 221572)
2018-01-24
20:42
[f02352ac] part of check-in [8055e4f4] 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: [8055e4f4] user: drh branch: trunk, size: 221572)
2018-01-14
20:12
[bebe7cce] part of check-in [a4fa0581] 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: [a4fa0581] user: drh branch: trunk, size: 221486)
2017-12-23
12:33
[8b22abe1] part of check-in [6b2ff26c] 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: [6b2ff26c] user: drh branch: trunk, size: 221113)
11:51
[6c847332] part of check-in [8f194008] 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: [8f194008] user: drh branch: trunk, size: 221079)
2017-11-14
23:48
[17e22019] part of check-in [3925facd] 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: [3925facd] user: drh branch: trunk, size: 221016)
2017-10-31
03:40
[660ef797] part of check-in [1c80c75d] Remove unnecessary NEVER() and ALWAYS() conditionals. (check-in: [1c80c75d] user: drh branch: trunk, size: 221737)
2017-10-28
20:51
[36345c63] part of check-in [d17ef7d1] 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: [d17ef7d1] user: drh branch: trunk, size: 221734)
2017-10-26
20:04
[0b4c1ac5] part of check-in [6caec908] Enhance the min/max optimization so that it works with indexes on expressions. (check-in: [6caec908] user: drh branch: trunk, size: 221548)
18:43
[d055dc3a] part of check-in [6fbf74ab] Extra ".selecttrace" output following aggregate analysis. No changes to production builds. (check-in: [6fbf74ab] user: drh branch: trunk, size: 222586)
2017-10-21
14:17
[e6a068d9] part of check-in [6ee8cb6a] 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: [6ee8cb6a] user: drh branch: trunk, size: 221976)
13:29
[78b81b0d] part of check-in [6ec82acd] Remove unnecessary "#if SQLITE_MAX_COLUMN". SQLITE_MAX_COLUMN is always defined. (check-in: [6ec82acd] user: drh branch: trunk, size: 221941)
2017-10-04
12:06
[42aca61e] part of check-in [4464f40c] 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: [4464f40c] user: drh branch: trunk, size: 221970)
05:59
[8a506e0a] part of check-in [66629b2a] Remove a redundant restriction from the query flattener. (check-in: [66629b2a] user: drh branch: trunk, size: 221507)
02:30
[4248b28e] part of check-in [d050dc60] Fix a minor typo in the query flattener header comment. No code changes. (check-in: [d050dc60] user: drh branch: trunk, size: 221213)
2017-10-03
19:53
[fa9fd875] part of check-in [772b0db1] Simplify the computation of types on columns of a view. (check-in: [772b0db1] user: drh branch: trunk, size: 221212)
17:29
[764d5ac2] part of check-in [1dd82808] Add some OK_IF_ALWAYS_TRUE() marks on optimization branches in select.c. (check-in: [1dd82808] user: drh branch: trunk, size: 221212)
17:17
[52f5ef16] part of check-in [7be760e9] Remove an unused variable from sqlite3Insert() and fix harmless compiler warnings associated with -DSQLITE_MUTATION_TEST. (check-in: [7be760e9] user: drh branch: trunk, size: 221174)
16:57
[cb912fc7] part of check-in [966438bd] Fix the sqlite3_column_decltype() interface to return the correct datatype when the value comes through a CTE. (check-in: [966438bd] user: drh branch: trunk, size: 221206)
14:24
[948aa571] part of check-in [c5ad5e16] 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: [c5ad5e16] user: drh branch: trunk, size: 221122)
03:24
[9ff172fe] part of check-in [f10ece96] Simplification to the logic that computes column type names. Update: Does not work in all configurations. (check-in: [f10ece96] user: drh branch: does-not-work, size: 221166)
03:01
[1a11e6ab] part of check-in [e4342fd4] 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: [e4342fd4] user: drh branch: trunk, size: 221053)
2017-10-02
23:50
[3e3fb2e4] part of check-in [3a4ffb21] Mark a single branch within sqlite3SelectExpand() as an optimization. (check-in: [3a4ffb21] user: drh branch: trunk, size: 221206)
23:30
[c12d9b45] part of check-in [5bf2ccb9] Simplification to sqlite3SelectPrep() for improved testability. (check-in: [5bf2ccb9] user: drh branch: trunk, size: 221187)
21:29
[38ab7641] part of check-in [6035c9b2] 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: [6035c9b2] user: drh branch: trunk, size: 221248)
2017-09-30
11:47
[19ebf10e] part of check-in [92848623] More details in the header comment of pushDownWhereTerms(). No changes to code. (check-in: [92848623] user: drh branch: prefer-coroutine-sort-subquery, size: 221210)
01:25
[55a17d54] part of check-in [71f0adf7] Fix unreachable conditionals and revise a testcase that was made obsolete by the changes on this branch. (check-in: [71f0adf7] user: drh branch: prefer-coroutine-sort-subquery, size: 220959)
2017-09-29
22:13
[8e8e9965] part of check-in [6b1651d7] Always render a subquery that is not part of a join as a co-routine. (check-in: [6b1651d7] user: drh branch: prefer-coroutine-sort-subquery, size: 220837)
16:08
[73fa1cc0] part of check-in [f62cd4d9] Merge the query flattener comment improvements from trunk. (check-in: [f62cd4d9] user: drh branch: prefer-coroutine-sort-subquery, size: 221921)
16:07
[733e7f72] part of check-in [0840f9f8] 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: [0840f9f8] user: drh branch: trunk, size: 221250)
14:31
[117cbcec] part of check-in [06f432fb] Merge changes from trunk. (check-in: [06f432fb] user: drh branch: prefer-coroutine-sort-subquery, size: 221644)
12:44
[61f6ee59] part of check-in [2a45bbc9] Make sure the 6th parameter to the authorizer callback for view subqueries has the correct view name. (check-in: [2a45bbc9] user: drh branch: trunk, size: 220973)
12:12
[15081041] part of check-in [04ef40a8] Better names for subqueries in EXPLAIN comments. (check-in: [04ef40a8] user: drh branch: trunk, size: 220726)
2017-09-28
20:06
[d38163a7] part of check-in [042d655d] Do not flatten subqueries that contain an ORDER BY or GROUP BY clause and can be implemented using a co-routine. (check-in: [042d655d] user: drh branch: prefer-coroutine-sort-subquery, size: 221290)
17:29
[ff9551b1] part of check-in [ff2f5a31] 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: [ff2f5a31] user: drh branch: trunk, size: 220619)
16:56
[f7bd3c62] part of check-in [fd3267ef] Fix over-length source code lines in select.c. No logic changes. (check-in: [fd3267ef] user: drh branch: trunk, size: 220733)
01:58
[843ac757] part of check-in [490e488e] Add new routines to simplify dealing with collating sequences in expressions: sqlite3ExprNNCollSeq() and sqlite3ExprCollSeqMatch(). (check-in: [490e488e] user: drh branch: trunk, size: 220647)
2017-09-18
13:16
[9fa0db38] part of check-in [a9447193] Minor simplification of error message generation during compound query code generation. (check-in: [a9447193] user: drh branch: trunk, size: 220730)
08:51
[420d3f5d] part of check-in [2e573350] Merge latest trunk changes with this branch. (check-in: [2e573350] user: dan branch: shared-mapping-hack, size: 220859)
2017-09-16
20:58
[6ea1cb2f] part of check-in [5dbb255a] Simplify the sqlite3VdbeGet() routine. Smaller, faster, and easier to maintain. (check-in: [5dbb255a] user: drh branch: trunk, size: 220844)
2017-09-15
17:40
[5945cf1a] part of check-in [dd95887f] Remove an unnecessary parameter from selectInnerLoop(). (check-in: [dd95887f] user: drh branch: trunk, size: 220989)
2017-09-09
08:03
[5bda89e7] part of check-in [e63d1a7c] Use a mutex-free PRNG for the random() and randomblob() SQL functions and for the randomness used during checkpoint operations. (check-in: [e63d1a7c] user: drh branch: mutex-free-randomness, size: 221051)
2017-08-14
14:53
[c9b3d844] part of check-in [d0da791b] 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: [d0da791b] user: drh branch: trunk, size: 221036)
01:33
[ea892106] part of check-in [7e0d3e9c] Properly dequote column names in tables constructed by an aggregate SELECT. (check-in: [7e0d3e9c] user: drh branch: trunk, size: 220879)
2017-08-02
22:43
[3fd19c98] part of check-in [aea5990e] 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: [aea5990e] user: drh branch: trunk, size: 220832)
2017-07-31
13:11
[32194c97] part of check-in [499942b3] 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: [499942b3] user: drh branch: branch-3.19, size: 214850)
2017-07-29
16:01
[31b35ddf] part of check-in [09834279] 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: [09834279] user: drh branch: early-column-names, size: 220790)
14:56
[ef0be59b] part of check-in [5df7f0e6] Use the subquery column name, not the original SQL statement text, as the added AS clause in the query flattener. (check-in: [5df7f0e6] user: drh branch: flattener-column-names, size: 223686)
03:33
[2da6bc6f] part of check-in [439cc5c5] 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: [439cc5c5] user: drh branch: flattener-column-names, size: 224002)
2017-07-18
17:34
[c6bf96a7] part of check-in [9dbae1df] 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: [9dbae1df] user: dan branch: trunk, size: 222174)
2017-07-17
19:25
[7922b1e1] part of check-in [adc082c1] 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: [adc082c1] user: drh branch: push-down-backport, size: 211420)
19:14
[75f825e9] part of check-in [52674f94] 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: [52674f94] user: drh branch: push-down-backport, size: 211183)
19:07
[22db6394] part of check-in [043d6ce8] 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: [043d6ce8] user: drh branch: push-down-backport, size: 211007)
2017-07-12
14:10
[95659b79] part of check-in [68824a43] Clarification and simplification and result column naming logic. (check-in: [68824a43] user: drh branch: trunk, size: 222049)
2017-07-09
18:55
[6aa7e8ee] part of check-in [70096c50] Always make "column%d" column-names 1-based, never 0-based. (check-in: [70096c50] user: drh branch: trunk, size: 220305)
00:30
[c1e669e0] part of check-in [acf3b9cc] 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: [acf3b9cc] user: drh branch: trunk, size: 220303)
2017-07-05
16:20
[12b01d61] part of check-in [fcbd6abd] Make use of covering indexes in the OR optimization. (check-in: [fcbd6abd] user: drh branch: branch-3.8.9, size: 208266)
14:54
[296bf898] part of check-in [b7ae4b87] Add the count-of-view optimization when compiled using SQLITE_COUNTOFVIEW_OPTIMIZATION. (check-in: [b7ae4b87] user: drh branch: branch-3.8.9, size: 208231)
2017-07-04
19:34
[c9f7b719] part of check-in [d1ba2002] Add the count-of-view optimization when compiled using SQLITE_COUNTOFVIEW_OPTIMIZATION. (check-in: [d1ba2002] user: drh branch: trunk, size: 220225)
2017-06-24
18:10
[74193750] part of check-in [7b59c353] Consider the values bound to SQL variables when determining whether or not a partial index may be used. (check-in: [7b59c353] user: dan branch: partial-index-variables, size: 217008)
2017-06-20
17:43
[35ccfae6] part of check-in [48346268] 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: [48346268] user: dan branch: trunk, size: 216989)
2017-06-11
19:51
[0d2afdbd] part of check-in [87aceb41] When reusing a materialized view, make sure the estimated number of output rows is correctly initialized to avoid confusing the query planner. (check-in: [87aceb41] user: drh branch: trunk, size: 216877)
2017-05-31
13:45
[d93205e4] part of check-in [df785943] Avoid allocating excess memory to the KeyInfo objects. (check-in: [df785943] user: drh branch: trunk, size: 216783)
2017-05-29
14:26
[fd0a17fb] part of check-in [6854a34e] 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: [6854a34e] user: drh branch: trunk, size: 216764)
13:09
[ecdb34eb] part of check-in [43c9ae37] 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: [43c9ae37] user: drh branch: trunk, size: 216252)
2017-05-25
11:39
[c444ca05] part of check-in [1a074c8a] 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: [1a074c8a] user: drh branch: branch-3.19, size: 216188)
2017-05-23
15:21
[9db68875] part of check-in [44b21e35] Disable the LEFT JOIN flattening optimization for aggregate queries, as it does not currently work. Further fix for ticket [cad1ab4cb7b0fc344]. (check-in: [44b21e35] user: drh branch: trunk, size: 215849)
12:36
[30805a1b] part of check-in [941d8142] 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: [941d8142] user: drh branch: trunk, size: 215529)
01:21
[c2316827] part of check-in [92c17850] 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: [92c17850] user: drh branch: trunk, size: 215525)
2017-05-11
12:05
[d74b1cde] part of check-in [4139953a] 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: [4139953a] user: drh branch: trunk, size: 215412)
2017-05-10
16:12
[275ad269] part of check-in [92ab1f72] 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: [92ab1f72] user: drh branch: trunk, size: 214880)
2017-05-02
17:54
[4f0adefa] part of check-in [9e35c89d] 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: [9e35c89d] user: drh branch: trunk, size: 214240)
16:55
[4bbdacd1] part of check-in [47cbb471] 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: [47cbb471] user: drh branch: trunk, size: 213068)
2017-05-01
19:53
[2c7ce887] part of check-in [a3317959] Remove an unnecessary branch. (check-in: [a3317959] user: drh branch: having-where-optimization, size: 212797)
17:04
[2546672c] part of check-in [c64fe3a1] Futher bug fixes to the function that determines when a materialized view can be reused. (check-in: [c64fe3a1] user: drh branch: materialized-view-reuse, size: 211967)
16:37
[c9aa9575] part of check-in [b2aae559] Minor bug fixes and performance enhancement. (check-in: [b2aae559] user: drh branch: materialized-view-reuse, size: 211750)
15:15
[1fba56aa] part of check-in [478c34b9] Initial implementation of an optimization that attempts to reuse the same materialization of a view on a self-join of the view. (check-in: [478c34b9] user: drh branch: materialized-view-reuse, size: 211638)
2017-04-29
20:53
[a2b839b8] part of check-in [5375a3ce] 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: [5375a3ce] user: dan branch: having-where-optimization, size: 212831)
19:29
[478e95d4] part of check-in [4e1df76e] Add a single testcase() macro to the subquery processing logic. (check-in: [4e1df76e] user: drh branch: trunk, size: 210795)
2017-04-14
19:03
[bf8ab605] part of check-in [3a5860d8] 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: [3a5860d8] user: drh branch: left-join-view, size: 210524)
17:18
[52b29bde] part of check-in [1838a59c] 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: [1838a59c] user: drh branch: left-join-view, size: 210612)
12:39
[4588dcfb] part of check-in [e651074b] 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: [e651074b] user: drh branch: trunk, size: 210319)
2017-04-13
01:19
[cc9129bc] part of check-in [132339a1] 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: [132339a1] user: drh branch: skip-ahead-distinct, size: 210123)
2017-04-11
16:44
[e6f9afd8] part of check-in [4143650c] Very slight smaller and faster sqlite3SelectNew() (check-in: [4143650c] user: drh branch: trunk, size: 210131)
01:01
[9228235f] part of check-in [c59eaf2b] Improved comments. Fix a problem when an indexed expression is used in an ORDER BY clause. (check-in: [c59eaf2b] user: drh branch: covering-index-on-expr, size: 210103)
2017-04-07
19:41
[b24e628a] part of check-in [a52ef2ad] 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: [a52ef2ad] user: drh branch: covering-index-on-expr, size: 209878)
2017-04-05
12:39
[afcf31d8] part of check-in [ad90e8bb] Split off sqlite3DbFreeNN() from sqlite3DbFree() and use it in cases where we know that the argument to be freed is never NULL. (check-in: [ad90e8bb] user: drh branch: trunk, size: 209877)
11:32
[bbcfd919] part of check-in [2b6560ad] Combine the ExprList_item objects and the ExprList wrapper into a single memory allocation, for improved performance and reduced footprint. (check-in: [2b6560ad] user: drh branch: trunk, size: 209873)
2017-03-13
14:30
[2496d0cc] part of check-in [c6dda3f7] Fix a segfault that could occur following an OOM error in the flattenSubquery() routine. (check-in: [c6dda3f7] user: dan branch: trunk, size: 209859)
2017-02-18
20:05
[e32cc5c5] part of check-in [c1adf959] 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: [c1adf959] user: dan branch: sort-column-opcodes, size: 210093)
2017-02-03
19:16
[d12f3539] part of check-in [f5306ad6] Avoid a performance problem when very large "VALUES(..), (..), (..)" terms are used in queries. (check-in: [f5306ad6] user: dan branch: recursive-selectdup, size: 209820)
2017-01-10
20:04
[3856db52] part of check-in [46db23cc] Changes to allow some multi-row UPDATE statements to avoid the two-pass approach. (check-in: [46db23cc] user: dan branch: onepass-update, size: 209682)
2017-01-07
00:56
[533e55a4] part of check-in [d577dda0] Avoid duplicate b-tree searches in the duplicate row detector used to implement DISTINCT. (check-in: [d577dda0] user: drh branch: trunk, size: 209681)
2017-01-05
17:23
[4437d9d5] part of check-in [590ca83b] 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: [590ca83b] user: dan branch: trunk, size: 209633)
2016-12-18
17:42
[dfb6cadc] part of check-in [165c0446] 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: [165c0446] user: drh branch: trunk, size: 209637)
2016-12-16
15:05
[e4c68733] part of check-in [053a149c] 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: [053a149c] user: dan branch: trunk, size: 209643)
2016-12-14
14:07
[204491a5] part of check-in [9cae4c2e] Refactor the Table.nRef field as Table.nTabRef for easier grepping. (check-in: [9cae4c2e] user: drh branch: trunk, size: 209550)
2016-12-08
01:38
[b4bd43e1] part of check-in [83bc5e40] More changes to take advantage of the sqlite3VdbeAppendP4() method. (check-in: [83bc5e40] user: drh branch: trunk, size: 209517)
2016-12-07
15:38
[0e4920c4] part of check-in [433d16ff] 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: [433d16ff] user: dan branch: trunk, size: 209522)
2016-12-06
22:47
[ee68944d] part of check-in [2a81763e] Performance improvement and size reduction in the Expr node allocator function sqlite3PExpr(). (check-in: [2a81763e] user: drh branch: trunk, size: 209295)
2016-12-01
19:38
[40377552] part of check-in [8bed4cd5] Avoid clearing the EP_FromJoin flag from terms in ON clauses when flattening sub-selects. Possible fix for [2df0107b]. (check-in: [8bed4cd5] user: dan branch: left-join-fix, size: 209304)
2016-11-25
19:32
[668c6865] part of check-in [6ac7b07a] Remove the OP_RowKey opcode. Use OP_RowData in its place. (check-in: [6ac7b07a] user: drh branch: trunk, size: 209154)
2016-11-11
19:08
[672b1af2] part of check-in [b835cf3e] Avoid storing redundant fields in sorter records when the sort-key and data have fields in common. (check-in: [b835cf3e] user: drh branch: trunk, size: 209153)
18:08
[04fd717f] part of check-in [6e2e9d38] Reenable the SQLITE_EXPR_REF optimization for "SELECT DISTINCT ... ORDER BY" queries. (check-in: [6e2e9d38] user: dan branch: sorter-opt, size: 208920)
2016-11-10
20:14
[64b22737] part of check-in [0af62fdb] 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: [0af62fdb] user: dan branch: sorter-opt, size: 208368)
2016-11-09
01:38
[0a7c523d] part of check-in [42db7cd2] Make use of the unpacked key on the OP_IdxInsert on sorters with a LIMIT. (check-in: [42db7cd2] user: drh branch: unpacked-IdxInsert, size: 207550)
00:10
[7788e48a] part of check-in [89d958ab] Enhance the OP_IdxInsert opcode to optionally accept unpacked key material. (check-in: [89d958ab] user: drh branch: unpacked-IdxInsert, size: 207494)
2016-11-02
16:29
[ec96f4cd] part of check-in [8e4ba115] 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: [8e4ba115] user: drh branch: branch-3.8.9, size: 204837)
2016-10-01
19:21
[ea3af83e] part of check-in [54a449a4] Use sqlite3DbMallocRawNN() where appropriate, instead of sqlite3DbMallocRaw(). (check-in: [54a449a4] user: drh branch: trunk, size: 207317)
2016-09-26
14:39
[6dede310] part of check-in [cf7f9e6d] 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: [cf7f9e6d] user: dan branch: trunk, size: 207315)
2016-09-22
18:53
[fb9da69a] part of check-in [c3774c6a] Remove the internal sqlite3CodeOnce() interface, replacing it with a direct call to sqlite3VdbeAddOp0(v,OP_Once). Slightly smaller and faster. (check-in: [c3774c6a] user: drh branch: trunk, size: 207332)
2016-09-14
01:43
[4123c2bd] part of check-in [db361482] Backport the ORDER BY LIMIT optimization to version 3.8.9. (check-in: [db361482] user: drh branch: branch-3.8.9, size: 204544)
2016-09-06
19:08
[244f9cc5] part of check-in [ab3f8f19] Remove obsolete vector-IN test cases. Fix a bad testcase() macro. (check-in: [ab3f8f19] user: drh branch: rowvalue, size: 207320)
18:51
[d6c1a646] part of check-in [8329ac6f] Fix corer cases of vector IN operators where the RHS is a compound SELECT that includes an ORDER BY clause. (check-in: [8329ac6f] user: drh branch: rowvalue, size: 207339)
14:37
[4ccfc554] part of check-in [4071da2f] Enhance the sqlite3GetTempRange() and sqlite3ReleaseTempRange() internal routines so that they use sqlite3GetTempReg() and sqlite3ReleaseTempReg() when nReg==1. (check-in: [4071da2f] user: drh branch: rowvalue, size: 207444)
2016-09-03
01:46
[38216d0b] part of check-in [f1d06c49] Performance optimizations. (check-in: [f1d06c49] user: drh branch: rowvalue, size: 207575)
2016-08-19
15:41
[cf90abce] part of check-in [b1787236] Merge recent enhancements from trunk. (check-in: [b1787236] user: drh branch: rowvalue, size: 207569)
2016-08-18
20:56
[fda7fd24] part of check-in [d7cf423c] Fix a zName to zDbSName conversion missed in the previous check-in. (check-in: [d7cf423c] user: drh branch: zDbSName, size: 208433)
15:21
[3a5ddce5] part of check-in [4768a106] Merge recent enhancements from trunk. (check-in: [4768a106] user: drh branch: rowvalue, size: 207566)
14:33
[890c32ea] part of check-in [92a22f01] 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: [92a22f01] user: drh branch: zDbSName, size: 208430)
2016-08-02
18:50
[228eec64] part of check-in [092b1c5f] Add tests and fixes for vector operations that use sub-queries with different combinations of LIMIT, OFFSET and ORDER BY clauses. (check-in: [092b1c5f] user: dan branch: rowvalue, size: 207563)
2016-08-01
20:14
[952aa1b4] part of check-in [3ef75d45] Fix a problem with vector range constraints involving the rowid column. And other issues. (check-in: [3ef75d45] user: dan branch: rowvalue, size: 207292)
16:37
[bb2a1583] part of check-in [1f4dba87] Fix a problem with IN(...) constraints where the LHS is a sub-select that is an aggregate query. (check-in: [1f4dba87] user: dan branch: rowvalue, size: 207342)
2016-07-09
20:23
[0115f5d2] part of check-in [b2204215] Add some support for using row value constructors in certain parts of SQL expressions. There are many bugs on this branch. (check-in: [b2204215] user: dan branch: rowvalue, size: 208367)
2016-06-04
17:12
[f3c6e906] part of check-in [b411107a] Allocate KeyInfo objects from lookaside if possible. (check-in: [b411107a] user: drh branch: trunk, size: 208427)
2016-05-20
13:44
[a0c4abf5] part of check-in [ed1b30dc] 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: [ed1b30dc] user: drh branch: orderby-limit, size: 208414)
2016-05-19
22:13
[131eeddf] part of check-in [852d1eda] 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: [852d1eda] user: drh branch: orderby-limit, size: 208369)
2016-04-25
02:20
[fd4a7ce2] part of check-in [ec215f94] 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: [ec215f94] user: drh branch: trunk, size: 207236)
2016-04-15
16:17
[22ef53e7] part of check-in [db5a2364] Skip-ahead does not always work. So we still have to check for redundancy. (check-in: [db5a2364] user: drh branch: skip-ahead-distinct, size: 207395)
01:55
[f7ad4ad2] part of check-in [9e14aa14] Progress toward getting DISTINCT to use a seek to advance to the next distinct row, when driven by an appropriate index. (check-in: [9e14aa14] user: drh branch: skip-ahead-distinct, size: 207395)
2016-04-14
19:29
[d3ef06f9] part of check-in [129083bd] Work toward improving analysis and code generation for DISTINCT and aggregate queries. (check-in: [129083bd] user: drh branch: better-distinct-agg, size: 207382)
15:38
[30217121] part of check-in [67d7f79c] Add some missing testcase() macros to the pushDownWhereTerms() routine. (check-in: [67d7f79c] user: drh branch: trunk, size: 207097)
13:06
[6c7f3cf6] part of check-in [5a469145] Additional ".selecttrace" debugging output when the query is transformed from a DISTINCT into a GROUP BY. (check-in: [5a469145] user: drh branch: trunk, size: 206999)
2016-04-12
00:26
[a07e6022] part of check-in [e2c4995b] Performance optimization the Vdbe allocator. (check-in: [e2c4995b] user: drh branch: trunk, size: 206810)
00:16
[ac6d3e0c] part of check-in [aec94b6e] Avoid unnecessary calls to object destructors for a small performance gain. (check-in: [aec94b6e] user: drh branch: trunk, size: 206744)
2016-04-05
20:59
[d9b8628a] part of check-in [fb555c3c] Carry table column types through into VIEW definitions, where possible. (check-in: [fb555c3c] user: drh branch: trunk, size: 206721)
2016-03-22
20:05
[7849cee0] part of check-in [605eba4a] The sqlite3_column_decltype() routine should return NULL, not an empty string, if the column has no declared type. (check-in: [605eba4a] user: drh branch: trunk, size: 206374)
2016-03-17
18:41
[41467e0c] part of check-in [41335d88] An alternative method of encoding the wildcard in "SELECT *". This is an experiment. (check-in: [41335d88] user: drh branch: select-wildcard, size: 206195)
2016-03-15
17:52
[6dd2097b] part of check-in [c7bae50b] Implement FROM-clause subqueries as co-routines whenever they are guaranteed to be the outer-most loop of the join. (check-in: [c7bae50b] user: drh branch: trunk, size: 206360)
2016-02-29
15:53
[137b31da] part of check-in [842b2116] 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: [842b2116] user: drh branch: schema-storage, size: 205572)
2016-02-26
04:13
[1bacfde7] part of check-in [3ef6a315] 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: [3ef6a315] user: drh branch: trunk, size: 205645)
2016-02-25
16:04
[dbc73a63] part of check-in [d491745c] Take the LIMIT clause into account when estimating the cost of sorting. (check-in: [d491745c] user: drh branch: planner-improvements, size: 205690)
2016-02-13
23:43
[1a7e23a3] part of check-in [6a9c4a3e] Enhance ability to debug out-of-memory errors. (check-in: [6a9c4a3e] user: mistachkin branch: noMemBkpt, size: 205307)
2016-02-09
02:12
[ff80004a] part of check-in [ca72be86] 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: [ca72be86] user: drh branch: trunk, size: 205287)
2016-02-05
13:38
[57646a44] part of check-in [0a802e96] Add the slightly faster sqlite3DbMallocRawNN(db,n) routine for the majority cases where db is guaranteed to be not NULL. (check-in: [0a802e96] user: drh branch: oom-handling, size: 205320)
01:55
[07178f2a] part of check-in [c3ef0347] Improvements to the way that OOM errors are processed. (check-in: [c3ef0347] user: drh branch: oom-handling, size: 205316)
2016-02-04
02:34
[5ae632f5] part of check-in [1c8d3001] Add and use the sqlite3VdbeZeroRegister() interface for coding the common operation of writing zero into a register. (check-in: [1c8d3001] user: drh branch: zero-register, size: 205244)
2016-01-30
00:45
[ea6f3b0c] part of check-in [6c520d57] Change the P4_INTARRAY so that always begins with a length integer. Print the content of the INTARRAY on EXPLAIN output. (check-in: [6c520d57] user: drh branch: covering-or, size: 205280)
2016-01-25
15:57
[c34292c8] part of check-in [7ac017a4] Replace the OP_SetIfNotPos operator with OP_OffsetLimit in the VDBE, for simpler and smaller code. (check-in: [7ac017a4] user: drh branch: trunk, size: 205245)
2016-01-22
17:48
[1db9a902] part of check-in [73231753] Add the sqlite3TokenInit() utility function. (check-in: [73231753] user: drh branch: trunk, size: 205485)
2016-01-18
13:18
[718954db] part of check-in [9e8c23ac] Avoid unnecessary calls to memset() for a small performance improvement. (check-in: [9e8c23ac] user: drh branch: trunk, size: 205521)
2016-01-13
17:59
[47cd4189] part of check-in [8b4f5080] 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: [8b4f5080] user: drh branch: branch-3.10, size: 205355)
17:50
[5b0f2aa9] part of check-in [cdbb0947] 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: [cdbb0947] user: drh branch: trunk, size: 205497)
2016-01-12
02:00
[372234e3] part of check-in [fc628516] Fix an uninitialized field in the Select object when SELECTTRACE is enabled. (check-in: [fc628516] user: drh branch: trunk, size: 205204)
2016-01-08
12:46
[d84c0911] part of check-in [cede2bf8] Reduce the number of calls to memset() in sqlite3DbMallocZero(). (check-in: [cede2bf8] user: drh branch: trunk, size: 205148)
2015-12-03
21:47
[f8fded11] part of check-in [e6521a43] Improved OOM recovery in the SELECT code generator logic. (check-in: [e6521a43] user: drh branch: trunk, size: 205062)
2015-12-02
19:46
[1611828a] part of check-in [4f2bcff9] Remove unreachable branches from the decltype computation logic in the query planner. (check-in: [4f2bcff9] user: drh branch: trunk, size: 205059)
18:59
[dd04f017] part of check-in [3e1d71fc] Have the sqlite3_column_decltype() API report the declared types for the left-most SELECT statement in a compound SELECT. (check-in: [3e1d71fc] user: dan branch: trunk, size: 205050)
2015-11-21
19:43
[e10586c7] part of check-in [60de5f23] 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: [60de5f23] user: dan branch: trunk, size: 205017)
13:24
[0495e86f] part of check-in [ff5716b8] 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: [ff5716b8] user: drh branch: trunk, size: 204966)
2015-11-19
17:55
[2376d320] part of check-in [28df5dc4] When manifesting a view as part of an DELETE or UPDATE, be sure to include the hidden columns in the manifestation. (check-in: [28df5dc4] user: drh branch: trunk, size: 204498)
16:46
[3492a279] part of check-in [59bd0ec7] Fix problems with INSERT INTO ... SELECT ... statements that write to tables with __hidden__ columns. (check-in: [59bd0ec7] user: dan branch: trunk, size: 204375)
16:33
[e8eccb5b] part of check-in [201ac6d4] 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: [201ac6d4] user: drh branch: trunk, size: 204372)
13:53
[ac980e5b] part of check-in [5490646b] Only support the magic "__hidden__" column name prefix interpretation when compiled with SQLITE_ENABLE_HIDDEN_COLUMNS. (check-in: [5490646b] user: drh branch: hidden-columns-in-tables, size: 204313)
2015-11-18
20:57
[7996cf4b] part of check-in [3071ba2b] Honor the "__hidden__" prefix on the columns of views. (check-in: [3071ba2b] user: drh branch: hidden-columns-in-tables, size: 204573)
18:43
[2fa981f5] part of check-in [2dbffb3a] 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: [2dbffb3a] user: drh branch: hidden-columns-in-tables, size: 204447)
2015-11-15
11:13
[4c58ae31] part of check-in [791761eb] Fix the column name uniquifier so that it works with zero-length column names. (check-in: [791761eb] user: drh branch: trunk, size: 204369)
2015-11-14
22:04
[1854c85b] part of check-in [92724260] 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: [92724260] user: drh branch: trunk, size: 204336)
20:52
[d5878c33] part of check-in [5b08f29f] Use a hash table to improve the preformance of column name uniqueness checking. (check-in: [5b08f29f] user: drh branch: trunk, size: 204524)
16:47
[7ef4a946] part of check-in [62667129] Use randomness to prevent slowness in the generated-column-name uniqueness checking. (check-in: [62667129] user: drh branch: trunk, size: 204479)
2015-11-07
17:48
[00a2a10d] part of check-in [028475cb] Proposed fix for an infinite loop bug in the WITH clause semantic analysis logic. (check-in: [028475cb] user: drh branch: infinite-with-loop-bug, size: 204420)
15:19
[f5b0518e] part of check-in [2040d88e] 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: [2040d88e] user: drh branch: infinite-with-loop-bug, size: 204351)
2015-10-16
20:53
[167b4e90] part of check-in [26fa091d] Merge recent enhancements from trunk. Version now 3.9.1. (check-in: [26fa091d] user: drh branch: cursor-hints, size: 204315)
2015-10-15
20:17
[a4478981] part of check-in [39ae92f5] Experiments with an OP_Unpack opcode that extracts multiple columns from a record without caching. (check-in: [39ae92f5] user: drh branch: unpack-opcode, size: 204366)
19:21
[dbf1fb82] part of check-in [871e091d] 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: [871e091d] user: drh branch: trunk, size: 204301)
2015-10-14
20:09
[3e4a4691] part of check-in [29444149] Merge in all the 3.9.0 updates from trunk. (check-in: [29444149] user: drh branch: cursor-hints, size: 204433)
2015-10-11
20:39
[0bc9cd2e] part of check-in [9ab9c8c6] Detect and report circularly defined views even if the views have the columns defined in the CREATE VIEW statement. (check-in: [9ab9c8c6] user: drh branch: trunk, size: 204419)
20:08
[f70b36ca] part of check-in [46ee3453] Remove an unreachable branch in the query flattener substitution logic. (check-in: [46ee3453] user: drh branch: trunk, size: 204322)
19:46
[0e089967] part of check-in [3d0bd95e] Improved substitution logic in the query flattener. Saves code space, and (more importantly) works correctly with table-valued functions. (check-in: [3d0bd95e] user: drh branch: trunk, size: 204333)
2015-10-10
14:41
[36c05502] part of check-in [9ddef84d] 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: [9ddef84d] user: drh branch: trunk, size: 204652)
2015-10-06
21:07
[2c4bfdf7] part of check-in [041df7c2] Simplifications to the VDBE bytecode that handles LIMIT and OFFSET. (check-in: [041df7c2] user: drh branch: trunk, size: 204607)
17:27
[8fb8cb02] part of check-in [4b631364] 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: [4b631364] user: drh branch: trunk, size: 205140)
2015-09-29
15:50
[e49f4af9] part of check-in [0e317dda] Remove dead code, replacing with assert() statements that make sure the code really was dead. (check-in: [0e317dda] user: drh branch: vtab-onepass, size: 204638)
2015-09-25
13:42
[33230303] part of check-in [6e4ac0be] 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: [6e4ac0be] user: drh branch: trunk, size: 204867)
2015-09-24
15:06
[514646c1] part of check-in [fbe63762] Merge trunk changes into the cursor-hints branch. (check-in: [fbe63762] user: drh branch: cursor-hints, size: 204517)
2015-09-19
20:27
[36ee14d7] part of check-in [97cfe346] Do not allow table-valued function syntax to be used on a view. (check-in: [97cfe346] user: drh branch: trunk, size: 204503)
2015-09-03
14:39
[bb99c372] part of check-in [25ee3000] Merge enhancements from trunk. (check-in: [25ee3000] user: drh branch: cursor-hints, size: 204416)
13:46
[c1761338] part of check-in [847387ec] Add the sqlite3VdbeLoadString() and sqlite3VdbeMultiLoad() routines to help with code generation, especially on PRAGMAs. Rename sqlite3VdbeAddGoto() to just sqlite3VdbeGoto(). (check-in: [847387ec] user: drh branch: trunk, size: 204402)
2015-09-02
18:40
[da24e840] part of check-in [0a5b00e4] Add and use the sqlite3VdbeChangeOpcode() routine. Simplify the implementation of the other sqlite3VdbeChange*() routines. (check-in: [0a5b00e4] user: drh branch: trunk, size: 204435)
18:19
[0d736c7e] part of check-in [be78f413] Add the sqlite3VdbeAddGoto(v,i) routine as a shorthand for sqlite3VdbeAddOp2(v,OP_Goto,0,i). (check-in: [be78f413] user: drh branch: trunk, size: 204437)
2015-09-01
18:31
[3f588e05] part of check-in [29570a60] Merge enhancements from trunk. (check-in: [29570a60] user: drh branch: cursor-hints, size: 204572)
2015-08-26
14:01
[b52c80f2] part of check-in [c2f3bbad] Evaluate expressions only once when the same expression is used in both the result set and in the ORDER BY clause. (check-in: [c2f3bbad] user: drh branch: trunk, size: 204558)
11:40
[50b0f02e] part of check-in [58ba7363] Refactor With.a.zErr into With.a.zCteErr. No logic changes. (check-in: [58ba7363] user: drh branch: trunk, size: 204310)
2015-08-24
17:42
[da6d1e7a] part of check-in [d794b34d] Enhance the CREATE VIEW syntax so that the names of columns of the view can be specified after the view name. (check-in: [d794b34d] user: drh branch: trunk, size: 204286)
2015-08-22
01:32
[24323faa] part of check-in [351bc22f] 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: [351bc22f] user: drh branch: trunk, size: 204291)
2015-08-20
23:45
[4f276673] part of check-in [b9927c87] Merge recent enhancements from trunk, including table-valued expressions. (check-in: [b9927c87] user: drh branch: cursor-hints, size: 204129)
2015-08-19
15:20
[c46de38c] part of check-in [b9193761] 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: [b9193761] user: drh branch: table-valued-functions, size: 204115)
2015-08-13
20:07
[00acffc2] part of check-in [82a7a61b] 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: [82a7a61b] user: drh branch: cursor-hints, size: 204075)
2015-07-16
17:29
[57ef3d98] part of check-in [9c39d464] Fix compilation issues with SQLITE_OMIT_COMPOUND_SELECT defined. (check-in: [9c39d464] user: mistachkin branch: trunk, size: 204061)
2015-07-05
22:15
[d3c04f01] part of check-in [6d2999af] Do not allow recursive CTEs that use aggregate queries in the recursive part. (check-in: [6d2999af] user: drh branch: trunk, size: 204138)
2015-07-02
16:52
[7003fe66] part of check-in [bcc8a755] Fix harmless compiler warnings and one macro VVA_ONLY macro usage issue. (check-in: [bcc8a755] user: mistachkin branch: trunk, size: 204007)
2015-06-26
18:16
[009c6138] part of check-in [2abc44eb] Cache the sqlite3_context structure in the P4 operand of VDBE programs for faster SQL function dispatch. (check-in: [2abc44eb] user: drh branch: trunk, size: 204007)
2015-06-23
23:31
[9baeda79] part of check-in [c8d1f305] Mark some branches as unreachable after the recent change that recognizes mismatch result set sizes on compound SELECT statements sooner. (check-in: [c8d1f305] user: drh branch: trunk, size: 204006)
12:19
[09865f89] part of check-in [4df852ce] 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: [4df852ce] user: dan branch: trunk, size: 203815)
2015-06-18
14:32
[15a17aff] part of check-in [ed96e14a] Pervent the likelihood() function from moving ON clause terms of a LEFT JOIN into the WHERE clause. Fix for ticket [5f60b11fc8e23490e2] (check-in: [ed96e14a] user: drh branch: trunk, size: 203955)
2015-06-10
17:20
[ecd8562e] part of check-in [a1eaf171] 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: [a1eaf171] user: drh branch: view-optimization, size: 204383)
2015-06-08
22:59
[8fd2ea10] part of check-in [cabf2187] 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: [cabf2187] user: drh branch: view-optimization, size: 204327)
15:08
[45a814a7] part of check-in [c32ce54c] Factor out the TreeView parse tree printing module into a separate file. (check-in: [c32ce54c] user: drh branch: view-optimization, size: 203789)
2015-06-06
18:30
[d507fe71] part of check-in [4f20ac90] Code simplifications in select.c and where.c. (check-in: [4f20ac90] user: drh branch: view-optimization, size: 206711)
00:18
[630623e6] part of check-in [f4c90d06] Minor cleanup of the sqlite3Select() procedure. (check-in: [f4c90d06] user: drh branch: view-optimization, size: 206759)
2015-06-05
22:33
[6a8f2c44] part of check-in [be8e3fc7] Split FROM-clause subquery flattening and code generation into separate loops. (check-in: [be8e3fc7] user: drh branch: view-optimization, size: 206361)
20:27
[b2dfbc9c] part of check-in [283bf0b6] 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: [283bf0b6] user: drh branch: trunk, size: 206132)
2015-06-04
12:08
[36416c13] part of check-in [6a9cf063] Change the name of SrcList.a[].zIndex to the more descriptive SrcList.a[0].zIndexedBy. (check-in: [6a9cf063] user: drh branch: trunk, size: 205933)
2015-06-02
18:09
[498342ba] part of check-in [6df18e94] 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. (check-in: [6df18e94] user: drh branch: trunk, size: 205913)
15:32
[7bb5c633] part of check-in [bce3f041] Rename SQLITE_AFF_NONE to SQLITE_AFF_BLOB. (check-in: [bce3f041] user: drh branch: blob-affinity-rename, size: 203176)
2015-06-01
20:28
[7acdb105] part of check-in [297fae75] 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: [297fae75] user: drh branch: subquery-opt, size: 205913)
17:32
[38853592] part of check-in [e3fa8b93] Break out the query flattener into a separate source-code file. (check-in: [e3fa8b93] user: drh branch: flattener-in-new-file, size: 177718)
2015-05-29
01:35
[5978cc52] part of check-in [a29e117d] 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: [a29e117d] user: drh branch: trunk, size: 203176)
2015-05-27
13:06
[4dcc4537] part of check-in [0055df04] CTEs have never had working rowids. So disallow the use of the "rowid" column within CTEs. (check-in: [0055df04] user: drh branch: no-rowid-in-cte, size: 203136)
2015-05-25
09:33
[9d9f6975] part of check-in [8c3929bd] Remove an incorrect and pointless assert(). (check-in: [8c3929bd] user: drh branch: trunk, size: 203116)
2015-05-22
17:29
[6adad8d6] part of check-in [b9727e6b] 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: [b9727e6b] user: drh branch: trunk, size: 203457)
2015-05-20
20:27
[5b44995d] part of check-in [3cd2b772] 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: [3cd2b772] user: dan branch: branch-3.8.6, size: 196616)
2015-05-19
23:56
[95e728e1] part of check-in [45d3893c] Enhance the selecttrace display by showing Select.selFlags. (check-in: [45d3893c] user: drh branch: trunk, size: 203806)
2015-05-18
04:24
[6d9d6ae8] part of check-in [9c0d8090] 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: [9c0d8090] user: drh branch: trunk, size: 203779)
2015-05-04
16:09
[1b0bfc7d] part of check-in [1421c8ff] Fix a faulty assert() in the SELECT code generator and add a test case to prevent regression. (check-in: [1421c8ff] user: drh branch: trunk, size: 203685)
2015-05-02
11:45
[5e83049a] part of check-in [7952c322] Cleanup of the sqlite3StrAccumInit() function. No functionality changes. (check-in: [7952c322] user: drh branch: trunk, size: 203667)
2015-04-21
17:17
[35433ea8] part of check-in [623ddbdb] Alternative fix for the double-initialization of type and collating sequence problem that leaves the estimated table size intact. (check-in: [623ddbdb] user: drh branch: trunk, size: 203687)
17:07
[01c386a3] part of check-in [9e6beda2] Make sure the datatype and collating sequence of transients tables are not initialized more than once. Otherwise a memory leak results. (check-in: [9e6beda2] user: drh branch: trunk, size: 203693)
16:09
[3b64da1c] part of check-in [b623ebd8] Fix a memory leak in the SELECT code generator tracing logic (code that is omitted in non-debugging builds). (check-in: [b623ebd8] user: drh branch: trunk, size: 203635)
15:49
[b14a9e1e] part of check-in [718d5d0e] 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: [718d5d0e] user: dan branch: trunk, size: 203612)
15:16
[d87c64b3] part of check-in [d1e6bc91] Change an assert() in the aggregate query code generator into a testcase(). (check-in: [d1e6bc91] user: drh branch: trunk, size: 203614)
2015-04-20
01:25
[217d181a] part of check-in [74b7bf17] Merge all recent trunk enhancements and fixes into the apple-osx branch. (check-in: [74b7bf17] user: drh branch: apple-osx, size: 203665)
2015-04-17
16:12
[361dfc32] part of check-in [ad67a67c] Remove an ALWAYS() that turns out to be false when there is a semantic error on a compound SELECT. (check-in: [ad67a67c] user: drh branch: trunk, size: 203541)
15:16
[e7d3f26d] part of check-in [620d19c3] Fix a faulty assert() in sqlite3SelectNew(). (check-in: [620d19c3] user: drh branch: trunk, size: 203549)
2015-04-16
16:22
[d6697074] part of check-in [10715b05] Fix a faulty assert() in the compound-SELECT code generator. (check-in: [10715b05] user: drh branch: trunk, size: 203587)
14:33
[b7b91db8] part of check-in [9d336be1] Fix a faulty assert() in the compound select code generator. (check-in: [9d336be1] user: drh branch: trunk, size: 203541)
14:13
[e24bd1a7] part of check-in [ec5a493a] Improvements to the way VALUES clauses are parsed. (check-in: [ec5a493a] user: drh branch: trunk, size: 203405)
07:19
[fdac71ed] part of check-in [b51028ed] Ensure the sqlite3Select() routine always returns non-zero if an error has occurred. (check-in: [b51028ed] user: dan branch: trunk, size: 203427)
2015-04-15
13:51
[ee49a7bf] part of check-in [bfc7142a] Merge recent trunk fixes and enhancements into the apple-osx branch. (check-in: [bfc7142a] user: drh branch: apple-osx, size: 203512)
07:10
[93260bc9] part of check-in [14784c31] Change the multiSelectOrderBy() routine to return non-zero if there has been any prior error. (check-in: [14784c31] user: drh branch: trunk, size: 203388)
2015-04-13
23:11
[8859ea21] part of check-in [e709d3b4] Merge all recent trunk enhances into the apple-osx branch. (check-in: [e709d3b4] user: drh branch: apple-osx, size: 203506)
2015-04-12
17:35
[117e0f9a] part of check-in [9a453f52] 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: [9a453f52] user: drh branch: trunk, size: 203382)
2015-04-08
12:47
[7d05c857] part of check-in [30121870] Merge in all version 3.8.9 changes from trunk. (check-in: [30121870] user: drh branch: apple-osx, size: 203490)
2015-04-04
16:43
[c28c52e3] part of check-in [427b50fb] Fix a problem with resolving ORDER BY clauses that feature COLLATE clauses attached to compound SELECT statements. (check-in: [427b50fb] user: dan branch: compound-order-by-fix, size: 203366)
2015-03-21
17:00
[ca8b5242] part of check-in [9f1f8b33] Merge all recent trunk enhancements and especially the blocking WAL-lock fix into the apple-osx branch. (check-in: [9f1f8b33] user: drh branch: apple-osx, size: 203414)
03:18
[72ffb62e] part of check-in [b11d1793] 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: [b11d1793] user: drh branch: trunk, size: 203290)
2015-03-09
13:18
[b85b02f4] part of check-in [5e04eec8] Merge recent trunk enhancements into the apple-osx branch. (check-in: [5e04eec8] user: drh branch: apple-osx, size: 203404)
2015-03-07
00:57
[94e016b6] part of check-in [26cb5145] Refactor some jump opcodes in the VDBE. Add JumpZeroIncr and DecrJumpZero. Fix the LIKE optimization to work with DESC sort order. (check-in: [26cb5145] user: drh branch: like-opt-fix, size: 203280)
2015-02-13
12:13
[66c2fce5] part of check-in [b2449d67] Merge all recent trunk fixes and enhancements into the apple-osx branch. (check-in: [b2449d67] user: drh branch: apple-osx, size: 203527)
2015-02-09
16:09
[e46cef4c] part of check-in [c053448a] Propagate the COLLATE operator upward through function calls. Initial fix for ticket [ca0d20b6cdddec5e8]. (check-in: [c053448a] user: drh branch: tkt-2f7170d7, size: 203403)
15:21
[15490b9d] part of check-in [0b7d65e3] 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: [0b7d65e3] user: drh branch: tkt-2f7170d7, size: 203407)
13:42
[edcf8ba8] part of check-in [aa093fef] 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: [aa093fef] user: drh branch: trunk, size: 202874)
11:54
[6ea3518b] part of check-in [b3c6b8a3] 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: [b3c6b8a3] user: drh branch: trunk, size: 202848)
2015-02-06
16:03
[30da05ba] part of check-in [44711921] Merge all recent trunk enhancements into the apple-osx branch. (check-in: [44711921] user: drh branch: apple-osx, size: 202817)
2015-01-22
12:00
[1f208752] part of check-in [9e6eae66] 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: [9e6eae66] user: drh branch: trunk, size: 202693)
2015-01-20
02:50
[a4e8fda2] part of check-in [dc711db4] Fix another instance of an incorrect value for KeyInfo.nXField on a sorting index. More changes for ticket [f97c4637102a3ae72b79]. (check-in: [dc711db4] user: drh branch: branch-3.8.8, size: 202670)
2015-01-19
20:59
[bc02e8b0] part of check-in [c16bae5e] 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: [c16bae5e] user: drh branch: tkt-f97c4637, size: 202582)
2015-01-08
19:55
[eb792a4e] part of check-in [cc780842] Merge the testing enhancements and the unlimited VALUES enhancement from trunk. (check-in: [cc780842] user: drh branch: apple-osx, size: 202679)
2015-01-05
20:04
[e4c38c75] part of check-in [ee30fb35] Avoid O(N*N) behavior with very long lists of VALUES. (check-in: [ee30fb35] user: drh branch: many-VALUEs, size: 202555)
19:16
[4776e16d] part of check-in [9ce9e43a] Handle compound-select statements originating from VALUES clauses as a special case that does not use recursion. (check-in: [9ce9e43a] user: drh branch: many-VALUEs, size: 202446)
15:48
[28cf616a] part of check-in [fe677d13] Remove some needless recursion from compound SELECT processing. (check-in: [fe677d13] user: drh branch: trunk, size: 200690)
2014-12-04
23:42
[4f48f3b0] part of check-in [463ad971] Import from trunk support for SQLITE_CHECKPOINT_TRUNCATE and fixes for a couple of obscure bugs. (check-in: [463ad971] user: drh branch: apple-osx, size: 200772)
21:54
[f377fb8a] part of check-in [0d3aef97] 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: [0d3aef97] user: drh branch: trunk, size: 200648)
2014-10-14
14:17
[00edeea6] part of check-in [880df756] Merge from trunk recent micro-optimizations and the fix for the DESC index GROUP BY ORDER BY bug. (check-in: [880df756] user: drh branch: apple-osx, size: 200783)
2014-10-13
13:00
[42816595] part of check-in [20062f49] 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: [20062f49] user: drh branch: trunk, size: 200659)
12:30
[506c2ff4] part of check-in [134e65c0] Use OP_SorterColumns in aggregate queries. Remove OPFLAG_CLEARCACHE. (check-in: [134e65c0] user: drh branch: OP_SorterColumns, size: 200304)
01:23
[d32a3d22] part of check-in [b9c695e8] 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: [b9c695e8] user: drh branch: OP_SorterColumns, size: 200314)
2014-10-01
01:46
[f0ee74ce] part of check-in [2078454a] Merge the latest enhancements from trunk. (check-in: [2078454a] user: drh branch: apple-osx, size: 200982)
2014-09-30
19:04
[f1153316] part of check-in [5ce05757] 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: [5ce05757] user: drh branch: trunk, size: 200858)
13:46
[b5304314] part of check-in [92e0b4bd] Show tree diagrams of data structures in the debugging output when the 0x100 bit is set on sqlite3WhereTrace or sqlite3SelectTrace. (check-in: [92e0b4bd] user: drh branch: trunk, size: 200662)
12:33
[373da54c] part of check-in [4ff51325] Remove the SQLITE_ENABLE_TREE_EXPLAIN compile-time option. Add alternative debugging display routines: sqlite3TreeViewExpr(), sqlite3TreeViewExprList(), and sqlite3TreeViewSelect(). (check-in: [4ff51325] user: drh branch: trunk, size: 200430)
2014-09-29
18:47
[6e7d7a27] part of check-in [5e5d6e86] 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: [5e5d6e86] user: drh branch: faster-OP_Column, size: 200481)
2014-09-21
23:08
[66f96be2] part of check-in [3967ebe8] Merge in all recent changes from trunk. (check-in: [3967ebe8] user: drh branch: apple-osx, size: 200598)
00:27
[a83ed8bc] part of check-in [c0b61f70] Improved ".selecttrace" output. (check-in: [c0b61f70] user: drh branch: select-trace, size: 200474)
2014-09-20
20:38
[3108c73d] part of check-in [89398880] Candidate fix for [d11a6e908f]. (check-in: [89398880] user: dan branch: select-trace, size: 199688)
20:24
[a2aac0a2] part of check-in [f1ba68f1] Fix the SELECTTRACE_ENABLE macro so that it doesn't cause problems for testfixture. Add new SELECTTRACE() calls. (check-in: [f1ba68f1] user: drh branch: select-trace, size: 198876)
18:18
[4e00e042] part of check-in [cbe0cf9d] Enable SELECT query planning tracing when compiled with SQLITE_ENABLE_SELECTTRACE and either SQLITE_DEBUG or SQLITE_TEST. (check-in: [cbe0cf9d] user: drh branch: select-trace, size: 198760)
2014-09-15
14:46
[0cd6706f] part of check-in [0bdf1a08] 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: [0bdf1a08] user: drh branch: trunk, size: 198446)
11:14
[70312b18] part of check-in [4ff0eb96] 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: [4ff0eb96] user: drh branch: trunk, size: 198037)
2014-09-12
17:41
[bd8ed755] part of check-in [32055623] Simplify the way the column cache is managed around OP_Move instructions. (check-in: [32055623] user: drh branch: trunk, size: 197878)
2014-09-06
16:39
[b4457526] part of check-in [e62aab5e] Fix typos in comments. No code changes. (check-in: [e62aab5e] user: peter.d.reid branch: trunk, size: 197882)
2014-09-02
15:57
[fa6b6845] part of check-in [696dc935] Merge the latest trunk changes into the apple-osx branch. (check-in: [696dc935] user: drh branch: apple-osx, size: 198003)
2014-08-29
14:40
[89e569b2] part of check-in [35c44a3c] Merge recent performance enhancements from trunk onto the threads branch. (check-in: [35c44a3c] user: drh branch: threads, size: 197879)
12:29
[1c466757] part of check-in [462f42af] Contains a fault. Was: Avoid an unnecessary OP_Move operation for expression subqueries. (check-in: [462f42af] user: drh branch: mistake, size: 196596)
2014-08-14
14:02
[f8b0b6c4] part of check-in [a608fd1d] Merge the pre-3.8.6 changes into the threads branch. (check-in: [a608fd1d] user: drh branch: threads, size: 197901)
13:39
[13588d2c] part of check-in [08058df3] Merge the pre-3.8.6 changes from trunk into the apple-osx branch. (check-in: [08058df3] user: drh branch: apple-osx, size: 196742)
2014-08-12
01:23
[ea48e891] part of check-in [a179e41e] Fix an assert() statement in the SELECT code generator that was incorrect following an OOM error. (check-in: [a179e41e] user: drh branch: trunk, size: 196618)
2014-08-06
02:03
[c28f5165] part of check-in [a353a851] Merge all recent changes from trunk. (check-in: [a353a851] user: drh branch: threads, size: 197873)
01:51
[c26fd652] part of check-in [b2e01080] Merge 3.8.6 beta changes in from trunk. (check-in: [b2e01080] user: drh branch: apple-osx, size: 196714)
2014-08-05
00:53
[1529c490] part of check-in [01f60027] Improved VdbeCoverage() macros. A few minor simplifications to generated VDBE code. (check-in: [01f60027] user: drh branch: IN-operator-improvements, size: 196590)
2014-06-05
12:53
[a34db38f] part of check-in [2dbdfa51] Merge in the 3.8.5 release changes and the FTS integrity-check fix. (check-in: [2dbdfa51] user: drh branch: apple-osx, size: 196757)
2014-06-03
14:42
[6762c62e] part of check-in [6d818052] 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: [6d818052] user: drh branch: trunk, size: 196633)
2014-05-29
20:36
[2e621e9a] part of check-in [b9fad449] Merge trunk changes into the apple-osx branch. (check-in: [b9fad449] user: drh branch: apple-osx, size: 196862)
20:24
[2657f35b] part of check-in [416cb091] Merge changes from the trunk into the threads branch. (check-in: [416cb091] user: drh branch: threads, size: 197916)
2014-05-27
18:18
[7df17ec5] part of check-in [d16e575d] 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: [d16e575d] user: drh branch: trunk, size: 196738)
2014-05-26
20:15
[b6a17082] part of check-in [82152027] Merge recent trunk changes into the threads branch. (check-in: [82152027] user: drh branch: threads, size: 197910)
20:08
[bd4020ec] part of check-in [54b5fa77] Merge recent trunk changes into the apple-osx branch. (check-in: [54b5fa77] user: drh branch: apple-osx, size: 196856)
2014-05-23
17:17
[a6e8fe35] part of check-in [9268df30] 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: [9268df30] user: dan branch: trunk, size: 196732)
2014-05-19
15:16
[4cf17c09] part of check-in [17349a49] 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: [17349a49] user: drh branch: safer-malloc, size: 196674)
2014-05-08
23:01
[2270f574] part of check-in [9411d7dc] 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: [9411d7dc] user: drh branch: apple-osx, size: 196783)
2014-05-06
15:28
[109d659e] part of check-in [8ad0a123] 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: [8ad0a123] user: drh branch: smaller-expr, size: 196965)
2014-05-02
13:09
[a5ed3fdc] part of check-in [84862d3a] Merge latest trunk enhancements and fixes into the orderby-planning branch. (check-in: [84862d3a] user: drh branch: orderby-planning, size: 197837)
2014-05-01
20:26
[089c4d46] part of check-in [427409ae] 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: [427409ae] user: dan branch: trunk, size: 196659)
2014-04-25
15:01
[ed459f7f] part of check-in [1bd74c49] Store values loaded from the stat1 table as logarithmic values in memory. (check-in: [1bd74c49] user: dan branch: experimental-costs, size: 196737)
2014-04-23
12:57
[1a229278] part of check-in [e2c9f71a] Merge all recent trunk changes into the threads branch. (check-in: [e2c9f71a] user: drh branch: threads, size: 197849)
2014-04-21
13:21
[bc7feff0] part of check-in [de9a490f] 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: [de9a490f] user: dan branch: trunk, size: 196607)
2014-03-25
15:04
[20055cf9] part of check-in [c3ae3697] Remove the sequence values from sorter records used by ORDER BY as well. (check-in: [c3ae3697] user: dan branch: orderby-planning, size: 197019)
2014-03-24
20:19
[2b8722c9] part of check-in [3f90abdd] Omit the sequence value from sorter records used by GROUP BY queries that cannot use an index. (check-in: [3f90abdd] user: dan branch: orderby-planning, size: 196615)
18:08
[7f4a1ef9] part of check-in [4f472acc] Avoid unnecessary moving of content between registers during an ORDER BY. (check-in: [4f472acc] user: drh branch: orderby-planning, size: 196706)
09:34
[a0881837] part of check-in [5d506743] Remove an unnecessary temporary register allocation. (check-in: [5d506743] user: dan branch: orderby-planning, size: 196130)
02:20
[ece2324b] part of check-in [e6c59d23] Remove a pointless OP_Once operation in ORDER BY clauses with LIMIT. (check-in: [e6c59d23] user: drh branch: orderby-planning, size: 196168)
01:43
[bf5446f8] part of check-in [e7188fad] Further enhancements to generated VDBE code for ORDER BY. (check-in: [e7188fad] user: drh branch: orderby-planning, size: 196243)
2014-03-23
18:47
[09fef04e] part of check-in [faf7f9ca] merge fixes from trunk (check-in: [faf7f9ca] user: drh branch: orderby-planning, size: 196211)
17:45
[b1e0ac15] part of check-in [d696cded] Use only a single OP_MakeRecord instead of two when constructing entries to go onto a sorter. (check-in: [d696cded] user: drh branch: orderby-planning, size: 195582)
2014-03-22
02:19
[269c3e31] part of check-in [9b2838f2] 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: [9b2838f2] user: drh branch: trunk, size: 195777)
00:27
[89bfc222] part of check-in [c36f7461] 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: [c36f7461] user: drh branch: trunk, size: 195617)
2014-03-21
20:58
[633c56ad] part of check-in [fa06a6fe] 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: [fa06a6fe] user: drh branch: trunk, size: 195574)
19:56
[cbee644f] part of check-in [45d8cc67] 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: [45d8cc67] user: drh branch: trunk, size: 192067)
19:27
[0f7542b8] part of check-in [1f413aca] 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: [1f413aca] user: dan branch: trunk, size: 191976)
18:45
[596b8098] part of check-in [71e9ae72] Merge the OFFSET-on-query-without-FROM fix from trunk. (check-in: [71e9ae72] user: drh branch: orderby-planning, size: 195148)
18:16
[bea51816] part of check-in [179ef816] Fix the OFFSET clause so that it works correctly on queries that lack a FROM clause. Ticket [07d6a0453d4ed8]. (check-in: [179ef816] user: drh branch: trunk, size: 191641)
2014-03-19
23:24
[12534449] part of check-in [01afbf97] 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: [01afbf97] user: drh branch: orderby-planning, size: 195136)
17:41
[f481ab84] part of check-in [7ce2daaf] Make it possible for block-sort to use the OP_SorterOpen sorter in addition to a generic OP_OpenEphemeral. (check-in: [7ce2daaf] user: drh branch: orderby-planning, size: 195073)
16:56
[0c5df3eb] part of check-in [62f3a220] 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: [62f3a220] user: drh branch: orderby-planning, size: 195153)
15:17
[45d3ac12] part of check-in [463d921b] Avoid reusing temporary registers in co-routines when doing block-sorting. (check-in: [463d921b] user: drh branch: orderby-planning, size: 195143)
14:10
[bd6ac5dc] part of check-in [59742dd4] 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: [59742dd4] user: drh branch: orderby-planning, size: 195116)
2014-03-18
20:33
[41df0e4d] part of check-in [e258df23] 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: [e258df23] user: drh branch: orderby-planning, size: 191827)
2014-03-04
21:19
[0adf172d] part of check-in [554501f1] 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: [554501f1] user: drh branch: trunk, size: 191629)
2014-03-03
17:36
[780bbf39] part of check-in [c0fa0c0e] Change an OP_SCopy into an OP_Copy in a case where the destination might be used after the source has changed. (check-in: [c0fa0c0e] user: drh branch: trunk, size: 191621)
2014-02-26
21:35
[35b07a47] part of check-in [06c2db87] More efficient removal of duplicates in recursive queries using the UNION compound operator. (check-in: [06c2db87] user: drh branch: trunk, size: 191609)
19:05
[c959b4d9] part of check-in [3ad687b7] 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: [3ad687b7] user: drh branch: open-only-once, size: 191690)
2014-02-25
19:38
[7c3aa7b5] part of check-in [cc5eda54] 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: [cc5eda54] user: drh branch: tkt-8c63ff0eca, size: 191652)
2014-02-18
03:07
[28bff39f] part of check-in [b92d31a9] Add VdbeCoverage() and VdbeCoverageIf() macros for improved VDBE coverage testing. (check-in: [b92d31a9] user: drh branch: trunk, size: 191580)
2014-02-17
22:40
[618b53bd] part of check-in [ce184c7b] Add logic to do test coverage measurements on the VDBE code. (check-in: [ce184c7b] user: drh branch: insert-optimization, size: 191563)
2014-02-16
01:55
[ebec4d3f] part of check-in [aa2d8b0e] 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: [aa2d8b0e] user: drh branch: insert-optimization, size: 190754)
2014-02-10
21:07
[50961f0d] part of check-in [9367632d] Fix a pointless conditional. Add a test case. (check-in: [9367632d] user: drh branch: trunk, size: 190349)
18:56
[6afe4c3f] part of check-in [572d4be4] 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: [572d4be4] user: drh branch: trunk, size: 190339)
2014-02-09
18:02
[c055a9fa] part of check-in [67bfd59d] 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: [67bfd59d] user: drh branch: trunk, size: 190243)
2014-02-08
23:20
[de28cd6d] part of check-in [1e64dd78] 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: [1e64dd78] user: drh branch: trunk, size: 190704)
13:12
[b854d232] part of check-in [129217ee] Tweaks to the generated VDBE code to make it a little easier to follow. (check-in: [129217ee] user: drh branch: trunk, size: 190861)
04:24
[deb41db2] part of check-in [a45b8771] Enable constant expression factoring even if no tables are read and no transaction is started. (check-in: [a45b8771] user: drh branch: trunk, size: 190725)
01:40
[0b6011a5] part of check-in [192dea97] 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: [192dea97] user: drh branch: trunk, size: 190587)
2014-02-07
19:18
[47d93e6f] part of check-in [a522f364] Change the OP_InitCoroutine instruction to jump over the co-routine implementation. (check-in: [a522f364] user: drh branch: coroutine-refactor, size: 191261)
18:27
[01d0eca0] part of check-in [1ec0e9dd] Get rid of the OP_Undef and OP_IsUndef opcodes in favor of higher-level OP_InitCoroutine and OP_EndCoroutine. (check-in: [1ec0e9dd] user: drh branch: coroutine-refactor, size: 191370)
2014-02-06
14:59
[d1acf456] part of check-in [881164cf] Change more OP_OpenEphemeral operations to OP_OpenHash. (check-in: [881164cf] user: drh branch: subquery-codegen-refactor, size: 192408)
2014-02-05
18:15
[18aea806] part of check-in [2997e181] 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: [2997e181] user: drh branch: subquery-codegen-refactor, size: 192246)
2014-02-04
20:46
[b78f5e62] part of check-in [65d5dcdd] Remove the SF_Materialize flag from the SELECT object as it does not accomplish anything useful. (check-in: [65d5dcdd] user: drh branch: trunk, size: 192346)
2014-01-25
12:16
[a421f3fb] part of check-in [b30db0ac] Fix a problem causing SQLITE_OMIT_COMPOUND_SELECT builds to fail. (check-in: [b30db0ac] user: dan branch: trunk, size: 192378)
2014-01-24
20:37
[d88d739b] part of check-in [9554519c] 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: [9554519c] user: dan branch: trunk, size: 192433)
2014-01-22
19:23
[93764e0d] part of check-in [72c4b3f0] 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: [72c4b3f0] user: dan branch: trunk, size: 191780)
18:31
[a4ac380e] part of check-in [dea2ca6a] Fix harmless compiler warnings. (check-in: [dea2ca6a] user: drh branch: trunk, size: 191726)
18:07
[f6d84f3a] part of check-in [1945484e] Add support for LIMIT and OFFSET in a recursive query. (check-in: [1945484e] user: drh branch: cte-via-queue, size: 191726)
17:28
[b5430b99] part of check-in [37b343b0] Get ORDER BY working for recursive queries. (check-in: [37b343b0] user: drh branch: cte-via-queue, size: 191342)
13:35
[11c02c82] part of check-in [3eb5f9f8] 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: [3eb5f9f8] user: drh branch: cte-via-queue, size: 189672)
00:23
[c2021c75] part of check-in [5e6c4a55] Remove an unnecessary parameter from selectInnerLoop(). Clean up comments. (check-in: [5e6c4a55] user: drh branch: cte-via-queue, size: 186533)
2014-01-21
22:25
[f7b1558a] part of check-in [b2671e11] 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: [b2671e11] user: drh branch: cte-via-queue, size: 188844)
00:19
[a2709e1b] part of check-in [cc1cb321] 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: [cc1cb321] user: drh branch: level-pseudocolumn, size: 188761)
2014-01-20
14:58
[a27ac218] part of check-in [a06235e0] Remove an unused #define and add an assert(), both associated with WITH logic. (check-in: [a06235e0] user: drh branch: trunk, size: 188078)
2014-01-17
18:34
[170a9f9e] part of check-in [2031004d] Minor simplification of error message text for a couple of errors associated with WITH clause processing. (check-in: [2031004d] user: drh branch: trunk, size: 188048)
17:40
[a13cf4a4] part of check-in [a7323838] Resolve table names within CTEs in the context in which the CTE is declared, not the context in which it is used. (check-in: [a7323838] user: dan branch: trunk, size: 188063)
15:27
[b17dd5c3] part of check-in [c8eb1163] Fix a compiler warning in selectPopWith(). (check-in: [c8eb1163] user: drh branch: trunk, size: 187390)
15:15
[231079b8] part of check-in [0171e3bb] Add support for common table expressions (WITH clauses). (check-in: [0171e3bb] user: dan branch: trunk, size: 187413)
14:59
[c77955f9] part of check-in [6a549187] Fix some problems to do with WITH clauses and name resolution. (check-in: [6a549187] user: dan branch: common-table-expr, size: 187090)
11:48
[65c13f22] part of check-in [f68c6c4d] 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: [f68c6c4d] user: dan branch: common-table-expr, size: 187078)
2014-01-16
22:40
[fc7499ac] part of check-in [9efc120a] Add the ability for the authorizer callback to disallow recursive queries. (check-in: [9efc120a] user: drh branch: common-table-expr, size: 187107)
21:59
[d75733ab] part of check-in [090a77d9] Tweaks to error message text. (check-in: [090a77d9] user: drh branch: common-table-expr, size: 187009)
21:02
[1b058f7e] part of check-in [54eee9fe] Improve the error messages used to report illegal recursive cte references. (check-in: [54eee9fe] user: dan branch: common-table-expr, size: 187041)
18:34
[2d2da29f] part of check-in [a296b733] Allow only a single recursive reference in a recursive CTE. Also require that this reference is not part of a sub-query. (check-in: [a296b733] user: dan branch: common-table-expr, size: 187485)
10:58
[29976d16] part of check-in [6bfa387e] 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: [6bfa387e] user: dan branch: common-table-expr, size: 187130)
04:37
[c9af6591] part of check-in [7f953b56] Merge trunk changes. Fix a possible NULL-pointer deference in WITH clause name resolution. (check-in: [7f953b56] user: drh branch: common-table-expr, size: 186701)
2014-01-15
20:10
[ab437f25] part of check-in [c95823cd] Remove an ALWAYS() that is no longer always true. (check-in: [c95823cd] user: drh branch: common-table-expr, size: 186617)
19:42
[b55e726c] part of check-in [3908e2ea] Fixes so that SQLITE_OMIT_CTE builds work. (check-in: [3908e2ea] user: dan branch: common-table-expr, size: 186625)
18:35
[6bdb90db] part of check-in [c948384d] Further comments on WITH-clause processing routines in select.c. (check-in: [c948384d] user: drh branch: common-table-expr, size: 184869)
18:23
[240e9795] part of check-in [d9ae0f5d] Add a header comment to the searchWith() routine. (check-in: [d9ae0f5d] user: drh branch: common-table-expr, size: 184628)
18:12
[c6ba9c34] part of check-in [61be2da0] 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: [61be2da0] user: dan branch: common-table-expr, size: 184437)
15:27
[7d0d85f5] part of check-in [9a514b50] Return an error if a CTE specifies a different number of columns than its SELECT statement returns. (check-in: [9a514b50] user: dan branch: common-table-expr, size: 184354)
14:17
[51c74176] part of check-in [9472f6d8] Disable the flattening optimization if the sub-query is a recursive CTE. (check-in: [9472f6d8] user: dan branch: common-table-expr, size: 184092)
02:40
[3d93e3b4] part of check-in [a2933023] 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: [a2933023] user: drh branch: common-table-expr, size: 183962)
2014-01-14
20:14
[0f7779b0] part of check-in [a5c2a54a] Add code to handle recursive CTEs. (check-in: [a5c2a54a] user: dan branch: common-table-expr, size: 183972)
2014-01-13
20:32
[996d8b88] part of check-in [260587d2] For statements of just an unadorned VALUES clause, assign column names as "columnN" for increasing whole numbers N. (check-in: [260587d2] user: drh branch: trunk, size: 177507)
15:12
[9dc9177b] part of check-in [a26f399b] Add code to handle non-recursive CTEs in the same way as SQL views. (check-in: [a26f399b] user: dan branch: common-table-expr, size: 179331)
2013-12-20
13:11
[819bb090] part of check-in [2c7fd9b0] 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: [2c7fd9b0] user: drh branch: trunk, size: 177435)
2013-12-19
14:34
[9d138502] part of check-in [ffa092e1] Remove an unneeded column-cache flush in aggregate SELECT and an unreachable branch in the INSERT logic. (check-in: [ffa092e1] user: drh branch: trunk, size: 176948)
2013-12-18
16:27
[ecb020aa] part of check-in [97fdfc6b] 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: [97fdfc6b] user: drh branch: column-cache-debug, size: 176981)
15:11
[c1cd470c] part of check-in [4c6a659c] Show changes to the column cache when PRAGMA vdbe_addoptrace=ON is set. (check-in: [4c6a659c] user: drh branch: column-cache-debug, size: 177016)
2013-12-07
23:35
[44fa5a4a] part of check-in [bfefc575] Do not allow cursor hints to use expressions containing subqueries. This change fixes the problem seen in the previous check-in. (check-in: [bfefc575] user: drh branch: cursor-hints, size: 177034)
2013-11-21
16:08
[d41381d8] part of check-in [50d350ab] When one or more arguments to a function are constants, try to factor out just those arguments into initialization code. (check-in: [50d350ab] user: drh branch: trunk, size: 177020)
2013-11-15
18:15
[253cb683] part of check-in [d10fb49a] Changes to make the new constant expression factoring logic more general and more testable. (check-in: [d10fb49a] user: drh branch: expr-codegen-enhancement, size: 176958)
2013-11-12
15:33
[73174068] part of check-in [0f924c6e] A better (simpler) fix to the count(*) problem addressed in the previous check-in. (check-in: [0f924c6e] user: drh branch: trunk, size: 176913)
14:55
[98855336] part of check-in [91174779] Make sure the count(*) optimization works correctly on WITHOUT ROWID tables. (check-in: [91174779] user: drh branch: trunk, size: 176944)
2013-11-09
23:44
[a040df82] part of check-in [2c32bd6d] Fix memory type mismatch when compiled with MEMDEBUG. (check-in: [2c32bd6d] user: mistachkin branch: trunk, size: 176845)
2013-11-07
14:09
[60af46f5] part of check-in [55eea178] 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: [55eea178] user: drh branch: omit-rowid, size: 176841)
2013-11-06
19:59
[76477fe7] part of check-in [defd5205] 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: [defd5205] user: drh branch: omit-rowid, size: 176899)
2013-10-25
14:46
[8290456f] part of check-in [9eafafa3] Basic DELETE operations now working on WITHOUT ROWID tables. (check-in: [9eafafa3] user: drh branch: omit-rowid, size: 176287)
2013-10-23
13:30
[dbcd2271] part of check-in [b21d831b] Some inserts and queries working for multi-column primary keys and WITHOUT ROWID. (check-in: [b21d831b] user: drh branch: omit-rowid, size: 176328)
2013-10-08
20:01
[15127b54] part of check-in [3fd5e332] Use #ifdefs to omit unused code in the columnType() routine depending on compile-time options. (check-in: [3fd5e332] user: drh branch: row-size-est, size: 176210)
18:40
[9d111a1a] part of check-in [18bd6ba9] Further refinement of the idea of multiplying run-time cost estimates by the estimated row size. (check-in: [18bd6ba9] user: drh branch: row-size-est, size: 175291)
2013-10-07
16:53
[19611e6d] part of check-in [8e78557a] Try to remember statistics from ANALYZE using LogEst instead of u64. (check-in: [8e78557a] user: drh branch: log-stats, size: 175192)
2013-10-05
19:18
[13be7332] part of check-in [8b4aa0c7] 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: [8b4aa0c7] user: drh branch: row-size-est, size: 175200)
2013-10-04
20:39
[61310081] part of check-in [c6ac80ed] Merge trunk changes. (check-in: [c6ac80ed] user: drh branch: index-scan-rate, size: 175195)
18:29
[f64a972f] part of check-in [e5d9371d] Further refinements of the index scanning speed logic. (check-in: [e5d9371d] user: drh branch: index-scan-rate, size: 175115)
02:36
[340aa509] part of check-in [6c352edb] Progress toward using the iScanRatio information on indices. Many tests are still failing. (check-in: [6c352edb] user: drh branch: index-scan-rate, size: 175078)
00:00
[2d71af95] part of check-in [9f2f4c0a] Make sure the count(*) optimization works correctly even when partial indices are present. Ticket [a5c8ed66cae]. (check-in: [9f2f4c0a] user: drh branch: trunk, size: 175589)
2013-09-12
23:42
[fc60e8e5] part of check-in [695aee46] Refactor the ExprSetIrreducible() macro into ExprSetVVAProperty(*,EP_NoReduce). This is a naming change only. The logic is the same. (check-in: [695aee46] user: drh branch: unlikely-func, size: 175451)
16:50
[d96bcdbc] part of check-in [579a5125] Increase the number of bits available in Expr.flags. Other tweaks aimed at making expression processing more robust. (check-in: [579a5125] user: drh branch: expr-tuning, size: 175425)
2013-09-06
13:10
[92395862] part of check-in [97b10e66] Combine the FuncDef.iPrefEnc and FuncDef.flags fields into a single new FuncDef.funcFlags field. (check-in: [97b10e66] user: drh branch: trunk, size: 175431)
2013-08-05
22:05
[8b148eb8] part of check-in [c589b2fe] Performance optimization: Avoid calling convertCompoundSelecctToSubquery() on queries that do not use the UNION, EXCEPT, or INTERSECT operators. (check-in: [c589b2fe] user: drh branch: trunk, size: 175423)
19:11
[97273e41] part of check-in [7301bedd] 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: [7301bedd] user: drh branch: trunk, size: 175386)
2013-08-01
13:04
[20369c82] part of check-in [8e07aa2a] Fill out an initial implementation of the sqlite3ExprImpliesExpr() function. (check-in: [8e07aa2a] user: drh branch: partial-indices, size: 175579)
2013-06-21
00:35
[91b62654] part of check-in [2c2577e6] 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: [2c2577e6] user: drh branch: omit-join-table-opt, size: 175571)
2013-06-17
18:20
[d5a1b9bc] part of check-in [eaf1f1b4] Simplifications to the NGQP. Add the queryplantest makefile target. Add testcase() macros in the NGQP. (check-in: [eaf1f1b4] user: drh branch: nextgen-query-plan-exp, size: 175497)
2013-06-15
15:11
[94a755b3] part of check-in [3e8ac469] Fix compiler warnings. (check-in: [3e8ac469] user: drh branch: nextgen-query-plan-exp, size: 175451)
2013-06-11
02:32
[588ae13f] part of check-in [36373b85] Fixes to EXPLAIN QUERY PLAN output. Change weights back to something closer to what they are in legacy. More test case fixes. (check-in: [36373b85] user: drh branch: nextgen-query-plan-logcost, size: 175423)
2013-06-10
20:46
[ddcf0c79] part of check-in [69cf8772] Fix some minor issues with logarithmic cost in NGQP. (check-in: [69cf8772] user: drh branch: nextgen-query-plan-logcost, size: 175456)
2013-06-05
23:39
[5e8fe15b] part of check-in [1574653b] 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: [1574653b] user: drh branch: nextgen-query-plan-exp, size: 175520)
2013-05-28
12:11
[22ee9713] part of check-in [a0d5cc93] Many small harmless comment changes. Removal of obsolete comments and fixing misspelled words. No changes to code. (check-in: [a0d5cc93] user: drh branch: trunk, size: 175353)
2013-05-07
17:49
[a4641882] part of check-in [fc3630cd] 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: [fc3630cd] user: drh branch: tkt-6709574, size: 175353)
2013-04-25
00:57
[6bfbe11e] part of check-in [39b4e6ff] Make sure the affinity and datatype of sub-subqueries are initialized prior to subqueries as the latter relies on the former. (check-in: [39b4e6ff] user: drh branch: trunk, size: 173200)
2013-04-24
13:50
[8d097454] part of check-in [f136bd95] Fix a simple comment typo. No changes to code. (check-in: [f136bd95] user: drh branch: trunk, size: 173117)
2013-03-21
21:20
[01540bcd] part of check-in [6f6e2d50] Many spelling fixes in comments. No changes to code. (check-in: [6f6e2d50] user: mistachkin branch: trunk, size: 173116)
2013-02-16
02:41
[e1c6f6ab] part of check-in [cfba2c8d] Fix an unsafe VM register deallocation. (check-in: [cfba2c8d] user: drh branch: trunk, size: 173117)
2013-02-12
22:09
[7818b5c9] part of check-in [b7222a2b] 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: [b7222a2b] user: drh branch: trunk, size: 173228)
2013-01-29
23:55
[741c623c] part of check-in [497ee36c] 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: [497ee36c] user: drh branch: trunk, size: 173168)
2013-01-28
22:52
[51232abd] part of check-in [a6499c25] Fix an issue with the SQLITE_TESTCTRL_EXPLAIN_STMT and compound queries with multiple terms. (check-in: [a6499c25] user: drh branch: trunk, size: 173020)
19:00
[d1e0c173] part of check-in [c2462a95] 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: [c2462a95] user: drh branch: trunk, size: 172985)
2013-01-03
17:34
[395e458a] part of check-in [20730bad] Further corner-case fixes to the name resolution logic. (check-in: [20730bad] user: drh branch: name-resolution-fix, size: 172793)
16:54
[962a028b] part of check-in [afe96a11] Remove an incorrect assert() statement (ticket [beba9cae6345a]). Fix other minor problems in the name resolution logic. (check-in: [afe96a11] user: drh branch: name-resolution-fix, size: 172519)
00:45
[9a76144e] part of check-in [4cf5ed7e] Now supports result sets of the form "TABLE.*" with nested FROM clauses. (check-in: [4cf5ed7e] user: drh branch: name-resolution-fix, size: 172357)
2013-01-02
14:57
[bdede5fc] part of check-in [ef01e304] 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: [ef01e304] user: drh branch: name-resolution-fix, size: 171605)
2012-12-19
02:36
[3cce5b09] part of check-in [7344e791] Better resolution of table and column names in joins where some of the terms of the FROM clause are parenthesized. (check-in: [7344e791] user: drh branch: name-resolution-fix, size: 171488)
2012-12-18
19:36
[5eab6941] part of check-in [7fecced4] 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: [7fecced4] user: drh branch: trunk, size: 171280)
2012-12-13
16:37
[f6c73171] part of check-in [7280e14c] 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: [7280e14c] user: dan branch: minmax-opt, size: 171303)
2012-12-08
21:51
[e6daa524] part of check-in [8542e618] 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: [8542e618] user: drh branch: trunk, size: 170898)
03:34
[0dc18ed7] part of check-in [7b96115e] Veryquick passes all tests now. (check-in: [7b96115e] user: drh branch: ticket-71e333e7, size: 170271)
2012-12-07
23:10
[def53811] part of check-in [8e724b38] For an ORDER BY on a compound SELECT, take the collating sequence from the left-most term of the compound. (check-in: [8e724b38] user: drh branch: ticket-71e333e7, size: 170247)
22:54
[ebbbe13c] part of check-in [e313edca] Do not report missing collating functions while parsing the schema. Also remove a stray comment. (check-in: [e313edca] user: drh branch: ticket-71e333e7, size: 170095)
22:18
[28176222] part of check-in [0aaf52a3] 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: [0aaf52a3] user: drh branch: ticket-71e333e7, size: 170135)
19:28
[1462a391] part of check-in [2d5f37c9] Ensure the VerifyCookie sub-routine has been run before the database is accessed in an obscure case. Fix for ticket [d6b36be38]. (check-in: [2d5f37c9] user: dan branch: trunk, size: 170813)
14:02
[eb3ded8d] part of check-in [7fafab12] Veryquick now runs to completion without segfaulting or asserting. But there are still lots of errors. (check-in: [7fafab12] user: drh branch: ticket-71e333e7, size: 170091)
2012-12-06
21:16
[da1af4c2] part of check-in [fd011cb2] 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: [fd011cb2] user: drh branch: ticket-71e333e7, size: 170053)
20:19
[3d4543b9] part of check-in [0d7b5d45] Cherrypick [557c69055a3] and [0064bab7714] (OP_Once-related fixes for triggers). (check-in: [0d7b5d45] user: dan branch: branch-3.7.9, size: 165420)
2012-10-30
14:39
[3a8baf47] part of check-in [564631f3] Make it possible to disable the subquery-by-coroutine optimization using sqlite3_test_control(). Remove an always-false conditional. (check-in: [564631f3] user: drh branch: subquery-as-coroutine, size: 170186)
00:29
[d441b50c] part of check-in [7af3acbb] Add an optimization that attempts to run a subquery as a coroutine rather than manifesting it into a temporary table. (check-in: [7af3acbb] user: drh branch: subquery-as-coroutine, size: 170127)
2012-10-26
13:34
[b2c911d0] part of check-in [325364a9] Backport the shared-cache-fix branch. (check-in: [325364a9] user: drh branch: branch-3.7.14, size: 167065)
2012-10-15
16:24
[9b759521] part of check-in [5526e0aa] Dequote column names generated by the query flattener. (check-in: [5526e0aa] user: drh branch: trunk, size: 168446)
2012-10-05
18:35
[aa35f4ed] part of check-in [ac81ae49] Backport fixes to shared-cache mode, from the shared-cache-fix branch, to version 3.7.9 (check-in: [ac81ae49] user: drh branch: branch-3.7.9, size: 165427)
2012-10-04
19:33
[2a82736f] part of check-in [2b370dea] Shared-cache mode fixes for views and virtual tables. (check-in: [2b370dea] user: dan branch: shared-cache-fix, size: 168462)
2012-09-28
10:57
[80633ba7] part of check-in [6a5c59dd] Merge the latest trunk changes (PRAGMA busy_timeout and the ORDER BY query planner enhancements) into the apple-osx branch. (check-in: [6a5c59dd] user: drh branch: apple-osx, size: 168613)
2012-09-27
15:05
[75c5e37c] part of check-in [d2fcba1e] 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: [d2fcba1e] user: drh branch: qp-enhancements, size: 168489)
2012-09-26
23:17
[a91b6516] part of check-in [96496dda] 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: [96496dda] user: drh branch: qp-enhancements, size: 168467)
2012-09-24
15:30
[1fad66b7] part of check-in [22989f35] 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: [22989f35] user: drh branch: trunk, size: 168416)
2012-09-21
00:04
[c2a83ada] part of check-in [79e922f7] 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: [79e922f7] user: drh branch: trunk, size: 168301)
2012-09-20
15:41
[7c6d0287] part of check-in [cf40b7b5] Continuing incremental enhancements of SELECT code generation: Remove the Select.affinity field. Use SelectDest.affSdst instead. (check-in: [cf40b7b5] user: drh branch: trunk, size: 167406)
14:26
[7878dd56] part of check-in [0cda241a] 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: [0cda241a] user: drh branch: trunk, size: 167352)
2012-09-19
21:15
[63206bbf] part of check-in [94b48064] Tighter VDBE code for the WHERE_DISTINCT_ORDERED case of DISTINCT keyword handling. (check-in: [94b48064] user: drh branch: trunk, size: 167327)
2012-09-17
17:16
[1278b07a] part of check-in [45793f0b] 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: [45793f0b] user: drh branch: trunk, size: 167132)
2012-09-13
14:42
[171ec5fd] part of check-in [1cb9aedf] 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: [1cb9aedf] user: drh branch: trunk, size: 167092)
2012-08-31
14:10
[c5dbb135] part of check-in [bc9b9cd0] Merge in latest trunk changes. (check-in: [bc9b9cd0] user: dan branch: apple-osx, size: 167216)
2012-08-28
14:45
[f843c872] part of check-in [200a8135] 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: [200a8135] user: dan branch: trunk, size: 167092)
2012-08-25
10:01
[7c62350d] part of check-in [9b19b847] Fix all known instances of 'repeated the' style typos in comments. No changes to code. (check-in: [9b19b847] user: mistachkin branch: trunk, size: 166678)
01:38
[98102767] part of check-in [6723add4] Merge all the latest trunk changes into the apple-osx branch. (check-in: [6723add4] user: drh branch: apple-osx, size: 166806)
00:49
[6a7353de] part of check-in [865dfcba] 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: [865dfcba] user: drh branch: branch-3.7.2, size: 158455)
2012-08-24
18:44
[a9d68e04] part of check-in [a3e26038] Fix a problem to do with multi-or queries and automatic indexes. (check-in: [a3e26038] user: dan branch: multi-or-covering-index, size: 166682)
01:07
[2c0291db] part of check-in [d4cd6017] Merge the nested aggregate query enhancements into trunk. (check-in: [d4cd6017] user: drh branch: trunk, size: 166677)
2012-08-23
16:18
[cd051b46] part of check-in [3c3ffa90] Further improvements to the processing of nested aggregate queries. (check-in: [3c3ffa90] user: drh branch: nested-agg, size: 166670)
2012-07-24
19:46
[a365da6d] part of check-in [d8da26f1] Mark parameters to sorter interfaces as const where appropriate. (check-in: [d8da26f1] user: drh branch: trunk, size: 166654)
2012-07-23
21:43
[eecb852b] part of check-in [b589f1ef] Refactor field names in the SelectDest object to make them distinct and easier to grep for. (check-in: [b589f1ef] user: drh branch: trunk, size: 166655)
2012-07-18
16:07
[5c9f09de] part of check-in [defd828e] Remove another branch from the DbMalloc() paths. (check-in: [defd828e] user: dan branch: calloc, size: 166542)
2012-05-22
13:11
[7bc4a2e6] part of check-in [972e75bb] Version 3.7.12.1 (check-in: [972e75bb] user: drh branch: apple-osx, size: 166655)
2012-05-21
20:13
[f6c4833c] part of check-in [f3dd1faf] Candidate fix for the nested aggregate query problem of ticket [c2ad16f997ee9c8e]. (check-in: [f3dd1faf] user: drh branch: nested-agg, size: 166531)
19:11
[c5c2d1b6] part of check-in [72226096] 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: [72226096] user: drh branch: nested-agg, size: 166460)
2012-04-19
20:43
[cf2f8f77] part of check-in [b72f07b4] Update the apple-osx branch so that it includes all of the latest trunk changes. (check-in: [b72f07b4] user: drh branch: apple-osx, size: 166547)
2012-04-11
23:22
[d7b9018b] part of check-in [a134e6e7] Add a testcase() macro to ensure that the sqlite3AuthCheck() call inside the query flattener really is effective. (check-in: [a134e6e7] user: drh branch: trunk, size: 166423)
2012-03-31
15:08
[5e0e481c] part of check-in [e7cb6b73] Modify selectColumnsFromExprList() to avoid ever incorrectly returning SQLITE_NOMEM. (check-in: [e7cb6b73] user: dan branch: trunk, size: 166379)
02:46
[36d5ed5c] part of check-in [18ec60ca] Merge all the latest trunk changes into the apple-osx branch. (check-in: [18ec60ca] user: drh branch: apple-osx, size: 166450)
2012-03-28
01:34
[f6f141cb] part of check-in [b899dbeb] 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: [b899dbeb] user: drh branch: faster-typeof-and-length, size: 166326)
2012-03-05
16:39
[2d18d2e1] part of check-in [504bf490] Pull in all the latest trunk changes. (check-in: [504bf490] user: drh branch: apple-osx, size: 166447)
2012-02-23
17:35
[44ccdcb5] part of check-in [c8c7846f] Fix an obscure bug that causes a crash when parsing certain invalid SQL statements. (check-in: [c8c7846f] user: drh branch: trunk, size: 166323)
2012-02-10
18:18
[6b40963d] part of check-in [e2485986] Pull the latest trunk changes into the apple-osx branch. (check-in: [e2485986] user: drh branch: apple-osx, size: 166434)
2012-02-02
17:35
[232283a2] part of check-in [adb29232] 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: [adb29232] user: drh branch: output-minmax-row, size: 166310)
03:11
[b6eec9d1] part of check-in [a3553b8a] 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: [a3553b8a] user: drh branch: trunk, size: 166050)
2012-01-28
15:22
[1ad26769] part of check-in [eb3b6a0c] Add support for multiple rows of VALUES in an INSERT statement. (check-in: [eb3b6a0c] user: drh branch: trunk, size: 166035)
2012-01-18
01:09
[2d45c1b7] part of check-in [199edb68] Fix typo in comment. (check-in: [199edb68] user: mistachkin branch: trunk, size: 165836)
2012-01-03
21:54
[3f4cdc3c] part of check-in [8a048423] Pull all the latest trunk changes over into the apple-osx branch. (check-in: [8a048423] user: drh branch: apple-osx, size: 165970)
2011-12-11
21:51
[a1d075db] part of check-in [dab4c137] Update comments describing the flattening optimization in select.c. (check-in: [dab4c137] user: drh branch: trunk, size: 165846)
2011-12-10
23:18
[f38d6bb5] part of check-in [5061d85f] Minor cleanups of the compound-subquery flattening logic. New test cases added for joins the compound subquery. (check-in: [5061d85f] user: drh branch: trunk, size: 165476)
17:17
[8c53ca04] part of check-in [3d4b4f4f] Allow UNION ALL compounds to be promoted up to replace a simple wrapper SELECT even if the compounds are joins. (check-in: [3d4b4f4f] user: drh branch: trunk, size: 165382)
15:55
[4d64e3cc] part of check-in [bcbc7152] 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: [bcbc7152] user: drh branch: trunk, size: 165383)
14:44
[97275df6] part of check-in [1a360da0] Merge the latest trunk changes into tree-explain branch. (check-in: [1a360da0] user: drh branch: tree-explain, size: 165369)
2011-12-09
17:27
[fd3046fb] part of check-in [6a9fb47d] 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: [6a9fb47d] user: drh branch: uninit-vdbe-mem, size: 165486)
16:21
[d1895ff5] part of check-in [521d72bd] Make no assumptions about the initial state of VDBE registers. (check-in: [521d72bd] user: drh branch: uninit-vdbe-mem, size: 165447)
13:24
[e16b1884] part of check-in [557c6905] Modify the OP_Once opcode so that it works correctly in trigger sub-programs. This is a candidate fix for [7bbfb7d442]. (check-in: [557c6905] user: dan branch: trunk, size: 165414)
2011-12-08
21:08
[2849781d] part of check-in [59e0d4f3] Merge the latest trunk changes into the apple-osx branch. (check-in: [59e0d4f3] user: drh branch: apple-osx, size: 165617)
2011-12-07
22:49
[912bea60] part of check-in [7b457ea4] Additional detail added to the tree-explain output for SELECT statements. (check-in: [7b457ea4] user: drh branch: tree-explain, size: 165376)
15:33
[984ff4d2] part of check-in [0eb3f8b1] More compact notation for the parse-tree view. (check-in: [0eb3f8b1] user: drh branch: tree-explain, size: 165070)
01:23
[352ac58d] part of check-in [0aa7d3d2] Improvements to the data-structure explain subsystem. Most queries now give a reasonably detailed graph of their parse tree. (check-in: [0aa7d3d2] user: drh branch: tree-explain, size: 165097)
2011-12-06
19:44
[2923f312] part of check-in [79ae51c5] Begin adding the data-structure explaining subsystem. All is contained within (check-in: [79ae51c5] user: drh branch: tree-explain, size: 164475)
13:24
[538b5f09] part of check-in [092d5331] 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: [092d5331] user: drh branch: trunk, size: 165493)
2011-10-25
20:36
[a9828845] part of check-in [14bc58ca] Cherrypick changes [53f5cfe115] and [1f7ef0af8d] in order to fix an issue with DISTINCT (check-in: [14bc58ca] user: drh branch: branch-3.7.2, size: 158450)
2011-10-21
17:18
[8d0e3060] part of check-in [be62ef05] Merge the latest trunk changes into the apple-osx branch. (check-in: [be62ef05] user: drh branch: apple-osx, size: 165578)
2011-10-14
21:49
[80f3ac44] part of check-in [60fee957] 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: [60fee957] user: drh branch: trunk, size: 165454)
2011-10-11
20:14
[94b37530] part of check-in [b21b1c7b] Add a couple of asserts trying to make the operation of sqlite3SelectNew() clearer. (check-in: [b21b1c7b] user: drh branch: trunk, size: 165406)
2011-09-16
19:36
[f3971442] part of check-in [070bf203] Merge the latest trunk fixes into the apple-osx branch. (check-in: [070bf203] user: drh branch: apple-osx, size: 165470)
19:04
[d9b7d20b] part of check-in [cf51ef8a] Remove unreachable branches from the previous change. Add additional test cases. (check-in: [cf51ef8a] user: drh branch: trunk, size: 165346)
16:00
[2769d297] part of check-in [ff8b76b2] Further streamlining of the subquery materializer. New test cases for ticket [002caede898a] (check-in: [ff8b76b2] user: drh branch: trunk, size: 165290)
01:34
[c7ea7cd4] part of check-in [7f00552b] 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: [7f00552b] user: drh branch: tkt-002caede898, size: 165159)
2011-09-15
23:58
[d85d83c3] part of check-in [4b8357ee] Materialize subqueries using a subroutine and invoke that subroutine prior to each use of the materialization. Fix for ticket [002caede898aee4] (check-in: [4b8357ee] user: drh branch: tkt-002caede898, size: 165201)
2011-09-14
19:05
[97b75b40] part of check-in [2456b4d0] Merge in the latest changes from trunk. (check-in: [2456b4d0] user: drh branch: apple-osx, size: 164227)
2011-09-04
01:11
[bf7b7ea6] part of check-in [b5179baf] Improve the testability of the merge-sort logic. (check-in: [b5179baf] user: drh branch: trunk, size: 164103)
2011-09-02
10:31
[32d0f4e5] part of check-in [7769fb98] Instead of a temporary b-tree, use a linked-list and merge-sort to sort records in main memory in vdbesort.c. (check-in: [7769fb98] user: dan branch: merge-sort, size: 164114)
2011-09-01
16:01
[037ee550] part of check-in [ebf819aa] Use OP_SorterOpen instead of OP_OpenEphemeral to implement GROUP BY. (check-in: [ebf819aa] user: drh branch: merge-sort, size: 164088)
15:32
[20bef686] part of check-in [bab2e560] Experimental code-generator changes to utilize new opcodes for sorting. (check-in: [bab2e560] user: drh branch: merge-sort, size: 163630)
2011-08-29
18:24
[14552e9f] part of check-in [ad78ef2b] Fix a broken assert() statement in select.c. (check-in: [ad78ef2b] user: dan branch: trunk, size: 162785)
2011-08-02
18:25
[015f2371] part of check-in [77376b33] Merge all the latest trunk changes into the apple-osx branch. (check-in: [77376b33] user: drh branch: apple-osx, size: 162908)
2011-07-09
16:17
[d219c4b6] part of check-in [90b1aea1] Fix harmless compiler warnings on unix. (check-in: [90b1aea1] user: drh branch: trunk, size: 162784)
2011-07-02
13:34
[27ceaf3a] part of check-in [c593792c] Cherrypick [45e581bff7] into the 3.7.2 branch. (check-in: [c593792c] user: dan branch: branch-3.7.2, size: 158450)
2011-07-01
14:21
[e9d74f94] part of check-in [7337293c] Improvements and tests for detection of redundant DISTINCT qualifiers. (check-in: [7337293c] user: dan branch: experimental, size: 162727)
2011-06-30
20:17
[cf259606] part of check-in [f7ba0219] Experimental changes to improve optimization of DISTINCT queries. (check-in: [f7ba0219] user: dan branch: experimental, size: 162105)
2011-06-24
20:47
[75b7dd8c] part of check-in [34f0efa2] Merging local changes to apple-osx (check-in: [34f0efa2] user: adam branch: apple-osx, size: 160665)
2011-05-01
22:57
[567d1aa0] part of check-in [7155e6f3] 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: [7155e6f3] user: drh branch: branch-3.7.2, size: 156269)
2011-04-15
15:18
[a84089eb] part of check-in [8d924e16] 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: [8d924e16] user: drh branch: branch-3.7.2, size: 156179)
14:46
[d9d44080] part of check-in [a8761a91] Do not do full table scans of unordered indices. (check-in: [a8761a91] user: drh branch: trunk, size: 160541)
2011-04-06
17:54
[649a6f10] part of check-in [2039ed95] Changes to support building with various SQLITE_OMIT_XXX options defined. (check-in: [2039ed95] user: dan branch: trunk, size: 160436)
2011-02-21
17:49
[d24406c4] part of check-in [9f9f3288] Fix a problem with "EXPLAIN QUERY PLAN SELECT count(*) FROM tbl". (check-in: [9f9f3288] user: dan branch: trunk, size: 160285)
2011-02-12
05:34
[7a673c43] part of check-in [9d2b0af2] 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: [9d2b0af2] user: drh branch: branch-3.7.2, size: 155250)
2011-02-11
20:52
[ae2f38ef] part of check-in [55973999] Skip flattening if subquery has LIMIT and outer query is DISTINCT. Fix for ticket [752e1646fc]. (check-in: [55973999] user: shaneh branch: trunk, size: 159461)
2010-12-01
19:00
[8a7ba246] part of check-in [7df43f48] 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: [7df43f48] user: dan branch: trunk, size: 159236)
2010-11-16
02:49
[550d6768] part of check-in [56bbc539] Use the estimated number of rows computed for subqueries in the cost computations for outer queries. (check-in: [56bbc539] user: drh branch: trunk, size: 159232)
2010-11-11
17:48
[a88ad1cb] part of check-in [28643b85] Use "COMPOUND" instead of "COMPOSITE" in the EXPLAIN QUERY PLAN output to describe UNION, UNION ALL, EXCEPT and INTERSECT operations. (check-in: [28643b85] user: dan branch: experimental, size: 158359)
16:46
[de0cf488] part of check-in [00fb8468] Add a row of EXPLAIN QUERY PLAN output for each composite select operation (UNION, EXCEPT etc.) in the query. (check-in: [00fb8468] user: dan branch: experimental, size: 158360)
2010-11-09
17:35
[3d5086df] part of check-in [925f35c5] Add missing comments and fix other issues with routines used by new EQP features. (check-in: [925f35c5] user: dan branch: experimental, size: 156065)
14:49
[7c92d9d0] part of check-in [73c93f5a] Further enhancements and fixes for explain query plan. (check-in: [73c93f5a] user: dan branch: experimental, size: 155384)
2010-11-08
19:01
[c32d6da9] part of check-in [f4747eb8] Experimental changes to EXPLAIN QUERY PLAN. (check-in: [f4747eb8] user: dan branch: experimental, size: 155225)
2010-10-21
22:58
[a03ec6a3] part of check-in [d30f7b2d] Make sure the estimated row count for ephemeral tables is initialized so that automatic indices can be used on those tables. (check-in: [d30f7b2d] user: drh branch: trunk, size: 154351)
2010-10-06
18:55
[6a5c72fb] part of check-in [b0450120] Fix long-standing bugs with the handling of LIMIT clausing in compound SELECT statements with FROM clause subqueries. Ticket [38cb5df375078d3f9]. (check-in: [b0450120] user: drh branch: trunk, size: 154293)
2010-09-28
03:55
[cf3013b1] part of check-in [a5eefd52] Use OP_Copy rather than OP_SCopy at one point in aggregate processing where it is needed to avoid shallow-copy misuse. (check-in: [a5eefd52] user: drh branch: bug-b351d95f9c, size: 154469)
2010-09-07
12:17
[b0b12478] part of check-in [657472bc] Remove a redundant test for multiple output columns in a scalar subquery. (check-in: [657472bc] user: drh branch: trunk, size: 154469)
2010-09-02
19:01
[eb57331a] part of check-in [a55842cf] 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: [a55842cf] user: dan branch: trunk, size: 154409)
2010-08-30
22:15
[fb700811] part of check-in [4fead8e7] 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: [4fead8e7] user: drh branch: trunk, size: 154409)
2010-08-13
16:38
[8add6cab] part of check-in [497aafd8] Do not apply the flattening optimization if the sub-query is DISTINCT. Fix for [e4b8a2ba6e]. (check-in: [497aafd8] user: dan branch: trunk, size: 154319)
2010-08-09
14:26
[4b8f4814] part of check-in [88bf9016] Fix two comment typos that were reported on the mailing list. (check-in: [88bf9016] user: drh branch: trunk, size: 154197)
2010-07-25
02:12
[b0fec59c] part of check-in [da2f62c5] Further examples of using automatic deallocation to replace "delete" methods. (check-in: [da2f62c5] user: drh branch: malloc-enhancement, size: 154320)
2010-07-23
17:06
[74fef133] part of check-in [5c58f44a] Remove additional traces (mostly in comments) of the Table.dbMem field. (check-in: [5c58f44a] user: drh branch: trunk, size: 154199)
15:41
[3437b62b] part of check-in [6eddc6e6] Remove the Table.dbMem variable, as it is no longer being used for its original purpose. (check-in: [6eddc6e6] user: dan branch: trunk, size: 154251)
2010-06-28
10:15
[4903ff1b] part of check-in [4932f228] 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: [4932f228] user: dan branch: trunk, size: 154319)
2010-04-26
19:17
[c03d8a05] part of check-in [ca9d86ba] 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: [ca9d86ba] user: drh branch: trunk, size: 154288)
2010-04-15
23:24
[b7c9a40b] part of check-in [f96782b3] Disable query flattening when the outer query is a compound SELECT and the inner query has a LIMIT clause. Ticket [02a8e81d44]. (check-in: [f96782b3] user: drh branch: trunk, size: 153755)
2010-03-31
15:02
[5a08245c] part of check-in [ffc23409] Clear the column cache before populating aggregate accumulator registers. Fix fo r [883034dcb5]. (check-in: [ffc23409] user: dan branch: trunk, size: 153769)
2010-02-25
14:44
[c5d15b97] part of check-in [a2550597] Add some technically unnecessary variable initializations to silence compiler warnings. (check-in: [a2550597] user: dan branch: branch-3.6.1, size: 147519)
2010-02-24
15:10
[4113ef36] part of check-in [ff61e0fd] Fix an assertion fault that occurs when two different virtual tables are used in a single UPDATE statement. Ticket [d2f02d37f52b]. (check-in: [ff61e0fd] user: drh branch: trunk, size: 153207)
2009-12-30
14:12
[0109b993] part of check-in [cc6b959b] Adjustments to column cache handling in order to restore 100% branch test coverage. (check-in: [cc6b959b] user: drh branch: trunk, size: 153181)
2009-12-24
16:00
[71511cde] part of check-in [ea4e57e1] 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: [ea4e57e1] user: drh branch: trunk, size: 153181)
2009-12-22
23:52
[7e424c8f] part of check-in [4a97c623] 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: [4a97c623] user: drh branch: trunk, size: 153184)
00:29
[9b5ad0e1] part of check-in [1d8550e5] Add a pragma to disable the query flattener - for use during testing. (check-in: [1d8550e5] user: drh branch: trunk, size: 153488)
2009-12-09
17:36
[68c58dc4] part of check-in [b558e96f] 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: [b558e96f] user: drh branch: trunk, size: 153132)
2009-11-20
16:13
[2f9ed748] part of check-in [c6ed7e2a] 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: [c6ed7e2a] user: drh branch: trunk, size: 151530)
2009-11-12
20:39
[a727f61f] part of check-in [6705ab1a] Shift more OP_Found opcodes over to using the unpacked format, for improved performance. (check-in: [6705ab1a] user: drh branch: trunk, size: 151547)
19:59
[55051bfa] part of check-in [b9eab885] 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: [b9eab885] user: drh branch: trunk, size: 151545)
03:13
[696f245c] part of check-in [39d5b292] Adjustments to the implementation of LIMIT so that it uses fewer opcodes. (check-in: [39d5b292] user: drh branch: trunk, size: 151533)
2009-11-10
01:30
[ecd7fb2f] part of check-in [f6c045f6] Remove the obsolete "$Id:$" RCS identifier strings from the source code. (check-in: [f6c045f6] user: drh branch: trunk, size: 151369)
2009-10-19
15:52
[cbe366a0] part of check-in [6fe63711] 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: [6fe63711] user: dan branch: trunk, size: 151427)
2009-09-10
10:15
[1d0a1313] part of check-in [f2a9ee72] Remove an ALWAYS macro around an expression that is sometimes false. (check-in: [f2a9ee72] user: dan branch: trunk, size: 151694)
2009-09-08
01:14
[a7a07545] part of check-in [52449a95] Code simplifications, especially to the pseudo-table logic, and comment improvements. (check-in: [52449a95] user: drh branch: trunk, size: 151171)
2009-09-07
18:14
[95809555] part of check-in [d7dc8b43] Add the SQLITE_LIMIT_TRIGGER_DEPTH option to sqlite3_limit(). (check-in: [d7dc8b43] user: drh branch: trunk, size: 151191)
2009-09-01
12:16
[8bc7347f] part of check-in [38a9327b] More fixes and comment updates. (check-in: [38a9327b] user: dan branch: trunk, size: 151353)
2009-08-28
18:53
[56ecb073] part of check-in [9b9c1921] Changes to support recursive triggers. (check-in: [9b9c1921] user: dan branch: trunk, size: 151351)
2009-08-01
15:09
[67b0778c] part of check-in [359d78e1] Fix a segfault following OOM that was introduced by check-in (6949) which was a fix for ticket #3997. (CVS 6954) (check-in: [359d78e1] user: drh branch: trunk, size: 151292)
2009-07-28
13:30
[90bc99bf] part of check-in [b2784cf5] 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: [b2784cf5] user: danielk1977 branch: trunk, size: 151285)
2009-06-12
03:27
[71748b8e] part of check-in [bd341a10] Make sure nested queries with USING clauses do not leak memory. Preliminary fix for ticket #3911. (CVS 6750) (check-in: [bd341a10] user: drh branch: trunk, size: 151214)
2009-06-01
16:53
[2d97084a] part of check-in [07915885] Fix compiler warnings with MSVC build. (CVS 6699) (check-in: [07915885] user: shane branch: trunk, size: 151160)
2009-05-31
21:21
[66de3fa8] part of check-in [ee9a144d] Code simplifications to facilitate coverage testing following the recent changes to the Expr object. (CVS 6697) (check-in: [ee9a144d] user: drh branch: trunk, size: 151148)
2009-05-30
20:49
[a3d8a018] part of check-in [f760bb7a] Simplifications to the expr.c source module resulting from structural testing. (CVS 6694) (check-in: [f760bb7a] user: drh branch: trunk, size: 151140)
2009-05-28
01:00
[fd1737a6] part of check-in [4ac2bdfb] 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: [4ac2bdfb] user: drh branch: trunk, size: 151202)
2009-05-27
10:31
[18c296d4] part of check-in [7cb1c3ba] 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: [7cb1c3ba] user: drh branch: trunk, size: 150737)
2009-05-19
19:04
[88e654ab] part of check-in [f678ed34] Changes to select.c to facilitate full coverage testing. (CVS 6658) (check-in: [f678ed34] user: drh branch: trunk, size: 151794)
2009-05-18
15:46
[e5813bd0] part of check-in [e225f365] Changes to select.c in support of full coverage testing. (CVS 6647) (check-in: [e225f365] user: drh branch: trunk, size: 152074)
2009-05-17
15:29
[b51d7f64] part of check-in [0d974613] Remove debugging code accidently left in check-in (6642). Ticket #3862. (CVS 6645) (check-in: [0d974613] user: drh branch: trunk, size: 151933)
15:26
[1f95ac86] part of check-in [dd665eac] 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: [dd665eac] user: drh branch: trunk, size: 151960)
02:06
[3adc1da3] part of check-in [e3ccbc69] Tweaks and simplifications to select.c to facility full coverage testing. (CVS 6642) (check-in: [e3ccbc69] user: drh branch: trunk, size: 151960)
2009-05-11
20:53
[2877098f] part of check-in [33cf8359] 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: [33cf8359] user: drh branch: trunk, size: 150852)
2009-05-03
20:23
[9587023e] part of check-in [a6122990] Changes to facility full coverage testing of util.c. (CVS 6597) (check-in: [a6122990] user: drh branch: trunk, size: 150790)
2009-05-01
21:13
[84022ec5] part of check-in [12bcb03d] 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: [12bcb03d] user: drh branch: trunk, size: 150817)
2009-04-24
15:46
[40748e80] part of check-in [98606bee] 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: [98606bee] user: drh branch: trunk, size: 151771)
2009-04-23
13:22
[b3d9b7a5] part of check-in [dd4d67a6] Rework the column-cache mechanism to be more robust (and more correct). The column-alias cache is currently disabled, (CVS 6538) (check-in: [dd4d67a6] user: drh branch: trunk, size: 151780)
2009-04-16
00:24
[35225756] part of check-in [414f3408] 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: [414f3408] user: drh branch: trunk, size: 151461)
2009-04-02
16:59
[462d9671] part of check-in [23f90d50] 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: [23f90d50] user: drh branch: trunk, size: 151434)
2009-03-31
03:41
[bd494b68] part of check-in [76851417] Fix compiler warnings from gcc and MSVC; Correct typo in select.c; (CVS 6417) (check-in: [76851417] user: shane branch: trunk, size: 151006)
2009-03-24
15:08
[607e5b2d] part of check-in [ea74d8dc] Changes to insure that lookaside memory allocations are never used to hold schema content. Ticket #3743. (CVS 6377) (check-in: [ea74d8dc] user: drh branch: trunk, size: 151005)
2009-02-25
08:56
[4d0b77fd] part of check-in [a3695b98] Minor changes and coverge tests for "SELECT count(*)" optimization. (CVS 6324) (check-in: [a3695b98] user: danielk1977 branch: trunk, size: 150949)
2009-02-24
18:33
[757eb43f] part of check-in [3f0baa1b] Fixes and some extra test cases for count(*) optimization. (CVS 6320) (check-in: [3f0baa1b] user: danielk1977 branch: trunk, size: 150930)
10:01
[474557a5] part of check-in [d4aa6593] Optimize queries of the form "SELECT count(*) FROM <tbl>" by adding a sqlite3BtreeCount() interface to the btree layer. (CVS 6316) (check-in: [d4aa6593] user: danielk1977 branch: trunk, size: 150951)
2009-02-20
10:58
[aa7328a2] part of check-in [e43ed649] Instead of using SetNumColumns, specify the number of columns in a table or index using the P4 argument. (CVS 6310) (check-in: [e43ed649] user: danielk1977 branch: trunk, size: 147188)
2009-02-19
14:39
[fc21f384] part of check-in [d9f6ffbc] 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: [d9f6ffbc] user: danielk1977 branch: trunk, size: 147235)
2009-02-09
13:19
[164934bd] part of check-in [e20bf384] Better error message when DISTINCT is used on an aggregate function that takes two or more arguments. Ticket #3641. (CVS 6269) (check-in: [e20bf384] user: drh branch: trunk, size: 146575)
2009-01-09
02:49
[ae72b604] part of check-in [6e171c0a] More coverage improvements. (CVS 6148) (check-in: [6e171c0a] user: drh branch: trunk, size: 146580)
01:12
[af86044e] part of check-in [45bb5703] Increased test coverage. (CVS 6147) (check-in: [45bb5703] user: drh branch: trunk, size: 146711)
2009-01-05
19:36
[75d6404c] part of check-in [e02323b3] 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: [e02323b3] user: drh branch: trunk, size: 146311)
2008-12-23
23:56
[6c2a5675] part of check-in [55d4f493] Continuing improvements to the multi-index OR-clause optimizer. Added a few simple test cases. (CVS 6062) (check-in: [55d4f493] user: drh branch: trunk, size: 146245)
2008-12-10
22:15
[a4316c5e] part of check-in [258722b6] Fix an issue with the new sqlite3Strlen30() introduced by check-in (6007). Additional casts for compiler warnings. (CVS 6011) (check-in: [258722b6] user: drh branch: trunk, size: 146236)
19:26
[49296e1a] part of check-in [c872d554] 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: [c872d554] user: drh branch: trunk, size: 146237)
18:03
[ea915ff2] part of check-in [14e6d19c] More explicit type casting to silence VC++. (CVS 6006) (check-in: [14e6d19c] user: drh branch: trunk, size: 146168)
17:20
[e5b3b244] part of check-in [e7e9fa4f] Remove or rename local variables that shadow other variables or parameters. (CVS 6005) (check-in: [e7e9fa4f] user: drh branch: trunk, size: 146232)
2008-12-06
16:10
[1d3616e4] part of check-in [76246d9f] 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: [76246d9f] user: drh branch: trunk, size: 145611)
2008-12-05
00:00
[e2127ce8] part of check-in [06d206ef] Expand table.* properly on a USING or a NATURAL join. Ticket #3522. (CVS 5979) (check-in: [06d206ef] user: drh branch: trunk, size: 145591)
2008-11-21
16:22
[b296a7b5] part of check-in [88a09dbb] 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: [88a09dbb] user: danielk1977 branch: trunk, size: 145586)
09:43
[72318e82] part of check-in [4c765758] Fix an assert() failure that can occur after an OOM error. (CVS 5939) (check-in: [4c765758] user: danielk1977 branch: trunk, size: 145526)
2008-11-19
09:05
[e01537d4] part of check-in [88134322] Changes to avoid "unused parameter" compiler warnings. (CVS 5921) (check-in: [88134322] user: danielk1977 branch: trunk, size: 145506)
2008-11-17
19:18
[18c6d96f] part of check-in [8009220c] Modifications to avoid unsigned/signed comparisons in various files. (CVS 5914) (check-in: [8009220c] user: danielk1977 branch: trunk, size: 145486)
2008-11-12
12:27
[b03c6fe4] part of check-in [e89f9c80] Fix a faulty assert in select.c. Ticket #3494. (CVS 5892) (check-in: [e89f9c80] user: drh branch: trunk, size: 145512)
2008-11-11
18:28
[058d5c22] part of check-in [ea5f4baa] Cleanup in flattenSubquery. Add OOM tests for flattenSubquery. Fix issues with OOM errors causes problems for flattenSubquery. Ticket #3485. (CVS 5882) (check-in: [ea5f4baa] user: drh branch: trunk, size: 145506)
2008-10-31
10:53
[0d79c6c0] part of check-in [bfce9142] Change the way sqlite3VdbeSetColName() is called so as to remove a few lines of code. This also fixes #3470. (CVS 5853) (check-in: [bfce9142] user: danielk1977 branch: trunk, size: 143676)
2008-10-30
22:13
[59ffe26f] part of check-in [cd1662e9] Fix a faulty assert() in the merge implementation of the UNION operator. Ticket #3467. (CVS 5852) (check-in: [cd1662e9] user: drh branch: trunk, size: 143541)
2008-10-07
19:53
[d910d735] part of check-in [79df72ee] 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: [79df72ee] user: drh branch: trunk, size: 143521)
01:18
[c1c555ee] part of check-in [486b1124] Removed redundant assert(). (CVS 5773) (check-in: [486b1124] user: shane branch: trunk, size: 143514)
2008-10-06
16:18
[34f32ee0] part of check-in [83a7e446] Allow INDEXED BY and NOT INDEXED to be used in UPDATE and DELETE statements. (CVS 5772) (check-in: [83a7e446] user: danielk1977 branch: trunk, size: 143557)
05:32
[75d4ffe9] part of check-in [98ca5580] Allow INDEXED BY and NOT INDEXED clauses in SELECT statements. (CVS 5766) (check-in: [98ca5580] user: danielk1977 branch: trunk, size: 143041)
2008-09-23
09:36
[f118f8db] part of check-in [01d26b3d] Fix for ticket #3382 was mistakenly removed by (5712). Add an assert to prevent it from being removed again. (CVS 5733) (check-in: [01d26b3d] user: drh branch: trunk, size: 142611)
2008-09-17
00:13
[4d25fe8d] part of check-in [f8b759f1] Fix for tickets #3378 and #3381 that preserves the aliasing optimization. And yet, this fix feels uncomfortable. Seeking an alternative... (CVS 5712) (check-in: [f8b759f1] user: drh branch: trunk, size: 142539)
2008-09-16
15:55
[9cf9aac5] part of check-in [bd58be6e] 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: [bd58be6e] user: danielk1977 branch: trunk, size: 142178)
2008-09-13
01:20
[b4bc2536] part of check-in [ced6bbd2] Fix issues with bizarrely quoted column names. Tickets #3370, #3371, and #3372. (CVS 5696) (check-in: [ced6bbd2] user: drh branch: trunk, size: 142170)
2008-09-01
15:52
[eec7c5f2] part of check-in [d04d7033] 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: [d04d7033] user: drh branch: trunk, size: 142105)
2008-08-26
12:56
[81879273] part of check-in [4995a1d1] Do not flatten subqueries where the subquery has a LIMIT and the outer query has a WHERE clause. Ticket #3334. (CVS 5613) (check-in: [4995a1d1] user: drh branch: trunk, size: 141386)
2008-08-25
17:23
[1042eafb] part of check-in [4ad096bd] 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: [4ad096bd] user: drh branch: trunk, size: 141202)
2008-08-22
16:29
[3db954cc] part of check-in [cc36b4e0] Enhanced test coverage. (CVS 5598) (check-in: [cc36b4e0] user: drh branch: trunk, size: 141149)
2008-08-21
14:54
[e7146239] part of check-in [8593218c] Make sure "rowid" columns in views are named correctly. Ticket #3308. (CVS 5580) (check-in: [8593218c] user: drh branch: trunk, size: 141305)
14:15
[eed74c3d] part of check-in [68557115] 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: [68557115] user: drh branch: trunk, size: 141249)
2008-08-20
16:35
[0a0ed2d1] part of check-in [daf730d1] Refactor the name resolution procedures in the code generator. (CVS 5569) (check-in: [daf730d1] user: drh branch: trunk, size: 141545)
2008-08-14
00:19
[defdb8cd] part of check-in [8947c72f] Do not flatten the right term of a LEFT join. Ticket #3300. (CVS 5565) (check-in: [8947c72f] user: drh branch: trunk, size: 147726)
2008-08-08
18:06
[390d1bdd] part of check-in [02232e71] Move a variable initialization earlier to work around MS compiler complaints. (CVS 5549) (check-in: [02232e71] user: drh branch: trunk, size: 147511)
2008-08-04
03:51
[c1899b14] part of check-in [9ca975c8] Fix (make test) with SQLITE_OMIT_COMPOUND_SELECT. Ticket #3235. (CVS 5530) (check-in: [9ca975c8] user: danielk1977 branch: trunk, size: 147519)
2008-08-02
03:50
[23106fd9] part of check-in [f1e44eb3] Additional coverage testing. Fix a segfault following OOM in sqltie3_load_extension(). (CVS 5523) (check-in: [f1e44eb3] user: drh branch: trunk, size: 147468)
2008-08-01
18:47
[95fb2878] part of check-in [b65f493c] Fix problems in test scripts. Add new test cases to improve test coverage. (CVS 5521) (check-in: [b65f493c] user: drh branch: trunk, size: 147219)
2008-07-28
19:34
[ef18af56] part of check-in [e48f9697] 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: [e48f9697] user: drh branch: trunk, size: 147271)
2008-07-24
15:50
[a152b143] part of check-in [74553109] 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: [74553109] user: drh branch: trunk, size: 147858)
2008-07-22
05:00
[859ea519] part of check-in [1ffe7a99] flattenSubquery() needed if either SQLITE_OMIT_SUBQUERY or SQLITE_OMIT_VIEW not defined. (CVS 5445) (check-in: [1ffe7a99] user: shane branch: trunk, size: 147836)
2008-07-15
20:56
[f3a9d9f4] part of check-in [61f6e197] 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: [61f6e197] user: drh branch: trunk, size: 147676)
00:27
[972bdef5] part of check-in [7cf91e08] Increased test coverage. (CVS 5414) (check-in: [7cf91e08] user: drh branch: trunk, size: 147393)
2008-07-11
21:02
[b909e213] part of check-in [c80a5d09] Detect and handles the case where a row is modified or deleted while it is being read during SELECT processing. (CVS 5399) (check-in: [c80a5d09] user: drh branch: trunk, size: 147339)
2008-07-10
17:59
[fcf51df1] part of check-in [9c8b97ef] Fix a crash in flattenSubquery(). (CVS 5388) (check-in: [9c8b97ef] user: danielk1977 branch: trunk, size: 147352)
00:32
[0c887fe1] part of check-in [636cd723] 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: [636cd723] user: drh branch: trunk, size: 147290)
2008-07-09
01:39
[e6edf11f] part of check-in [c6cf0847] Additional test coverage in select.c and expr.c. (CVS 5381) (check-in: [c6cf0847] user: drh branch: trunk, size: 148365)
2008-07-08
23:40
[02b78777] part of check-in [cbd3c158] Remove obsolete code from select.c, including the "affinity" parameter to the sqlite3Select() module. (CVS 5380) (check-in: [cbd3c158] user: drh branch: trunk, size: 148703)
19:34
[5ff8bc0e] part of check-in [8ed04b1e] Completely rework the sqlite3SetString() primitive so that it honors the SQLITE_LIMIT_LENGTH and avoids the use of strlen(). (CVS 5374) (check-in: [8ed04b1e] user: drh branch: trunk, size: 152404)
18:05
[46997b33] part of check-in [fa07c360] Improved testing of the min/max optimization. (CVS 5373) (check-in: [fa07c360] user: drh branch: trunk, size: 152408)
17:43
[183a68a0] part of check-in [6c2adade] Prevent the flattening optimization from transforming a to a query with an illegal ORDER BY clause. (CVS 5372) (check-in: [6c2adade] user: danielk1977 branch: trunk, size: 152424)
2008-07-02
16:10
[3e44f391] part of check-in [cec4eba1] Fix a memory leak that can occur following a malloc failure. (CVS 5339) (check-in: [cec4eba1] user: danielk1977 branch: trunk, size: 151979)
13:13
[31c8ab4c] part of check-in [8b88b64b] Call the authorizer callback the same number of times whether or not the query flattening occurs. (CVS 5338) (check-in: [8b88b64b] user: danielk1977 branch: trunk, size: 151979)
2008-07-01
18:26
[154b3fee] part of check-in [8f9d1abb] Fix errors in in.test. Also add a few tests to selectB.test. (CVS 5337) (check-in: [8f9d1abb] user: danielk1977 branch: trunk, size: 151722)
17:39
[0b01cf5f] part of check-in [56109b9a] Fix another memory leak related to UNION ALL and sub-selects. (CVS 5336) (check-in: [56109b9a] user: danielk1977 branch: trunk, size: 151680)
16:05
[8e995105] part of check-in [6ee71f4d] Fix a memory leak to do with the recent UNION ALL sub-select optimization. (CVS 5333) (check-in: [6ee71f4d] user: danielk1977 branch: trunk, size: 151621)
14:39
[d1b63388] part of check-in [a79786a9] Fix a problem with LIMIT and OFFSET clauses on the parent query when optimizing a UNION ALL sub-select. (CVS 5332) (check-in: [a79786a9] user: danielk1977 branch: trunk, size: 151442)
14:09
[727e546c] part of check-in [3ef468e7] Optimize sub-selects and views that use UNION ALL. This optimization isn't very well tested yet. (CVS 5331) (check-in: [3ef468e7] user: danielk1977 branch: trunk, size: 151311)
2008-06-30
18:12
[afaac3f0] part of check-in [6fcb3bff] Call the query flattener while processing the parent query. Previously, it was called while processing the sub-queries. (CVS 5330) (check-in: [6fcb3bff] user: danielk1977 branch: trunk, size: 148531)
2008-06-27
00:52
[5b213de0] part of check-in [0b01ec5c] Remove unused variable. Fix a compiler warning. (CVS 5319) (check-in: [0b01ec5c] user: drh branch: trunk, size: 148737)
00:47
[c4f8aa2a] part of check-in [a4005782] Tweaks to the IN expression code generator. Fix an an unrelated bug in the compound SELECT code generator. (CVS 5318) (check-in: [a4005782] user: drh branch: trunk, size: 148762)
2008-06-26
18:04
[e27de53b] part of check-in [d45a97be] Fix handling of "x IN (...)" and "x NOT IN (...)" expressions when the set contains an SQL NULL value. (CVS 5314) (check-in: [d45a97be] user: danielk1977 branch: trunk, size: 148750)
2008-06-25
00:12
[79f60dc4] part of check-in [8bbfa978] The compound-select merge optimization passes quick.test with no errors. (CVS 5299) (check-in: [8bbfa978] user: drh branch: trunk, size: 149041)
2008-06-24
12:46
[dfc7e6ba] part of check-in [95037e6d] 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: [95037e6d] user: drh branch: trunk, size: 144873)
00:32
[1ebcd83a] part of check-in [e2ba324c] 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: [e2ba324c] user: drh branch: trunk, size: 145108)
2008-06-22
12:37
[ea3e5e23] part of check-in [663a590e] 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: [663a590e] user: drh branch: trunk, size: 139999)
2008-06-20
18:13
[8393c47a] part of check-in [08311365] Add new Compare and Jump codes to the virtual machine. Use them in the implementation of aggregate queries. (CVS 5257) (check-in: [08311365] user: drh branch: trunk, size: 127742)
15:24
[672a4812] part of check-in [6b9d92fc] Change the SRT_Subroutine mode into SRT_Coroutine. Use co-routines in the INSERT processing logic. (CVS 5255) (check-in: [6b9d92fc] user: drh branch: trunk, size: 128180)
2008-06-06
15:04
[66968745] part of check-in [ef1956ee] Remove the subroutine return stack from the VDBE. Return addresses for subroutines are now stored in registers. (CVS 5191) (check-in: [ef1956ee] user: drh branch: trunk, size: 128250)
2008-05-01
17:03
[da43ce30] part of check-in [227a6f67] Fix harmless compiler warnings. (CVS 5073) (check-in: [227a6f67] user: drh branch: trunk, size: 127900)
2008-04-17
19:14
[b02ee165] part of check-in [0d2e258e] 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: [0d2e258e] user: drh branch: trunk, size: 127922)
2008-04-15
12:14
[5b8824a3] part of check-in [d04246a4] Fix a code generator bug caused by the new CSE optimization. Add test cases to prevent a recurrence. (CVS 5011) (check-in: [d04246a4] user: drh branch: trunk, size: 127943)
2008-04-10
13:33
[1abe53c8] part of check-in [fba97f78] First cut at optimizing single-row updates to use a one-pass algorithm. (CVS 4973) (check-in: [fba97f78] user: drh branch: trunk, size: 127960)
2008-04-01
05:07
[53bfb7c4] part of check-in [91cc646e] Fix the CSE mechanism so that it takes into account column affinity changes that might be imposed by comparison operators. (CVS 4949) (check-in: [91cc646e] user: drh branch: trunk, size: 127900)
2008-03-31
23:48
[0d1b44c9] part of check-in [c29ee0fe] Avoid duplicate OP_Column opcodes by remembering prior results. This is similar to CSE, but only applies to columns. (CVS 4943) (check-in: [c29ee0fe] user: drh branch: trunk, size: 128009)
17:41
[61fcc616] part of check-in [b266924b] In setQuotedToken(), only make a malloced copy if the argument contains one or more " characters. (CVS 4941) (check-in: [b266924b] user: danielk1977 branch: trunk, size: 127471)
2008-03-27
17:59
[f47faa4a] part of check-in [1a58a870] 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: [1a58a870] user: danielk1977 branch: trunk, size: 126949)
2008-03-26
12:50
[5b519701] part of check-in [72ae4562] Comment change on the previous check-in. No changes to code. (CVS 4918) (check-in: [72ae4562] user: drh branch: trunk, size: 126882)
12:46
[84f9392a] part of check-in [50de87dc] 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: [50de87dc] user: drh branch: trunk, size: 126701)
2008-03-25
17:23
[831714d4] part of check-in [ee381b43] 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: [ee381b43] user: drh branch: trunk, size: 126394)
09:47
[c06849a0] part of check-in [04715364] Use a vdbe memory cell to allocate the space required for vdbe cursors. (CVS 4912) (check-in: [04715364] user: danielk1977 branch: trunk, size: 126596)
2008-03-22
01:07
[35063b07] part of check-in [8ef26646] Add the SQLITE_OMIT_DECLTYPE compile-time option. Remove more code when SQLITE_ENABLE_COLUMN_METADATA is not defined. (CVS 4906) (check-in: [8ef26646] user: drh branch: trunk, size: 126634)
2008-03-20
14:03
[2a0f383a] part of check-in [60c77882] 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: [60c77882] user: drh branch: trunk, size: 126468)
2008-03-04
17:45
[d0a1e01a] part of check-in [9c6694bb] Various renames & cleanups to limit exported symbols on amalgamation build (CVS 4819) (check-in: [9c6694bb] user: mlcreech branch: trunk, size: 126421)
2008-02-15
14:33
[aef06a4b] part of check-in [6d33cbd9] 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: [6d33cbd9] user: drh branch: trunk, size: 126395)
2008-02-13
18:25
[1d780691] part of check-in [990237e2] Where possible, avoid freeing buffers allocated for vdbe memory cells in case they can be reused. (CVS 4783) (check-in: [990237e2] user: danielk1977 branch: trunk, size: 126315)
2008-02-06
23:52
[394aa354] part of check-in [e9fcb793] 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: [e9fcb793] user: drh branch: trunk, size: 126303)
2008-01-25
15:04
[1a5d0aaf] part of check-in [50815a82] 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: [50815a82] user: drh branch: trunk, size: 126570)
2008-01-24
14:27
[00adbc4f] part of check-in [c6635a71] Fix a segfault that may follow a malloc failure during compilation of an INSTEAD OF trigger. (CVS 4749) (check-in: [c6635a71] user: danielk1977 branch: trunk, size: 126576)
2008-01-23
17:13
[cf9243f6] part of check-in [9d98a3f0] Fix another segfault that can occur following a malloc failure in the SQL compiler. (CVS 4748) (check-in: [9d98a3f0] user: danielk1977 branch: trunk, size: 126561)
15:44
[8aa0f336] part of check-in [6bd8db38] Fix a couple of segfaults that could occur after a malloc() failure in the SQL compiler. (CVS 4747) (check-in: [6bd8db38] user: danielk1977 branch: trunk, size: 126540)
14:51
[9c273d06] part of check-in [45c59802] Testing coverage enhancements to sqlite3_get_table() and to the SELECT code generator. (CVS 4746) (check-in: [45c59802] user: drh branch: trunk, size: 126498)
2008-01-19
03:35
[9fb094cc] part of check-in [d9ebe9d7] Cleanup and simplification of constraint processing. Simplifications to the VM for better test coverage. (CVS 4729) (check-in: [d9ebe9d7] user: drh branch: trunk, size: 127024)
2008-01-17
17:15
[d9a394a2] part of check-in [5ba4e5ad] Reuse registers better in the inner loop of a SELECT statement. (CVS 4719) (check-in: [5ba4e5ad] user: drh branch: trunk, size: 127090)
16:22
[fb2d6653] part of check-in [706b41b7] 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: [706b41b7] user: drh branch: trunk, size: 126597)
02:36
[841eba5f] part of check-in [b3a141b2] Registerification of the WHERE clause logic. (CVS 4716) (check-in: [b3a141b2] user: drh branch: trunk, size: 126310)
2008-01-15
02:22
[578f7b01] part of check-in [a13d3e95] Fix for a couple of minor memory leaks. (CVS 4712) (check-in: [a13d3e95] user: drh branch: trunk, size: 126310)
2008-01-13
19:02
[16ba6ec0] part of check-in [23181f86] Fix some issues with out-of-memory recovery. (CVS 4710) (check-in: [23181f86] user: drh branch: trunk, size: 126329)
2008-01-12
21:35
[34c138d9] part of check-in [110c000d] The sqlite3_trace() callback now prints a message as each trigger fires within a statement. (CVS 4709) (check-in: [110c000d] user: drh branch: trunk, size: 126308)
19:03
[fc9cebb2] part of check-in [426f31ec] Continuing work toward converting the VM to a register machine. (CVS 4708) (check-in: [426f31ec] user: drh branch: trunk, size: 126218)
12:48
[9e3c65ca] part of check-in [a6dddebc] Continuing work toward converting the VM into a register machine. (CVS 4707) (check-in: [a6dddebc] user: drh branch: trunk, size: 126414)
2008-01-10
23:50
[ff008971] part of check-in [8cbd4651] More work toward converting the VM into a register-based machine. (CVS 4704) (check-in: [8cbd4651] user: drh branch: trunk, size: 126351)
03:46
[095296a5] part of check-in [173698c9] Continuing work toward registerizing the code generator. (CVS 4703) (check-in: [173698c9] user: drh branch: trunk, size: 131645)
2008-01-09
23:04
[7b88e170] part of check-in [e3cf1c1c] 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: [e3cf1c1c] user: drh branch: trunk, size: 130688)
02:15
[8570d4db] part of check-in [92deff07] Continued work toward converting to a register-based VM. (CVS 4698) (check-in: [92deff07] user: drh branch: trunk, size: 131524)
2008-01-08
23:54
[d6bdf86c] part of check-in [8862ce9c] Registerify the comparison opcodes. (CVS 4697) (check-in: [8862ce9c] user: drh branch: trunk, size: 131620)
2008-01-07
19:20
[1162f736] part of check-in [aa48867c] Registerify the AUTOINCREMENT processing and the OP_IsNull and OP_NotNull operators. (CVS 4692) (check-in: [aa48867c] user: drh branch: trunk, size: 131546)
10:16
[31faeb61] part of check-in [38020592] Comment changes in select.c. (CVS 4691) (check-in: [38020592] user: danielk1977 branch: trunk, size: 131488)
2008-01-06
00:25
[3dc81bc2] part of check-in [8201f717] Registerify the SRT_Subroutine destination for SELECT results. (CVS 4690) (check-in: [8201f717] user: drh branch: trunk, size: 130190)
2008-01-05
18:48
[faf793d1] part of check-in [6bb1b1bc] Modify OP_RegMakeRec to take a base register and count and optionally store results in the register specified by P3. (CVS 4689) (check-in: [6bb1b1bc] user: drh branch: trunk, size: 129950)
18:44
[fcde4b33] part of check-in [2b98b0fc] Fix a memory leak introduced with #4687. (CVS 4688) (check-in: [2b98b0fc] user: danielk1977 branch: trunk, size: 129940)
17:39
[33c60380] part of check-in [c449e04f] First pass at optimizing max()/min() as described in #2853. Some refinements to come. (CVS 4687) (check-in: [c449e04f] user: danielk1977 branch: trunk, size: 129843)
05:20
[102eb03b] part of check-in [3e8a07dd] Register-ify the OP_AddImm and all casting opcodes. Omit the OP_MemIncr opcode. (CVS 4683) (check-in: [3e8a07dd] user: drh branch: trunk, size: 128297)
04:06
[1a666413] part of check-in [cc149eb9] 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: [cc149eb9] user: drh branch: trunk, size: 128301)
2008-01-04
22:01
[30110ce6] part of check-in [fe057a88] Implement the out2-prerelease opcode design pattern. (CVS 4681) (check-in: [fe057a88] user: drh branch: trunk, size: 128316)
2008-01-03
23:44
[62b9cfb2] part of check-in [61bfb77c] 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: [61bfb77c] user: drh branch: trunk, size: 128321)
18:44
[6aec65bf] part of check-in [4f396707] Update OP_Rowid, OP_Column and related opcodes to use registers. (CVS 4671) (check-in: [4f396707] user: drh branch: trunk, size: 128348)
18:03
[dae0e2ed] part of check-in [0b849805] 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: [0b849805] user: drh branch: trunk, size: 128347)
09:51
[539a71c9] part of check-in [46501f49] Change the OP_Insert opcode to read the key and data to insert from memory cells, not the stack. (CVS 4666) (check-in: [46501f49] user: danielk1977 branch: trunk, size: 128346)
07:54
[1f8579ef] part of check-in [35da261d] Change OP_OpenRead and OP_OpenWrite so that the database number is read from the P3 operand, not the stack. (CVS 4663) (check-in: [35da261d] user: danielk1977 branch: trunk, size: 128364)
00:01
[fb57c9f4] part of check-in [027875e4] 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: [027875e4] user: drh branch: trunk, size: 128400)
2008-01-02
17:11
[cc4064f9] part of check-in [fbd17a89] 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: [fbd17a89] user: danielk1977 branch: trunk, size: 128157)
16:27
[6a3790a0] part of check-in [86dcdfe6] Combine the eDest and iParm arguments to sqlite3Select() into a single type - "SelectDest". (CVS 4657) (check-in: [86dcdfe6] user: danielk1977 branch: trunk, size: 127717)
14:28
[c0a225dc] part of check-in [4c7f35da] 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: [4c7f35da] user: drh branch: trunk, size: 126798)
00:34
[55b1a99e] part of check-in [051ec01f] 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: [051ec01f] user: drh branch: trunk, size: 125640)
2008-01-01
19:02
[247d668f] part of check-in [e08a33ed] 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: [e08a33ed] user: danielk1977 branch: trunk, size: 125682)
2007-12-14
17:24
[5a137027] part of check-in [4a008050] Fix a C++-ism in recent changes to select.c. (CVS 4633) (check-in: [4a008050] user: drh branch: trunk, size: 124697)
16:11
[bb0a08ec] part of check-in [86f45d7b] Fix a typo in the previous check-in. Also simplify a line in select.c. (CVS 4631) (check-in: [86f45d7b] user: drh branch: trunk, size: 124696)
2007-12-13
21:54
[e8cfdc85] part of check-in [4e91a267] 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: [4e91a267] user: drh branch: trunk, size: 124731)
19:15
[7eedf1fc] part of check-in [993a2130] Fix a memory leak that can occur following a malloc() failure. (CVS 4628) (check-in: [993a2130] user: danielk1977 branch: trunk, size: 124740)
07:58
[14c4a8e9] part of check-in [2f88b9b3] 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: [2f88b9b3] user: danielk1977 branch: trunk, size: 124714)
03:45
[c2de6d7b] part of check-in [56063ec8] 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: [56063ec8] user: drh branch: trunk, size: 124706)
02:45
[63cc67c9] part of check-in [bbddf16a] 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: [bbddf16a] user: drh branch: trunk, size: 123953)
2007-12-10
18:51
[b7408624] part of check-in [0d9b0e6e] Further modifications to do with ORDER BY and compound SELECT queries. Related to ticket #2822. (CVS 4606) (check-in: [0d9b0e6e] user: danielk1977 branch: trunk, size: 121482)
2007-12-08
21:10
[2c08239b] part of check-in [62a78d21] 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: [62a78d21] user: drh branch: trunk, size: 122487)
2007-11-23
13:42
[7c0ab94b] part of check-in [59669475] Avoid a double-free in an out-of-memory situation with a USING clause or NATURAL JOIN. Ticket #2789. (CVS 4551) (check-in: [59669475] user: drh branch: trunk, size: 121634)
2007-11-21
15:24
[963e2b68] part of check-in [2655a3f2] Handle out-of-memory situations inside the query flattener. Ticket #2784. (CVS 4549) (check-in: [2655a3f2] user: drh branch: trunk, size: 121663)
2007-11-12
15:40
[aef87a17] part of check-in [cf41d6a0] Fix a code comment in select.c. No code changes. (CVS 4539) (check-in: [cf41d6a0] user: danielk1977 branch: trunk, size: 121434)
15:29
[19fb4850] part of check-in [e5633123] 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: [e5633123] user: danielk1977 branch: trunk, size: 121372)
2007-08-31
17:42
[4706a611] part of check-in [d1194273] 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: [d1194273] user: danielk1977 branch: trunk, size: 121069)
2007-08-30
11:48
[e5cc50e8] part of check-in [d3e50226] Fixes for failures in fuzz_malloc.test. (CVS 4334) (check-in: [d3e50226] user: danielk1977 branch: trunk, size: 121021)
2007-08-29
12:31
[c8045b76] part of check-in [e38ef81b] Modifications to the malloc failure tests to test transient and persistent failures. (CVS 4321) (check-in: [e38ef81b] user: danielk1977 branch: trunk, size: 120983)
2007-08-16
10:09
[98c367bc] part of check-in [77b16713] More work on refactoring of malloc() interfaces. There are still many errors. (CVS 4233) (check-in: [77b16713] user: danielk1977 branch: trunk, size: 120953)
04:30
[4df152ea] part of check-in [deb7ecd6] 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: [deb7ecd6] user: drh branch: trunk, size: 120790)
2007-07-18
18:17
[3b167744] part of check-in [a80a3c9d] Get the min/max optimization working with descending indices. Ticket #2514. (CVS 4161) (check-in: [a80a3c9d] user: drh branch: trunk, size: 119455)
2007-06-26
10:38
[e363327d] part of check-in [7f887a6a] 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: [7f887a6a] user: danielk1977 branch: trunk, size: 119171)
2007-06-24
06:32
[2ee53f92] part of check-in [d5b7224f] When expanding '*' in the result set of a SELECT, quote the expanded identifiers. Fix for #2450. (CVS 4111) (check-in: [d5b7224f] user: danielk1977 branch: trunk, size: 118852)
2007-06-15
15:31
[33a258fc] part of check-in [1d10a489] Fix a memory leak that was discovered by the tests that were added to cover ticket #2339. (CVS 4069) (check-in: [1d10a489] user: drh branch: trunk, size: 118432)
2007-06-07
10:55
[a96d80c0] part of check-in [0d71ad45] 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: [0d71ad45] user: drh branch: trunk, size: 118241)
2007-05-31
08:20
[6d40db6c] part of check-in [d2282e64] Extend out-of-memory testing with fuzzily generated sql some. One fix for a problem found by the same. (CVS 4044) (check-in: [d2282e64] user: danielk1977 branch: trunk, size: 118051)
2007-05-14
16:50
[c10b98ae] part of check-in [af76928f] Fix a problem with ORDER BY and compound SELECT queries. (CVS 3995) (check-in: [af76928f] user: danielk1977 branch: trunk, size: 117990)
15:49
[0075d984] part of check-in [1c33829c] 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: [1c33829c] user: danielk1977 branch: trunk, size: 117988)
14:05
[f3e6058c] part of check-in [b1d1b16e] Prevent sub-queries with "LIMIT 0" from leaving an extra value on the vdbe stack. Also updates to fuzz.test. (CVS 3993) (check-in: [b1d1b16e] user: danielk1977 branch: trunk, size: 117946)
11:34
[3f563bb0] part of check-in [5627ff74] Remove terms with operator TK_AS from the expression tree. Ticket #2356. (CVS 3991) (check-in: [5627ff74] user: drh branch: trunk, size: 117890)
2007-05-10
10:46
[d43bbded] part of check-in [2c9c94a2] Add code to enforce the MAX_EXPR_DEPTH limit. (CVS 3968) (check-in: [2c9c94a2] user: danielk1977 branch: trunk, size: 118130)
2007-05-09
22:56
[87bcf740] part of check-in [66954bdd] Make sure compound queries inside a subquery only return a single result column. Ticket #2347. (CVS 3967) (check-in: [66954bdd] user: drh branch: trunk, size: 117595)
2007-05-08
13:58
[114e7eba] part of check-in [c59d4360] Add more code to enforce the limits specified in limits.h. (CVS 3946) (check-in: [c59d4360] user: drh branch: trunk, size: 117080)
2007-05-06
20:04
[a306d03f] part of check-in [9600a998] 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: [9600a998] user: drh branch: trunk, size: 116802)
2007-05-04
13:15
[e6a2546d] part of check-in [ba4845b3] 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: [ba4845b3] user: drh branch: trunk, size: 116493)
2007-05-03
13:02
[3c8f3bc7] part of check-in [678d672b] Use memmove() instead of memcpy() when moving between memory regions that might overlap. Ticket #2334. (CVS 3905) (check-in: [678d672b] user: drh branch: trunk, size: 116469)
2007-04-16
17:07
[b914abca] part of check-in [cdc7608b] Fix a memory leak introduced by (3842) associated with ticket #2296. (CVS 3848) (check-in: [cdc7608b] user: drh branch: trunk, size: 115508)
15:06
[f120e927] part of check-in [8d6c3bfc] Ensure sqlite3_finalize() can be called from within the xDisconnect() method of virtual tables. (CVS 3845) (check-in: [8d6c3bfc] user: danielk1977 branch: trunk, size: 115468)
2007-04-13
16:06
[4fa2b45a] part of check-in [cfc6f933] 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: [cfc6f933] user: drh branch: trunk, size: 115466)
2007-04-12
21:25
[bd174205] part of check-in [0dd3e2e4] Changes toward fixes for tickets #2296 and #2291. (CVS 3838) (check-in: [0dd3e2e4] user: drh branch: trunk, size: 115415)
03:54
[e61a72f8] part of check-in [4062ddf3] 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: [4062ddf3] user: drh branch: trunk, size: 115355)
2007-04-06
01:04
[6d6e7c99] part of check-in [fd4da6b1] Changes to increase test coverage. (CVS 3819) (check-in: [fd4da6b1] user: drh branch: trunk, size: 115385)
2007-04-01
23:49
[41b19974] part of check-in [18aec1dd] Fix some warnings about unused and uninitialized variables. (CVS 3788) (check-in: [18aec1dd] user: drh branch: trunk, size: 115409)
2007-03-29
05:51
[30af458c] part of check-in [ad4a6b1a] 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: [ad4a6b1a] user: drh branch: trunk, size: 115405)
2007-03-02
07:27
[4d68a0d7] part of check-in [ddb4d0af] Disable the "SELECT max(rowid) ..." optimization for virtual tables. Ticket #2250. (CVS 3669) (check-in: [ddb4d0af] user: danielk1977 branch: trunk, size: 115389)
2007-02-24
13:23
[6a090150] part of check-in [6fc18275] 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: [6fc18275] user: drh branch: trunk, size: 115285)
11:52
[7808a407] part of check-in [e11bbf17] 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: [e11bbf17] user: drh branch: trunk, size: 115248)
2007-02-14
09:19
[05081fdf] part of check-in [cb78f7cb] Use OP_VColumn instead of OP_Column when querying virtual tables for values to save in aggregate context records. #2230. (CVS 3644) (check-in: [cb78f7cb] user: danielk1977 branch: trunk, size: 115475)
2007-02-01
23:02
[63b2163f] part of check-in [85cca7cd] 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: [85cca7cd] user: drh branch: trunk, size: 115363)
2007-01-26
19:23
[628f4982] part of check-in [1b26d687] 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: [1b26d687] user: drh branch: trunk, size: 115570)
19:04
[d46aceb4] part of check-in [942e7193] Fix a (harmless) assertion fault on nested views where the inner views are compound selects. Ticket #2192. (CVS 3605) (check-in: [942e7193] user: drh branch: trunk, size: 112560)
2006-12-16
16:25
[52f09127] part of check-in [7393c81b] 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: [7393c81b] user: drh branch: trunk, size: 112523)
2006-10-13
15:34
[6ba6d8ea] part of check-in [b886eaa3] Make sure the names of all expressions in compound SELECT statements used as subqueries are correctly resolved. Ticket #2018. (CVS 3477) (check-in: [b886eaa3] user: drh branch: trunk, size: 112561)
2006-09-29
14:01
[e247a5e1] part of check-in [fcde6391] 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: [fcde6391] user: drh branch: trunk, size: 112366)
2006-08-11
19:08
[0d472493] part of check-in [924ea730] 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: [924ea730] user: drh branch: trunk, size: 112409)
2006-07-11
13:15
[aeec8efb] part of check-in [b1f326e6] Prevent memory leak and possible NULL pointer deference after malloc failure. Ticket #1886. (CVS 3329) (check-in: [b1f326e6] user: drh branch: trunk, size: 112274)
2006-06-21
07:02
[380fa06c] part of check-in [643e63e5] Fix a problem with virtual tables and joins. (CVS 3278) (check-in: [643e63e5] user: danielk1977 branch: trunk, size: 112186)
2006-06-20
13:07
[6dd3fdfe] part of check-in [3e19a7d8] Fix some problems with virtual tables and joins in where.c. (CVS 3277) (check-in: [3e19a7d8] user: danielk1977 branch: trunk, size: 112154)
11:01
[668ab7cf] part of check-in [c6ea353b] Modifications so that compilation and testing with the various OMIT macros defined works. (CVS 3276) (check-in: [c6ea353b] user: danielk1977 branch: trunk, size: 112090)
2006-06-16
21:13
[c1965c63] part of check-in [2119e7bf] Rework the way UPDATE works for virtual tables. (CVS 3262) (check-in: [2119e7bf] user: drh branch: trunk, size: 112124)
2006-06-11
23:41
[38eda11d] part of check-in [898ec36b] Progress toward CREATE VIRTUAL TABLE. Still not even close to working... (CVS 3211) (check-in: [898ec36b] user: drh branch: trunk, size: 112096)
2006-04-26
17:39
[8daba07a] part of check-in [7f3ef7dd] Get LIMIT 0 working on subqueries. Ticket #1784. (CVS 3177) (check-in: [7f3ef7dd] user: drh branch: trunk, size: 112084)
2006-04-11
14:16
[cb5d8661] part of check-in [d83e0230] Allow constant terms in the ORDER BY or GROUP BY clauses. Ticket #1768. (CVS 3173) (check-in: [d83e0230] user: drh branch: trunk, size: 112084)
2006-04-07
13:50
[3519dc64] part of check-in [e64809f0] Return the correct declared column type, origin column name, origin database name, etc. from aggregate queries. Ticket #1726 and #1755. (CVS 3169) (check-in: [e64809f0] user: drh branch: trunk, size: 112240)
2006-03-26
01:21
[ca8ee9b5] part of check-in [80cda9f7] 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: [80cda9f7] user: drh branch: trunk, size: 112216)
2006-03-17
13:56
[eefb46a6] part of check-in [8f60139f] Miscellaneous code cleanup. (CVS 3143) (check-in: [8f60139f] user: drh branch: trunk, size: 111978)
00:04
[c95d5cd4] part of check-in [6b3717ae] Much faster sorting when there are a large number of columns in the result set. (CVS 3141) (check-in: [6b3717ae] user: drh branch: trunk, size: 112530)
2006-03-09
17:28
[38203fd2] part of check-in [36830faf] Correct names returned from a query against a view. Ticket #1709, #1688, #1711. (CVS 3128) (check-in: [36830faf] user: drh branch: trunk, size: 112126)
2006-03-06
20:55
[c196faee] part of check-in [e510e6dd] 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: [e510e6dd] user: drh branch: trunk, size: 112126)
2006-02-24
02:53
[46e1d5bf] part of check-in [4b22e4b8] Remove unused parameters on internal APIs. Suppress warnings from CodeWarrior. (CVS 3110) (check-in: [4b22e4b8] user: drh branch: trunk, size: 112058)
2006-02-10
07:07
[7d069e87] part of check-in [5e8611e1] Fix the origin APIs so that they correctly handle views and subqueries that cannot be flattened. (CVS 3072) (check-in: [5e8611e1] user: danielk1977 branch: trunk, size: 112184)
03:06
[7ed6f28c] part of check-in [6ebb8f9b] 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: [6ebb8f9b] user: danielk1977 branch: trunk, size: 112198)
02:27
[ace67e13] part of check-in [82f502cd] Add the column_origin_name() etc. APIs. (CVS 3069) (check-in: [82f502cd] user: danielk1977 branch: trunk, size: 112502)
2006-01-24
12:09
[daee9b20] part of check-in [d86f18a4] Rename some variables to avoid hiding others. Also add "static" to two function signatures that were missing it. (CVS 3024) (check-in: [d86f18a4] user: danielk1977 branch: trunk, size: 109184)
2006-01-23
18:42
[8b3ffcb6] part of check-in [4f56949b] Bug fix in cases where a compound select has an ORDER BY clause with multiple terms. (CVS 3011) (check-in: [4f56949b] user: drh branch: trunk, size: 109149)
2006-01-22
21:52
[11ad28af] part of check-in [3e1e6aff] Performance optimization in btree.c. (CVS 2990) (check-in: [3e1e6aff] user: drh branch: trunk, size: 109150)
00:42
[bdfc4b16] part of check-in [3c2eee5e] Code size reductions in select.c. (CVS 2989) (check-in: [3c2eee5e] user: drh branch: trunk, size: 109151)
2006-01-21
22:19
[4e907209] part of check-in [af18c0f4] 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: [af18c0f4] user: drh branch: trunk, size: 109176)
2006-01-20
18:10
[7a7f4f73] part of check-in [507653a9] More compiler warnings fixed - or in some cases comments are added to explain that the compiler is wrong. (CVS 2984) (check-in: [507653a9] user: drh branch: trunk, size: 108246)
2006-01-18
16:51
[e80ac343] part of check-in [ac090f2a] Use a global variable protected by a mutex instead of thread-specific-data to record malloc() failures. (CVS 2972) (check-in: [ac090f2a] user: danielk1977 branch: trunk, size: 108246)
2006-01-13
06:33
[28d449c7] part of check-in [dd705955] Minor modification to restoreOrClearCursorPosition() to improve efficiency. Do not allocate the extra 8-bytes if memory-management is not enabled. (CVS 2936) (check-in: [dd705955] user: danielk1977 branch: trunk, size: 108351)
2006-01-11
21:41
[7b19d350] part of check-in [5d9c6aa9] 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: [5d9c6aa9] user: drh branch: trunk, size: 108344)
2006-01-10
17:58
[579cfdd2] part of check-in [0f0213be] Store collation sequence names instead of pointers in sharable schema data structures. (CVS 2904) (check-in: [0f0213be] user: danielk1977 branch: trunk, size: 108289)
2006-01-09
16:12
[acfeda95] part of check-in [3e75d3d5] Fix some errors to do with attached databases and text encodings in shared-cache mode. (CVS 2895) (check-in: [3e75d3d5] user: danielk1977 branch: trunk, size: 108186)
06:29
[d97a4397] part of check-in [82b81f69] Rename DbSchema to "Schema" and SqliteTsd to "ThreadData". (CVS 2893) (check-in: [82b81f69] user: danielk1977 branch: trunk, size: 108145)
00:09
[72b7b83f] part of check-in [32998fe8] Remove benign reference to an uninitialized variable. Ticket #1590. (CVS 2890) (check-in: [32998fe8] user: drh branch: trunk, size: 108102)
2006-01-08
18:10
[48d3ecfb] part of check-in [b2ac0be0] Get LIMIT and OFFSET working again for negative limits and offsets. Ticket #1586. (CVS 2889) (check-in: [b2ac0be0] user: drh branch: trunk, size: 108105)
05:02
[ad632ffd] part of check-in [55e703ec] Reduce memory requirements for ORDER BY combined with LIMIT. Ticket #1586. (CVS 2887) (check-in: [55e703ec] user: drh branch: trunk, size: 107750)
2006-01-07
13:21
[77bcb71f] part of check-in [23b587b0] In shared-cache mode, lock all required tables before beginning to execute the body of the statement program. (CVS 2881) (check-in: [23b587b0] user: danielk1977 branch: trunk, size: 106943)
2006-01-05
14:22
[a60e5c7f] part of check-in [5dec3a39] Fix for ticket #1582 (Double delete of invalid LIMIT clause Expr* applied to a UNION ALL query). (CVS 2861) (check-in: [5dec3a39] user: danielk1977 branch: trunk, size: 106873)
11:34
[7a78520f] part of check-in [deeda0dc] Add the shared schema/pager modifications. Very few tests so far. (CVS 2859) (check-in: [deeda0dc] user: danielk1977 branch: trunk, size: 106873)
2006-01-03
15:16
[5b0ccd66] part of check-in [837dc77f] Always case 0 to (char*) on varargs functions. Otherwise there are problems on 64-bit machines. (CVS 2854) (check-in: [837dc77f] user: drh branch: trunk, size: 106760)
2005-12-09
20:02
[2292b065] part of check-in [83a59151] Clean up annoying (and pointless) compiler warnings about differing signedness. (CVS 2810) (check-in: [83a59151] user: drh branch: trunk, size: 106753)
2005-12-06
12:52
[0e4d3627] part of check-in [e1606658] 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: [e1606658] user: danielk1977 branch: trunk, size: 106716)
2005-11-16
13:47
[4a9e5366] part of check-in [b3882b43] Fix a problem with the sorting of literals in a compound query. Ticket #1501. (CVS 2770) (check-in: [b3882b43] user: drh branch: trunk, size: 106610)
2005-11-14
22:29
[095d5b7a] part of check-in [ce06c123] Create separate affinities for INTEGER and REAL. (CVS 2766) (check-in: [ce06c123] user: drh branch: trunk, size: 106610)
2005-11-03
00:41
[be02f123] part of check-in [2313d912] First cut at supporting CHECK constraints. Everything appears to work, but much more testing is needed as well as documentation. (CVS 2754) (check-in: [2313d912] user: drh branch: trunk, size: 106610)
2005-10-06
16:53
[80c95f3c] part of check-in [edca8913] More efficient handling of the LIMIT clause. Scalar subqueries and EXISTS on compound SELECT statements now working properly. Ticket #1473. (CVS 2747) (check-in: [edca8913] user: drh branch: trunk, size: 106703)
2005-09-20
18:13
[034c7f74] part of check-in [655e75ac] Add VM code comments on the group-by processing. Extra group-by test case. (CVS 2731) (check-in: [655e75ac] user: drh branch: trunk, size: 105991)
17:42
[240f456b] part of check-in [2471957f] Code cleanup and simplification. Three new Mem opcodes added. The sqlite3VdbeJumpHere function added. (CVS 2730) (check-in: [2471957f] user: drh branch: trunk, size: 105486)
13:55
[4a527187] part of check-in [f22d0f64] Cleanup the implementation and the documentation of the new 0x200 P1 flag on the VDBE comparison operands. (CVS 2729) (check-in: [f22d0f64] user: drh branch: trunk, size: 105767)
13:12
[52b72b7f] part of check-in [d9b0c970] NULLs compare equal to each other when computing GROUP BY categories. (CVS 2728) (check-in: [d9b0c970] user: drh branch: trunk, size: 105767)
2005-09-19
21:05
[c3fe1994] part of check-in [ea10f978] 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: [ea10f978] user: drh branch: trunk, size: 105415)
17:35
[459fb935] part of check-in [6cc57fcf] 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: [6cc57fcf] user: drh branch: trunk, size: 104393)
15:37
[2d6a485a] part of check-in [92126a21] Fix uninitialized value on a UNION ALL select with an ORDER BY clause. (CVS 2722) (check-in: [92126a21] user: drh branch: trunk, size: 104329)
2005-09-12
23:03
[9ef1dddd] part of check-in [37116550] Bug fix in the new COUNT(DISTINCT) logic. Ticket #1420. (CVS 2689) (check-in: [37116550] user: drh branch: trunk, size: 104287)
2005-09-11
11:56
[67653a6f] part of check-in [2f397bd8] COUNT(DISTINCT x) is now fully functional, though it could benefit from additional testing. (CVS 2688) (check-in: [2f397bd8] user: drh branch: trunk, size: 104287)
2005-09-10
15:28
[a255ca7e] part of check-in [415b8b24] Use of the CROSS keyword in a join prevents table reordering. Ticket #1414. (CVS 2683) (check-in: [415b8b24] user: drh branch: trunk, size: 102865)
2005-09-08
12:57
[2bba89bb] part of check-in [0c3e368d] Aggregates with GROUP BY can sometimes return no result rows. (CVS 2674) (check-in: [0c3e368d] user: drh branch: trunk, size: 102840)
01:58
[7e52f53c] part of check-in [7283f7c2] Optimizations and refinements. Improvements to test coverage. (CVS 2667) (check-in: [7283f7c2] user: drh branch: trunk, size: 102834)
00:13
[5f4a9396] part of check-in [bcc7d722] All regression tests now pass. But I am sure there must still be problems. New tests need to be added. (CVS 2666) (check-in: [bcc7d722] user: drh branch: trunk, size: 102088)
2005-09-07
22:48
[4549cbef] part of check-in [7e85a162] More bug fixes. But there are still tests that fail. (CVS 2664) (check-in: [7e85a162] user: drh branch: trunk, size: 101961)
22:09
[25df0f7a] part of check-in [c3ac5859] Bug fixes in aggregate processing. Fewer tests fail. (CVS 2663) (check-in: [c3ac5859] user: drh branch: trunk, size: 102020)
21:22
[2f965220] part of check-in [17039ec3] 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: [17039ec3] user: drh branch: trunk, size: 101907)
2005-09-05
20:06
[79bd7f97] part of check-in [7b56763a] Fix bugs introduced by checkin (2656) and do some modest code enhancements. (CVS 2657) (check-in: [7b56763a] user: drh branch: trunk, size: 93788)
2005-09-01
12:16
[aabc227c] part of check-in [81259a01] 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: [81259a01] user: drh branch: trunk, size: 93841)
03:07
[a0b10fee] part of check-in [09db0a24] 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: [09db0a24] user: drh branch: trunk, size: 93599)
2005-08-31
18:20
[cf566f99] part of check-in [a25801df] {quote: KeyInfo} generation moved to a common subroutine. (CVS 2652) (check-in: [a25801df] user: drh branch: trunk, size: 93918)
2005-08-30
00:54
[a185b91f] part of check-in [4ab994a8] Minor code enhancements. (CVS 2642) (check-in: [4ab994a8] user: drh branch: trunk, size: 94096)
2005-08-28
01:34
[f8a9993b] part of check-in [07b48921] 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: [07b48921] user: drh branch: trunk, size: 94337)
2005-08-14
20:47
[f441648e] part of check-in [98338abf] General code cleanup resulting in smaller footprint. (CVS 2595) (check-in: [98338abf] user: drh branch: trunk, size: 94083)
2005-07-08
17:13
[c6114710] part of check-in [3bb9ce5f] Change the name of the OpenTemp opcode to OpenVirtual which is more descriptive of what it does. (CVS 2541) (check-in: [3bb9ce5f] user: drh branch: trunk, size: 94312)
2005-06-12
21:35
[28b752e5] part of check-in [36f2da1f] Update older opcode names to be more meaningful in light of the latest code design. (CVS 2506) (check-in: [36f2da1f] user: drh branch: trunk, size: 94192)
12:01
[266416bb] part of check-in [97b348a5] Elminiate a VM opcode that was no longer needed. (CVS 2505) (check-in: [97b348a5] user: drh branch: trunk, size: 94692)
2005-06-06
21:19
[ce4b9fd7] part of check-in [e73d25c7] Reference count Table structures so that they are not deallocated too soon. Ticket #1210. (CVS 2498) (check-in: [e73d25c7] user: drh branch: trunk, size: 94693)
16:34
[a057b1bb] part of check-in [0d57f851] Honor the full_column_names pragma on * results. Ticket #1263. (CVS 2493) (check-in: [0d57f851] user: drh branch: trunk, size: 95810)
2005-05-26
14:41
[071a4840] part of check-in [7f67b9f0] 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: [7f67b9f0] user: danielk1977 branch: trunk, size: 95519)
2005-05-19
08:43
[43cc2a76] part of check-in [79a41674] Always use a more specific type (P3_FUNCDEF) instead of P3_POINTER as the P3 type of a vdbe instruction. (CVS 2463) (check-in: [79a41674] user: danielk1977 branch: trunk, size: 95324)
2005-05-16
22:37
[5a96555e] part of check-in [582cb77d] Fix an uninitialized variable. Ticket #1244. (CVS 2460) (check-in: [582cb77d] user: drh branch: trunk, size: 95316)
2005-04-29
02:10
[def26b6f] part of check-in [0667eae9] Prevent a segfault described by ticket #1229. (CVS 2450) (check-in: [0667eae9] user: drh branch: trunk, size: 95282)
2005-04-22
02:38
[277cf889] part of check-in [88b39436] Remove some vestigal code. Add the experimental sqlite3_transfer_bindings() API. (CVS 2446) (check-in: [88b39436] user: drh branch: trunk, size: 94688)
2005-03-28
03:39
[a324af36] part of check-in [bcb5d72e] Fix some memory leaks that occur after a malloc failure. (CVS 2421) (check-in: [bcb5d72e] user: drh branch: trunk, size: 94699)
2005-03-21
03:53
[85695750] part of check-in [e7844a01] Assorted fixes to the handling of various malloc() failures. (CVS 2413) (check-in: [e7844a01] user: danielk1977 branch: trunk, size: 94604)
2005-02-12
08:59
[69e6093d] part of check-in [f7858d88] Fix a problem with sub-queries and the flattening optimization. Also handle an extra case of database corruption. (CVS 2324) (check-in: [f7858d88] user: danielk1977 branch: trunk, size: 94537)
2005-02-08
07:50
[37dd84fd] part of check-in [f0d3ca10] Fix for correlated subqueries where the parent is an aggregate. Ticket #1105. (CVS 2318) (check-in: [f0d3ca10] user: danielk1977 branch: trunk, size: 94447)
2005-02-05
12:48
[6217e1f7] part of check-in [515e5033] Allow expressions (including variables) in LIMIT and OFFSET clauses. Ticket #1096. (CVS 2316) (check-in: [515e5033] user: danielk1977 branch: trunk, size: 94330)
2005-02-04
04:07
[16c750c0] part of check-in [2eb90870] Remove code for SQL cursors. (CVS 2312) (check-in: [2eb90870] user: danielk1977 branch: trunk, size: 94070)
2005-01-31
12:42
[fee51a0d] part of check-in [dfbd684a] Assorted minor changes to speed up loading the database schema. (CVS 2293) (check-in: [dfbd684a] user: danielk1977 branch: trunk, size: 94806)
2005-01-30
11:11
[4382c778] part of check-in [9843c0dd] Respect collation sequences in views. Ticket #1088. (CVS 2291) (check-in: [9843c0dd] user: danielk1977 branch: trunk, size: 94891)
2005-01-29
08:32
[b34d7098] part of check-in [b1b50f31] Modify sub-query handling. Tickets #1083 and #1084. (CVS 2286) (check-in: [b1b50f31] user: danielk1977 branch: trunk, size: 94878)
2005-01-26
03:58
[32fe60f1] part of check-in [0642d3e3] Allow GROUP BY on non-aggregate queries. Ticket #1064 (CVS 2276) (check-in: [0642d3e3] user: danielk1977 branch: trunk, size: 90810)
2005-01-21
08:13
[e204ca52] part of check-in [c6fc49e6] Exclude a few more lines of code using OMIT macros. (CVS 2253) (check-in: [c6fc49e6] user: danielk1977 branch: trunk, size: 90959)
2005-01-20
22:48
[d8f5c8b4] part of check-in [38401dfb] Bug fixes and enhancements entered while on jury recess. (CVS 2246) (check-in: [38401dfb] user: drh branch: trunk, size: 90433)
13:36
[8a4a3831] part of check-in [d30fdf0f] 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: [d30fdf0f] user: drh branch: trunk, size: 90432)
13:03
[1686f250] part of check-in [417bbba9] Remove a few more lines of code when SQLITE_OMIT_** macros are defined. (CVS 2244) (check-in: [417bbba9] user: danielk1977 branch: trunk, size: 90192)
2005-01-19
23:24
[e147c81d] part of check-in [d8b2a7e0] Continued refactoring of the name resolution logic and query optimizer. (CVS 2236) (check-in: [d8b2a7e0] user: drh branch: trunk, size: 90135)
2005-01-18
17:40
[29bc5811] part of check-in [c06add57] Make sure USING and NATURAL work on joins even if the columns are renamed using an AS phrase. Ticket #523. (CVS 2233) (check-in: [c06add57] user: drh branch: trunk, size: 89965)
17:20
[f9239c59] part of check-in [b1d4c42d] CREATE TABLE ... AS ... uses short names for columns. Ticket #1036. (CVS 2232) (check-in: [b1d4c42d] user: drh branch: trunk, size: 89610)
16:02
[56f01829] part of check-in [9295050a] 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: [9295050a] user: drh branch: trunk, size: 88987)
14:45
[767e9d0f] part of check-in [88d4834f] Continue refactoring name resolution. Fix for ticket #1047. (CVS 2230) (check-in: [88d4834f] user: drh branch: trunk, size: 88978)
04:00
[37b9ddb9] part of check-in [0142ae6f] Refinements to the name resolution logic. Change the name of the keywordhash.c file to keywordhash.h. (CVS 2229) (check-in: [0142ae6f] user: drh branch: trunk, size: 88721)
2005-01-17
22:08
[cfd5f306] part of check-in [4a753439] 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: [4a753439] user: drh branch: trunk, size: 88653)
08:57
[f74bdde6] part of check-in [5a9da62a] 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: [5a9da62a] user: danielk1977 branch: trunk, size: 88662)
2005-01-15
01:52
[e29c70ec] part of check-in [92f9d2b2] Test coverage improvements. (CVS 2215) (check-in: [92f9d2b2] user: drh branch: trunk, size: 88309)
2005-01-03
02:26
[af6ffcf0] part of check-in [8ef2c644] Allow GROUP BY on aggregate queries only. Ticket #1039. (CVS 2176) (check-in: [8ef2c644] user: drh branch: trunk, size: 88123)
2004-12-25
01:03
[080c0d1d] part of check-in [5fd1f471] 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: [5fd1f471] user: drh branch: trunk, size: 87991)
2004-12-16
21:09
[ac6610b4] part of check-in [ece0085f] Make sure LIMITs are handled correctly on UNION operators. Ticket #1035. (CVS 2166) (check-in: [ece0085f] user: drh branch: trunk, size: 87994)
2004-11-23
01:47
[36cc9da9] part of check-in [8b61d1ae] More work on the implementation of cursors, but they are still not functioning. (CVS 2142) (check-in: [8b61d1ae] user: drh branch: trunk, size: 87949)
2004-11-22
19:12
[b00478f3] part of check-in [fc8c1393] 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: [fc8c1393] user: drh branch: trunk, size: 88140)
10:02
[7b17db76] part of check-in [91acd87e] Back out changes allowing writes to tables that have open cursors. (CVS 2133) (check-in: [91acd87e] user: danielk1977 branch: trunk, size: 87268)
2004-11-16
15:50
[cf4b7952] part of check-in [a2e1c35b] Perform deletes in a single pass. (CVS 2104) (check-in: [a2e1c35b] user: danielk1977 branch: trunk, size: 87272)
2004-10-31
02:22
[156990c6] part of check-in [be661acf] Insert #ifdefs that can optionally remove features at compiletime resulting in a database engine with a smaller footprint. (CVS 2034) (check-in: [be661acf] user: drh branch: trunk, size: 87260)
2004-10-06
15:41
[de51ec24] part of check-in [d790c84c] Convert many constants to have type "const". (CVS 2006) (check-in: [d790c84c] user: drh branch: trunk, size: 86834)
2004-09-25
14:39
[96b14891] part of check-in [9ef4c24a] Code cleanup: get rid of the sqlite3SetNString utility function. (CVS 1984) (check-in: [9ef4c24a] user: drh branch: trunk, size: 86828)
13:12
[97c5f11b] part of check-in [cb631a13] Code simplifications and size reductions. (CVS 1983) (check-in: [cb631a13] user: drh branch: trunk, size: 86968)
2004-09-19
02:15
[13a4e6d0] part of check-in [4871c77f] 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: [4871c77f] user: drh branch: trunk, size: 87023)
2004-09-08
15:09
[5f60fc16] part of check-in [a1f53252] Always cast 0 to (char*)0 when it is an argument in a varargs function. (CVS 1948) (check-in: [a1f53252] user: drh branch: trunk, size: 86912)
2004-09-06
17:24
[6e3ec12a] part of check-in [3ddf5a9d] 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: [3ddf5a9d] user: drh branch: trunk, size: 86905)
2004-09-01
03:06
[14534579] part of check-in [9c411c3c] Optimizations on the SELECT code generator. (CVS 1926) (check-in: [9c411c3c] user: drh branch: trunk, size: 86902)
2004-08-29
16:25
[400b2dcc] part of check-in [9cc765be] Corrections to transient table handling in compound select statments. Tickets #826 and #875. (CVS 1912) (check-in: [9cc765be] user: drh branch: trunk, size: 86832)
01:31
[5fa9db32] part of check-in [30747859] Progress toward fixing iproblems with compound selects. (CVS 1911) (check-in: [30747859] user: drh branch: trunk, size: 87524)
2004-08-21
17:54
[24b9ab86] part of check-in [bd6649c5] Optimizations to the code generator. (CVS 1899) (check-in: [bd6649c5] user: drh branch: trunk, size: 85257)
2004-07-26
23:32
[cbed45f4] part of check-in [76fe68cf] Honor the ORDER BY clause in a subquery that is the right-hand side of an IN operator. Ticket #827. (CVS 1871) (check-in: [76fe68cf] user: drh branch: trunk, size: 86044)
2004-07-20
01:45
[a1c18cab] part of check-in [9937ffb0] Handle quotes on table names in TABLE.* terms in SELECT. Ticket #680. (CVS 1834) (check-in: [9937ffb0] user: drh branch: version_2, size: 80613)
01:45
[aefda626] part of check-in [826b6797] Handle quotes on the table name in TABLE.* terms in SELECT statements. Ticket #680. (CVS 1833) (check-in: [826b6797] user: drh branch: trunk, size: 86062)
00:20
[05218c25] part of check-in [ef0d5ebe] Correct handling of views on tables with quoted column names. Ticket #756. (CVS 1827) (check-in: [ef0d5ebe] user: drh branch: version_2, size: 80609)
00:20
[540ac0ef] part of check-in [8ac5a8ad] Correct handling of views on tables with quoted column names. Ticket #756. (CVS 1826) (check-in: [8ac5a8ad] user: drh branch: trunk, size: 86061)
2004-07-19
23:38
[b8d0a832] part of check-in [9d4f43f0] Refinements to the LIMIT patch (1823) for ticket #749. (CVS 1825) (check-in: [9d4f43f0] user: drh branch: trunk, size: 86026)
23:33
[894bdac9] part of check-in [db5ae13d] Limit occurs after DISTINCT. Ticket #749. (CVS 1824) (check-in: [db5ae13d] user: drh branch: version_2, size: 80581)
23:16
[d4585c55] part of check-in [e6bc8aa8] LIMIT occurs after DISTINCT. Ticket #749. (CVS 1823) (check-in: [e6bc8aa8] user: drh branch: trunk, size: 86057)
2004-07-18
21:33
[6f0bbf8d] part of check-in [b6e8b7a1] An improved fix for the min() problem of ticket #800. (CVS 1804) (check-in: [b6e8b7a1] user: drh branch: trunk, size: 85535)
21:14
[b8fe5c69] part of check-in [223521c0] Min() and max() ignore NULL values. Ticket #800. (CVS 1803) (check-in: [223521c0] user: drh branch: version_2, size: 80087)
20:52
[d92ac232] part of check-in [166234a2] min() ignores NULL values. Ticket #800. (CVS 1802) (check-in: [166234a2] user: drh branch: trunk, size: 85709)
2004-06-21
10:45
[f02a65af] part of check-in [4d02df63] Avoid opening a temp table for aggregate queries with no GROUP BY clause. (CVS 1649) (check-in: [4d02df63] user: danielk1977 branch: trunk, size: 85390)
07:36
[73057959] part of check-in [ee9dffd9] Update sqlite3_column_decltype() to return NULL as the declartion type for an expression that is not a column reference. (CVS 1646) (check-in: [ee9dffd9] user: danielk1977 branch: trunk, size: 85482)
2004-06-19
14:49
[9aa82bbc] part of check-in [99d0436e] Omit the sqlite3VdbeCode() routine. Use sqlite3NameFromToken() more to reduce the amount of code. (CVS 1639) (check-in: [99d0436e] user: drh branch: trunk, size: 85404)
2004-06-17
07:53
[91570af7] part of check-in [a71a9ff1] Remove redundant opcodes OP_MakeKey and OP_MakeIdxKey. (CVS 1612) (check-in: [a71a9ff1] user: danielk1977 branch: trunk, size: 85453)
2004-06-16
12:02
[ee37ea91] part of check-in [7974c9a6] Trivial modifications to prevent compiler warnings. (CVS 1607) (check-in: [7974c9a6] user: danielk1977 branch: trunk, size: 85420)
2004-06-15
02:44
[70367578] part of check-in [4f5e2530] (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: [4f5e2530] user: danielk1977 branch: trunk, size: 85416)
2004-06-12
09:25
[164d1a68] part of check-in [5903f538] (1) Modifications to the user-function interface and (2) Internal changes to automatically created indices. (CVS 1575) (check-in: [5903f538] user: danielk1977 branch: trunk, size: 85238)
2004-06-11
13:19
[d29488f8] part of check-in [8d56118f] Have the vdbe aggregator use a btree table instead of a hash table. (CVS 1569) (check-in: [8d56118f] user: danielk1977 branch: trunk, size: 85275)
10:51
[3559dcd2] part of check-in [66835ee6] Fix various collation sequence issues. (CVS 1568) (check-in: [66835ee6] user: danielk1977 branch: trunk, size: 84724)
2004-06-10
10:50
[6cb40779] part of check-in [edf069b9] Add the sqlite3_collation_needed() API and fix some error handling cases involving unknown collation sequences. (CVS 1562) (check-in: [edf069b9] user: danielk1977 branch: trunk, size: 81937)
2004-06-09
09:55
[1f8355e7] part of check-in [c634e71f] Some progress on user-defined collation sequences. (CVS 1544) (check-in: [c634e71f] user: danielk1977 branch: trunk, size: 81921)
2004-06-07
10:00
[0ac0adeb] part of check-in [31c1668d] Tables created with the CREATE TABLE <tbl> AS SELECT ... syntax now inherit column declaration types from the SELECT statement. (CVS 1538) (check-in: [31c1668d] user: danielk1977 branch: trunk, size: 81110)
2004-06-05
00:01
[02d71116] part of check-in [cb1ffabf] Critical bugs fixed in btree.c. Incompatible file format change. Unrelated comment fix in select.c (CVS 1530) (check-in: [cb1ffabf] user: drh branch: trunk, size: 80884)
2004-05-29
11:24
[0297717e] part of check-in [3225de89] Transform OP_HexBlob and OP_String8 to OP_Blob and OP_String the first time they are executed. (CVS 1492) (check-in: [3225de89] user: danielk1977 branch: trunk, size: 81182)
2004-05-28
13:13
[ee54bf2f] part of check-in [c8a40218] Fix a bug in the sqlite3_column_decltype() API. (CVS 1486) (check-in: [c8a40218] user: danielk1977 branch: trunk, size: 81176)
2004-05-27
23:56
[26f726b3] part of check-in [203af2b2] Add API functions sqlite3_open_varargs(), sqlite3_open16_varargs() and sqlite3_complete16(). (CVS 1479) (check-in: [203af2b2] user: danielk1977 branch: trunk, size: 81132)
10:30
[2ba142a4] part of check-in [c9e3015f] A few more bugfixes. Test cases pass now. (CVS 1472) (check-in: [c9e3015f] user: danielk1977 branch: trunk, size: 81175)
2004-05-26
16:54
[e90e2a14] part of check-in [36e03162] 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: [36e03162] user: drh branch: trunk, size: 81149)
10:11
[53f1aea3] part of check-in [d5659f2e] Add some tests for the new API. Many more to come. (CVS 1462) (check-in: [d5659f2e] user: danielk1977 branch: trunk, size: 81177)
06:18
[42996047] part of check-in [0317bef4] Use the new form of the sqlite3_create_function() API. (CVS 1460) (check-in: [0317bef4] user: danielk1977 branch: trunk, size: 81826)
2004-05-25
23:35
[867cab23] part of check-in [9385ad5c] Move the sqlite3_exec() function to legacy.c. (CVS 1455) (check-in: [9385ad5c] user: danielk1977 branch: trunk, size: 81826)
2004-05-21
03:01
[7d77a8be] part of check-in [25643a01] Eliminate the OP_SortMakeRec and OP_SortCallback opcodes. Sort using the standard record format. (CVS 1426) (check-in: [25643a01] user: drh branch: trunk, size: 81775)
02:14
[4cd54ac7] part of check-in [3b55095e] 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: [3b55095e] user: drh branch: trunk, size: 81743)
01:29
[d77f7731] part of check-in [0736b7e8] Sorting bug fixes. Now only 17 tests fail. (CVS 1422) (check-in: [0736b7e8] user: drh branch: trunk, size: 81979)
2004-05-20
22:16
[97c78398] part of check-in [a6cb09d7] Add internal support for collating sequences. This breaks 244 tests. (CVS 1420) (check-in: [a6cb09d7] user: drh branch: trunk, size: 81377)
03:02
[2510f0f1] part of check-in [a7f02db7] Bug fix associated with misc3.test. (CVS 1414) (check-in: [a7f02db7] user: drh branch: trunk, size: 83690)
2004-05-19
14:56
[d01c0346] part of check-in [8f249c45] Change opcode names and comments to better describe the operation of the incrKey flag. OP_MoveTo becomes OP_MoveGe. (CVS 1407) (check-in: [8f249c45] user: drh branch: trunk, size: 83690)
2004-05-18
22:38
[2981cafe] part of check-in [ae37e8a0] Remove dead code from vdbeaux.c. Add comments describing desired changes to OP_Sort processing in select.c (CVS 1398) (check-in: [ae37e8a0] user: drh branch: trunk, size: 83690)
09:58
[f376f3be] part of check-in [a62872aa] Fix many problems with manifest types and column affinity. Most things are working now. (CVS 1392) (check-in: [a62872aa] user: danielk1977 branch: trunk, size: 83411)
01:23
[62431fb1] part of check-in [202a470f] 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: [202a470f] user: danielk1977 branch: trunk, size: 80751)
2004-05-17
10:48
[b62bb250] part of check-in [0f6c9b05] More changes to support the new types model. Compound SELECTs are currently broken. (CVS 1389) (check-in: [0f6c9b05] user: danielk1977 branch: trunk, size: 80479)
2004-05-11
06:55
[ca99ae4d] part of check-in [941d0fdc] More minor changes to accomadate the new btree. All the select* tests pass now. (CVS 1353) (check-in: [941d0fdc] user: danielk1977 branch: trunk, size: 80058)
2004-05-10
10:34
[92904392] part of check-in [2242423e] Change the names of external symbols from sqlite_XXX to sqlite3_XXX. (CVS 1338) (check-in: [2242423e] user: danielk1977 branch: trunk, size: 80196)
2004-05-08
08:23
[d3868613] part of check-in [8af6474c] 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: [8af6474c] user: danielk1977 branch: trunk, size: 80194)
2004-03-13
14:00
[3833e2b6] part of check-in [31c94acc] Fix the min/max optimizer so that it works when the FROM clause is a subquery. Ticket #658. (CVS 1293) (check-in: [31c94acc] user: drh branch: trunk, size: 79891)
2004-03-02
18:37
[fb436097] part of check-in [5aaa2939] 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: [5aaa2939] user: drh branch: trunk, size: 79784)
2004-02-25
13:47
[a8b0f9bf] part of check-in [adbe31ad] 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: [adbe31ad] user: drh branch: trunk, size: 79671)
2004-02-22
20:05
[90200003] part of check-in [51f1e8f7] Use sqliteVdbeOp3 instead of sqliteVdbeChangeP3 where applicable. (CVS 1266) (check-in: [51f1e8f7] user: drh branch: trunk, size: 79727)
2004-02-20
14:50
[9a41dace] part of check-in [574dd444] 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: [574dd444] user: drh branch: trunk, size: 80222)
2004-02-16
03:44
[3b8eaf1a] part of check-in [f7213485] Remove the NullCallback opcode. Handle the empty_result_set pragma inside the sqlite_exec() function. (CVS 1244) (check-in: [f7213485] user: drh branch: trunk, size: 80217)
2004-02-14
23:59
[330166e3] part of check-in [2dbc4593] Eliminate obsolete code associated with the older callback functionality. (CVS 1243) (check-in: [2dbc4593] user: drh branch: trunk, size: 80478)
16:31
[7cbd9cca] part of check-in [9771ad1e] 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: [9771ad1e] user: drh branch: trunk, size: 80746)
2004-02-13
16:22
[da4f3837] part of check-in [aa0490cc] 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: [aa0490cc] user: drh branch: trunk, size: 80734)
2004-02-12
15:31
[a3a203f9] part of check-in [12c7a83f] Always reload the schema after a rollback. Ticket #594. (CVS 1229) (check-in: [12c7a83f] user: drh branch: trunk, size: 80647)
2004-02-09
14:37
[a0211d1a] part of check-in [1cff1886] 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: [1cff1886] user: drh branch: trunk, size: 80655)
2004-01-30
02:01
[b7694067] part of check-in [af73fbca] Make sure min() and max() optimizations work for subqueries. Ticket #587. (CVS 1201) (check-in: [af73fbca] user: drh branch: trunk, size: 80203)
2004-01-24
20:18
[b5bc89a5] part of check-in [3626f6d4] 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: [3626f6d4] user: drh branch: trunk, size: 80045)
2004-01-19
04:57
[131b1af5] part of check-in [7972ee32] comment typos (CVS 1192) (check-in: [7972ee32] user: jplyon branch: trunk, size: 79629)
2004-01-14
13:38
[2712bd4d] part of check-in [c9e7996f] Ignore NULLs in a subquery as the right operand of IN. Ticket #565. (CVS 1175) (check-in: [c9e7996f] user: drh branch: trunk, size: 79626)
2003-09-27
13:39
[d79ac60b] part of check-in [824430b3] Remove support for the Oracle8 outer join syntax. (CVS 1106) (check-in: [824430b3] user: drh branch: trunk, size: 79380)
2003-07-20
01:16
[2fa83d6c] part of check-in [543479e3] 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: [543479e3] user: drh branch: trunk, size: 81440)
2003-07-19
00:44
[f1f3b2c2] part of check-in [c35e5071] Make sure the min() and max() optimizer works correctly when there is a LIMIT clause. Ticket #396. (CVS 1057) (check-in: [c35e5071] user: drh branch: trunk, size: 79647)
2003-07-16
11:51
[98385a4f] part of check-in [a31d0bd9] Make LIMIT 0 return no rows. LIMIT -1 still returns all rows. Ticket #346. (CVS 1053) (check-in: [a31d0bd9] user: drh branch: trunk, size: 79404)
02:19
[20a38bc2] part of check-in [e6a752bf] 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: [e6a752bf] user: drh branch: trunk, size: 79124)
2003-06-16
00:40
[29c53228] part of check-in [dd8943e8] 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: [dd8943e8] user: drh branch: trunk, size: 78749)
2003-05-31
16:21
[76b3a5cd] part of check-in [7202d4f1] 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: [7202d4f1] user: drh branch: trunk, size: 78015)
2003-05-17
17:35
[15d92130] part of check-in [01398fb7] 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: [01398fb7] user: drh branch: trunk, size: 77973)
2003-05-06
20:35
[c06b4605] part of check-in [6d4b6597] Restrain the flattener in the presence of outer joins. Ticket #306. (CVS 958) (check-in: [6d4b6597] user: drh branch: trunk, size: 78044)
2003-05-02
16:04
[3fe63e3a] part of check-in [ad57693e] 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: [ad57693e] user: drh branch: trunk, size: 77383)
14:32
[493360f3] part of check-in [be7aed20] 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: [be7aed20] user: drh branch: trunk, size: 75718)
2003-04-29
16:20
[d1c876b9] part of check-in [c6bf62e4] The sqlite_complete() function should ignore carriage-return characters. (Oops - some unrelated edits also made it into this check-in.) (CVS 942) (check-in: [c6bf62e4] user: drh branch: trunk, size: 77737)
2003-04-24
01:45
[dfc13cb6] part of check-in [206b1739] Fix some issues with INSTEAD OF triggers. (CVS 930) (check-in: [206b1739] user: drh branch: trunk, size: 77081)
2003-04-22
20:30
[92a66f01] part of check-in [c675a550] 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: [c675a550] user: drh branch: trunk, size: 76444)
2003-04-17
22:57
[07140aaf] part of check-in [1e5e00fb] Fix triggers to work in an ATTACHed database. Ticket #295. (CVS 915) (check-in: [1e5e00fb] user: drh branch: trunk, size: 76441)
12:44
[84168d6e] part of check-in [98ef6110] Make sure the min() and max() optimizations work on empty indexed tables. Ticket #296. (CVS 914) (check-in: [98ef6110] user: drh branch: trunk, size: 76547)
2003-03-31
13:36
[14e2e2a5] part of check-in [e80afe75] Minor follow-on changes to the recent ATTACH patch. (CVS 892) (check-in: [e80afe75] user: drh branch: trunk, size: 76547)
02:12
[7d69e569] part of check-in [1d3fc977] 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: [1d3fc977] user: drh branch: trunk, size: 76546)
2003-03-27
12:51
[afdc06d4] part of check-in [d2fb2bb5] 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: [d2fb2bb5] user: drh branch: trunk, size: 77383)
2003-03-19
03:14
[06ddc007] part of check-in [875da9ee] Modifications to the VDBE to support more than one database file. (CVS 878) (check-in: [875da9ee] user: drh branch: trunk, size: 77327)
2003-02-02
12:41
[d12d4c12] part of check-in [b6879231] Make the GROUP BY clause work even if there are no aggregate functions. (CVS 859) (check-in: [b6879231] user: drh branch: trunk, size: 77342)
2003-01-31
17:16
[77018f47] part of check-in [187d9c40] 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: [187d9c40] user: drh branch: trunk, size: 77315)
2003-01-29
14:06
[13b8e5ea] part of check-in [162b2591] The callback-free API is now working, though much more testing is need. (CVS 853) (check-in: [162b2591] user: drh branch: trunk, size: 76636)
2003-01-19
03:59
[c3c0b826] part of check-in [f6a87068] Update comments. No changes to code. (CVS 841) (check-in: [f6a87068] user: drh branch: trunk, size: 76536)
2003-01-18
20:11
[65373244] part of check-in [71cc292d] 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: [71cc292d] user: drh branch: trunk, size: 73668)
2003-01-13
23:27
[5ce75c13] part of check-in [45de93f9] 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: [45de93f9] user: drh branch: trunk, size: 70479)
2003-01-12
18:02
[1b7d20b6] part of check-in [52d5007f] 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: [52d5007f] user: drh branch: trunk, size: 70473)
2003-01-11
14:19
[b52c1dcc] part of check-in [e84d3afe] 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: [e84d3afe] user: drh branch: trunk, size: 70416)
13:30
[754af8fa] part of check-in [86deb12d] Remove the ColumnCount opcode, which had become a no-op. (CVS 821) (check-in: [86deb12d] user: drh branch: trunk, size: 70608)
2002-12-03
02:34
[cc8640e5] part of check-in [33c6fd6b] Allow an aggregate function in the HAVING clause even if no aggregates appear in the result set. Ticket #187. (CVS 793) (check-in: [33c6fd6b] user: drh branch: trunk, size: 70595)
02:22
[a03c317f] part of check-in [dbf78932] Honor ORDER BY clauses in VIEWs. Ticket #193. (CVS 792) (check-in: [dbf78932] user: drh branch: trunk, size: 70594)
2002-10-27
19:35
[ce82596a] part of check-in [31df3690] Minimal support for oracle8 outer join syntax. (CVS 771) (check-in: [31df3690] user: drh branch: trunk, size: 70268)
2002-10-22
23:38
[4a6f3fb8] part of check-in [3b68aa25] Correctly handle column names and string constants in parentheses. Fix for ticket #179. (CVS 770) (check-in: [3b68aa25] user: drh branch: trunk, size: 67976)
2002-10-20
15:53
[987e0c61] part of check-in [3ef29256] Work around a bug in the Borland C compiler. Ticket #172. (CVS 765) (check-in: [3ef29256] user: drh branch: trunk, size: 68202)
2002-09-08
17:23
[74a025cd] part of check-in [23fe36c7] 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: [23fe36c7] user: drh branch: trunk, size: 68134)
2002-08-28
03:00
[6cd3673e] part of check-in [723362e7] 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: [723362e7] user: drh branch: trunk, size: 67756)
2002-08-25
19:20
[e79db94a] part of check-in [c602603e] 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: [c602603e] user: drh branch: trunk, size: 67619)
18:29
[bef25919] part of check-in [b957dafc] Fix the memory leak introduced by check-in (725). (CVS 726) (check-in: [b957dafc] user: drh branch: trunk, size: 66800)
2002-08-24
18:24
[7aa3c378] part of check-in [22d8726e] 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: [22d8726e] user: drh branch: trunk, size: 66612)
2002-08-04
00:52
[f504cc54] part of check-in [18745c67] 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: [18745c67] user: drh branch: trunk, size: 66256)
2002-07-18
00:34
[a43eabfc] part of check-in [20d152fc] 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: [20d152fc] user: drh branch: trunk, size: 66212)
2002-07-11
12:18
[f4e7221a] part of check-in [b9872724] 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: [b9872724] user: drh branch: trunk, size: 66212)
2002-07-10
21:26
[9e67a79b] part of check-in [ff8b6f4e] 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: [ff8b6f4e] user: drh branch: trunk, size: 66023)
2002-07-05
21:42
[1c7c0b42] part of check-in [b4737a16] 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: [b4737a16] user: drh branch: trunk, size: 65802)
2002-06-29
02:20
[63a10ea6] part of check-in [91c0db66] Add a few more tests and fix a few bugs that the tests uncovered. (CVS 652) (check-in: [91c0db66] user: drh branch: trunk, size: 64195)
2002-06-28
12:18
[473670ff] part of check-in [96515b81] 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: [96515b81] user: drh branch: trunk, size: 64138)
2002-06-26
02:45
[92ffd8b5] part of check-in [bdb006b8] 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: [bdb006b8] user: drh branch: trunk, size: 64038)
2002-06-24
22:01
[f7d74f20] part of check-in [8b6574cf] 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: [8b6574cf] user: drh branch: trunk, size: 63638)
12:20
[3e83a18b] part of check-in [d861489e] Fix a VDBE stack leak in LEFT OUTER JOIN. Fix a bug in the code generator for JOIN ... USING(...). (CVS 638) (check-in: [d861489e] user: drh branch: trunk, size: 63169)
2002-06-22
02:33
[d71b5980] part of check-in [8aa73ce6] An optimization: avoid the use of an intermediate table on UNION ALL if there is no ORDER BY clause. (CVS 637) (check-in: [8aa73ce6] user: drh branch: trunk, size: 63169)
2002-06-21
23:01
[346da88a] part of check-in [9d552310] 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: [9d552310] user: drh branch: trunk, size: 62712)
2002-06-20
03:38
[3eadcde4] part of check-in [43c5aff5] 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: [43c5aff5] user: drh branch: trunk, size: 62208)
2002-06-19
14:27
[514b4b12] part of check-in [f09e19b4] 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: [f09e19b4] user: drh branch: trunk, size: 60365)
2002-06-14
22:38
[6c3a92d7] part of check-in [699cf362] Make the LIMIT clause work even if the destination of the SELECT is something other than a callback. (Ticket #66) (CVS 619) (check-in: [699cf362] user: drh branch: trunk, size: 60354)
2002-06-06
23:42
[1d5cb1ae] part of check-in [d9392949] Bug fix: do not segfault if a SELECT without a FROM clause includes the * wildcard in the result column list. (CVS 609) (check-in: [d9392949] user: drh branch: trunk, size: 59228)
18:54
[0293ec01] part of check-in [7ac5bd29] 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: [7ac5bd29] user: drh branch: trunk, size: 59129)
2002-06-02
16:09
[ad9061b4] part of check-in [7acbf84b] Enhance the ORDER BY clause so that an integer term means to sort by the corresponding column. (CVS 602) (check-in: [7acbf84b] user: drh branch: trunk, size: 59274)
2002-05-31
15:51
[9a9f76d7] part of check-in [da61aa1d] 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: [da61aa1d] user: drh branch: trunk, size: 58434)
2002-05-27
12:24
[6e84ac2b] part of check-in [f8041f3d] 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: [f8041f3d] user: drh branch: trunk, size: 58209)
03:25
[f3c814e8] part of check-in [f562d542] Fix the "alias.*" bug found by Bernie Cosell and reported on the newsgroup. (CVS 593) (check-in: [f562d542] user: drh branch: trunk, size: 57873)
2002-05-26
20:54
[9b404b6e] part of check-in [90511737] 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: [90511737] user: drh branch: trunk, size: 57829)
2002-05-25
00:18
[bbf00ee2] part of check-in [d8d04c14] Additional testing of LEFT OUTER JOIN. (CVS 588) (check-in: [d8d04c14] user: drh branch: trunk, size: 57706)
2002-05-24
20:31
[8f0ec9de] part of check-in [99bd1f5b] 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: [99bd1f5b] user: drh branch: trunk, size: 57516)
16:14
[6e9f9959] part of check-in [e238643e] 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: [e238643e] user: drh branch: trunk, size: 52310)
02:04
[c46f4e07] part of check-in [a167b71d] 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: [a167b71d] user: drh branch: trunk, size: 50550)
2002-05-08
11:54
[1b623a7d] part of check-in [08f27cb3] 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: [08f27cb3] user: drh branch: trunk, size: 50534)
2002-04-30
19:20
[5e9fe2cd] part of check-in [24e4cf73] 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: [24e4cf73] user: drh branch: trunk, size: 50355)
2002-04-23
17:10
[04860119] part of check-in [a06d9acd] 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: [a06d9acd] user: drh branch: trunk, size: 50309)
2002-04-04
02:10
[92aef3f6] part of check-in [c2320eab] Fix for bug #2: Add support for TABLE.* in SELECT statements. (CVS 518) (check-in: [c2320eab] user: drh branch: trunk, size: 50219)
2002-03-23
00:31
[9323800e] part of check-in [aaf7fd4c] 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: [aaf7fd4c] user: drh branch: trunk, size: 48855)
2002-03-14
14:33
[08b9d8ac] part of check-in [a3a360b3] Bug fix: allow ROWID as a column in SELECT statements where the FROM clause includes views which are flattened. (CVS 431) (check-in: [a3a360b3] user: drh branch: trunk, size: 48688)
2002-03-07
02:02
[1288243c] part of check-in [0a513235] Fix a bug in the sorting of compound selects. (CVS 423) (check-in: [0a513235] user: drh branch: trunk, size: 48610)
2002-03-03
18:59
[49c78aa0] part of check-in [6121e5ab] 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: [6121e5ab] user: drh branch: trunk, size: 48624)
03:03
[68d4ee84] part of check-in [000441c8] Suppress superfluous OP_OpenTemps when flattening subqueries. (CVS 412) (check-in: [000441c8] user: drh branch: trunk, size: 48514)
02:49
[285a9cfa] part of check-in [2c05389e] Bug fixes and additional tests for the subquery flattener. (CVS 411) (check-in: [2c05389e] user: drh branch: trunk, size: 48376)
2002-03-02
17:04
[b99de04f] part of check-in [d5d3e79c] 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: [d5d3e79c] user: drh branch: trunk, size: 47222)
2002-02-28
01:46
[1851abd7] part of check-in [6af10cc5] Fix the coredump. There are still problems in the test suite though. (CVS 402) (check-in: [6af10cc5] user: drh branch: trunk, size: 42484)
00:41
[0aeaf678] part of check-in [50797fee] 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: [50797fee] user: drh branch: trunk, size: 42468)
2002-02-27
19:00
[a8e90e8f] part of check-in [633951f0] Revise the API for user-defined functions. (CVS 398) (check-in: [633951f0] user: drh branch: trunk, size: 43420)
01:47
[c74b6349] part of check-in [668ef638] Bug fixes in the VIEW implementation. (CVS 396) (check-in: [668ef638] user: drh branch: trunk, size: 41242)
2002-02-24
03:25
[410e4dff] part of check-in [1e037eb3] 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: [1e037eb3] user: drh branch: trunk, size: 40268)
2002-02-23
02:32
[61d4a739] part of check-in [39fed2df] 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: [39fed2df] user: drh branch: trunk, size: 39610)
2002-02-21
12:01
[f0cbfd2d] part of check-in [b2a9807f] Change the SQLITE_MASTER format to version 2 in preparation for adding views. (CVS 386) (check-in: [b2a9807f] user: drh branch: trunk, size: 39520)
2002-02-19
22:42
[282f37b2] part of check-in [1686196a] New ROWIDs are numbered sequentially. (CVS 383) (check-in: [1686196a] user: drh branch: trunk, size: 39090)
15:00
[6dadbd3b] part of check-in [cc5abfe3] Optimize simple min() and max() queries. (CVS 382) (check-in: [cc5abfe3] user: drh branch: trunk, size: 38787)
2002-02-18
03:21
[d2bbaf4c] part of check-in [607c0c49] Test and documentation updates for sub-queries. (CVS 373) (check-in: [607c0c49] user: drh branch: trunk, size: 35493)
01:17
[48c14a44] part of check-in [89ffa9ff] Add support for subqueries in the FROM clause of a SELECT. Still need to add tests for this feature. (CVS 372) (check-in: [89ffa9ff] user: drh branch: trunk, size: 35290)
2002-02-17
00:30
[631fe7c1] part of check-in [2336b1ea] Make the sqliteParseInfoReset() function locale to the select.c file. (CVS 371) (check-in: [2336b1ea] user: drh branch: trunk, size: 33831)
2002-02-13
23:22
[4b4a25c5] part of check-in [df6bf627] 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: [df6bf627] user: drh branch: trunk, size: 33303)
2002-02-03
19:06
[b32d3f38] part of check-in [20ea7375] Fix a serious bug in INSERT when the source is a SELECT. (CVS 366) (check-in: [20ea7375] user: drh branch: trunk, size: 33278)
2002-01-28
15:53
[fc11d5a8] part of check-in [dbcfe198] Bug fix: The IN operator was not working if either side derived from an INTEGER PRIMARY KEY. (CVS 354) (check-in: [dbcfe198] user: drh branch: trunk, size: 33278)
2002-01-22
14:11
[de0d1d12] part of check-in [035984a5] Constant ORDER BY or GROUP BY expressions are an error. (CVS 352) (check-in: [035984a5] user: drh branch: trunk, size: 33254)
03:13
[f944a94d] part of check-in [3684beab] 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: [3684beab] user: drh branch: trunk, size: 32864)
2002-01-04
03:09
[bddd8b5d] part of check-in [011be9a9] 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: [011be9a9] user: drh branch: trunk, size: 32845)
2001-12-31
02:48
[79120c80] part of check-in [18e606f7] Comment changes. Change the use of BTree so that either the key is an integer or the data is empty. (CVS 337) (check-in: [18e606f7] user: drh branch: trunk, size: 32845)
2001-12-22
14:49
[bb7bf8d6] part of check-in [29cab124] Bug fixing in the new integer primary key code. (CVS 334) (check-in: [29cab124] user: drh branch: trunk, size: 33031)
2001-12-16
20:05
[76a8fafb] part of check-in [ffbdd43f] Added the ability to say things like "SELECT rowid, * FROM table1;" (CVS 332) (check-in: [ffbdd43f] user: drh branch: trunk, size: 32976)
2001-11-07
16:48
[fa1c7144] part of check-in [decbeb91] New Next opcode and indexing style implemented. (CVS 304) (check-in: [decbeb91] user: drh branch: trunk, size: 32197)
14:22
[a97d3d27] part of check-in [e6ca23fa] 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: [e6ca23fa] user: drh branch: trunk, size: 32067)
2001-11-06
14:10
[da60dfdd] part of check-in [17701224] Added support for LIMIT. (CVS 302) (check-in: [17701224] user: drh branch: trunk, size: 32067)
04:00
[008d7976] part of check-in [eb07768a] Implement indices that occur in sort order and the LIMIT...OFFSET clause of SELECT statements. (CVS 301) (check-in: [eb07768a] user: drh branch: trunk, size: 31851)
2001-11-01
14:41
[c34b02ea] part of check-in [e1370276] 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: [e1370276] user: drh branch: trunk, size: 31480)
2001-10-22
02:58
[d14511af] part of check-in [f8328a5f] More changes for 2.0.7. (CVS 293) (check-in: [f8328a5f] user: drh branch: trunk, size: 31711)
2001-10-20
12:30
[898b27a3] part of check-in [a835658e] 2.0.7 (CVS 292) (check-in: [a835658e] user: drh branch: trunk, size: 31655)
2001-10-19
16:44
[10957c2f] part of check-in [8467d84f] Version 2.0.6 (CVS 291) (check-in: [8467d84f] user: drh branch: trunk, size: 31638)
2001-10-18
12:34
[0e8089c5] part of check-in [22948fc6] Support for UTF-8 and ISO8859 characters in identifiers. Bug fix in the column name generator for selects (was coreing). (CVS 290) (check-in: [22948fc6] user: drh branch: trunk, size: 31431)
2001-10-15
00:44
[75bb3ca7] part of check-in [747bf1b3] 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: [747bf1b3] user: drh branch: trunk, size: 31401)
2001-10-13
01:06
[ff4dc227] part of check-in [288ef124] 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: [288ef124] user: drh branch: trunk, size: 30822)
2001-10-06
16:33
[0ef8ca1b] part of check-in [b63b3f36] Adding table column query capability to support ODBC. (CVS 278) (check-in: [b63b3f36] user: drh branch: trunk, size: 30650)
2001-09-16
00:13
[7d90a646] part of check-in [4e926efe] Disclaimed copyright. Preparing for release 2.0. (CVS 250) (check-in: [4e926efe] user: drh branch: trunk, size: 30600)
2001-09-14
03:24
[f1673b4d] part of check-in [e7b65e37] 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: [e7b65e37] user: drh branch: trunk, size: 31145)
2001-09-13
21:53
[1e37bea8] part of check-in [62c7bd11] Many problems fixed. Many problems yet to go. (CVS 242) (check-in: [62c7bd11] user: drh branch: trunk, size: 31127)
16:18
[0f7e6652] part of check-in [9ac8399c] It runs. Simple tables can be created. INSERT and SELECT work. Much more testing is needed, however. (CVS 241) (check-in: [9ac8399c] user: drh branch: trunk, size: 31076)
14:46
[391921bc] part of check-in [a0a1e701] 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: [a0a1e701] user: drh branch: trunk, size: 30966)
13:46
[e5977916] part of check-in [6ecc8b20] 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: [6ecc8b20] user: drh branch: trunk, size: 30960)
2001-04-11
14:28
[52bb7d08] part of check-in [86b30cd0] better handling of out-of-memory errors (CVS 207) (check-in: [86b30cd0] user: drh branch: trunk, size: 30955)
2001-04-04
11:48
[a6bfdaa9] part of check-in [35a8feed] Added transaction support (CVS 196) (check-in: [35a8feed] user: drh branch: trunk, size: 29796)
2001-02-19
23:23
[faac634e] part of check-in [4fb52b48] Repairs to the previous fix (CVS 186) (check-in: [4fb52b48] user: drh branch: trunk, size: 29731)
2001-01-15
22:51
[0cadab95] part of check-in [c6ffb7ec] continued progress toward version 2.0 (CVS 177) (check-in: [c6ffb7ec] user: drh branch: trunk, size: 29727)
2000-10-16
22:06
[c1de8ac3] part of check-in [f7ea08b9] Added an interrupt capability (CVS 153) (check-in: [f7ea08b9] user: drh branch: trunk, size: 29637)
2000-07-29
13:06
[d382e96c] part of check-in [3bf434d9] better column labels in select results (CVS 110) (check-in: [3bf434d9] user: drh branch: trunk, size: 29647)
2000-06-21
13:59
[aaf23d4a] part of check-in [e1bf96a4] :-) (CVS 104) (check-in: [e1bf96a4] user: drh branch: trunk, size: 29379)
2000-06-19
19:09
[2a91f683] part of check-in [8cce4d27] :-) (CVS 102) (check-in: [8cce4d27] user: drh branch: trunk, size: 29336)
2000-06-08
15:10
[3a12d760] part of check-in [61c381e7] :-) (CVS 81) (check-in: [61c381e7] user: drh branch: trunk, size: 29337)
13:36
[b1ffe8e6] part of check-in [bf98cf82] remove all memory leaks (CVS 80) (check-in: [bf98cf82] user: drh branch: trunk, size: 29337)
11:25
[d0b54f5f] part of check-in [305b043f] :-) (CVS 79) (check-in: [305b043f] user: drh branch: trunk, size: 29307)
11:13
[f3720cad] part of check-in [923c14fe] :-) (CVS 78) (check-in: [923c14fe] user: drh branch: trunk, size: 29253)
01:55
[561f34a8] part of check-in [b3fb15cc] :-) (CVS 77) (check-in: [b3fb15cc] user: drh branch: trunk, size: 29076)
00:28
[5d97d254] part of check-in [19029233] :-) (CVS 76) (check-in: [19029233] user: drh branch: trunk, size: 29039)
00:19
[409c3885] part of check-in [c47d552e] :-) (CVS 75) (check-in: [c47d552e] user: drh branch: trunk, size: 28861)
2000-06-07
23:51
[21d1097e] part of check-in [2ffeb850] :-) (CVS 74) (check-in: [2ffeb850] user: drh branch: trunk, size: 28207)
14:42
[4834ab68] part of check-in [5d773b5d] :-) (CVS 1697) (check-in: [5d773b5d] user: drh branch: trunk, size: 21607)
2000-06-06
22:13
[74fa3af6] part of check-in [65d2100d] :-) (CVS 63) (check-in: [65d2100d] user: drh branch: trunk, size: 21318)
21:56
[db29a091] part of check-in [f4d9089c] :-) (CVS 62) (check-in: [f4d9089c] user: drh branch: trunk, size: 21329)
18:00
[5fd6fbd7] part of check-in [a8fa6719] :-) (CVS 59) (check-in: [a8fa6719] user: drh branch: trunk, size: 16455)
17:27
[77906ffa] part of check-in [db88a0c2] GROUP BY and HAVING installed (CVS 58) (check-in: [db88a0c2] user: drh branch: trunk, size: 16451)
13:54
[a1891cfc] part of check-in [54d19818] added IN and BETWEEN operators (CVS 57) (check-in: [54d19818] user: drh branch: trunk, size: 12971)
01:50
[d90d577a] part of check-in [bd8b2645] :-) (CVS 55) (check-in: [bd8b2645] user: drh branch: trunk, size: 12686)
2000-06-05
18:54
[ab379f96] part of check-in [c02268bd] :-) (CVS 52) (check-in: [c02268bd] user: drh branch: trunk, size: 12532)
16:01
[98f417b7] part of check-in [ce45dea9] separate Select structure (CVS 51) (check-in: [ce45dea9] user: drh branch: trunk, size: 10625)
2000-06-04
12:58
[2dff3d23] part of check-in [6ea5cebf] rework the VDBE engine. NULL is now distinct from "" (CVS 49) (check-in: [6ea5cebf] user: drh branch: trunk, size: 9044)
2000-06-03
18:06
[2f4ae48d] part of check-in [27c06786] added default values (CVS 46) (check-in: [27c06786] user: drh branch: trunk, size: 8996)
2000-06-02
01:51
[ce21eb2d] part of check-in [d3c31def] :-) (CVS 36) (check-in: [d3c31def] user: drh branch: trunk, size: 8986)
2000-05-31
20:00
[25cada7c] part of check-in [1f0c4ffd] added DISTINCT on select (CVS 27) (check-in: [1f0c4ffd] user: drh branch: trunk, size: 8986)
18:20
[719ca960] part of check-in [35a8f523] :-) (CVS 25) (check-in: [35a8f523] user: drh branch: trunk, size: 8206)
15:34
Added: [540fae91] part of check-in [dee7a8be] added aggregate functions like count(*) (CVS 21) (check-in: [dee7a8be] user: drh branch: trunk, size: 8094)