/ History for src/wherecode.c
Login

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

History for src/wherecode.c

2020-07-30
19:56
[a1e168ea] part of check-in [fd01e788] Merge begin-concurrent-pnu changes into this branch. (check-in: [fd01e788] user: dan branch: begin-concurrent-report, size: 97591)
2020-07-29
16:18
[3fa28a56] 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: 97522)
2020-07-22
13:38
[8064fe5c] part of check-in [9ce1710a] Continuing work toward supporting unsigned 32-bit page numbers. (check-in: [9ce1710a] user: drh branch: larger-databases, size: 97522)
2020-07-17
11:07
[efe6de4c] part of check-in [12a909fb] Bring this branch up to date with begin-concurrent-pnu. (check-in: [12a909fb] user: dan branch: begin-concurrent-report, size: 97591)
2020-03-19
21:17
[9e931b9d] 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: 97540)
2020-03-02
21:00
[e0b28348] part of check-in [ad961aee] Fix reporting for some range scan cases. (check-in: [ad961aee] user: dan branch: begin-concurrent-report, size: 97495)
01:16
[7b939de8] part of check-in [704bb9a3] Ensure that the NULL-scan pass counter is initialized when a ORDER BY NULLS LAST is used on the right table of a LEFT JOIN. Ticket [e12a0ae526bb51c7]. (check-in: [704bb9a3] user: drh branch: trunk, size: 97522)
2020-01-29
15:03
[f5df56e3] part of check-in [dcb48387] Fix a problem with the processing of IN(...) constraints handled by virtual table implementations that do not set the "omit" flag when the virtual table column contains at least one NULL value. (check-in: [dcb48387] user: dan branch: trunk, size: 97426)
2020-01-12
22:38
[ec8870d6] part of check-in [3e3c60d8] Better than removing the incorrect assert() is to change it into a testcase() together with a comment indicating where an appropriate test case can be found, and the ticket that provoked the change. Ticket [614b25314c766238] (check-in: [3e3c60d8] user: drh branch: trunk, size: 97380)
22:20
[3f7b0f73] part of check-in [6a999c5a] Remove an incorrect assert(). Fix for ticket [614b25314c766238] (check-in: [6a999c5a] user: drh branch: trunk, size: 97202)
2020-01-04
16:55
[75ad6cbb] part of check-in [95ef6896] Fix a problem where the loop for the RHS of a LEFT JOIN uses values from an IN() clause as the second or subsequent field of an index. (check-in: [95ef6896] user: dan branch: trunk, size: 97324)
2020-01-02
00:45
[b8acf97f] part of check-in [7bfd42f1] The sqlite3WhereEnd() call now unwinds all Expr modifications made by the sqlite3WhereBegin(). (check-in: [7bfd42f1] user: drh branch: trunk, size: 97368)
2019-12-29
00:52
[a987d22b] part of check-in [21ef6e99] Add the OP_FinishSeek opcode which completes an OP_DeferredSeek if the seek has not already completed. Also add the sqlite3WhereUsesDeferredSeek() interface to the query planner. The UPDATE implementation adds an OP_FinishSeek before running the final OP_Insert if one is needed. Ticket [ec8abb025e78f40c] and also an assertion fault reported by Yongheng. (check-in: [21ef6e99] user: drh branch: trunk, size: 96755)
2019-12-28
18:08
[3c9b185c] part of check-in [82be135d] Change an assert() in where.c to a testcase() macro, since the condition may be false. This was a problem with the assert() only, there is no bug in release builds that omit assert(). (check-in: [82be135d] user: dan branch: trunk, size: 96726)
16:20
[8f4b83ef] part of check-in [9421b442] Disable early coding of transitive constraints at the end of each loop in the WHERE clause processing if the loop being coded is for a LEFT JOIN, even if the loop is part of an OR-clause optimization for virtual tables. Test cases in TH3. (check-in: [9421b442] user: drh branch: trunk, size: 96725)
14:33
[65e1df2a] part of check-in [c4d5b75c] Further improvements to .wheretrace during loop code generation. (check-in: [c4d5b75c] user: drh branch: trunk, size: 96686)
14:07
[d074abcc] part of check-in [59cc46e5] New enhancements to .wheretrace. The 0x20000 flag shows the WHERE clause before and after coding each loop. The 0x800 flag shows status at the start and at the end of each loop. An extra "C" tag is shown on coded terms. (check-in: [59cc46e5] user: drh branch: trunk, size: 96505)
2019-12-26
00:20
[d42d3e0f] part of check-in [e5fd8b50] Disable the optimization that tries to pull the value of an expression from an index on that expression if the expression is a constant. (check-in: [e5fd8b50] user: drh branch: trunk, size: 95449)
2019-12-23
14:20
[bb58d5e6] part of check-in [0b1dbd60] For expressions like (x, y) IN (SELECT ...) where the SELECT uses window-functions, require that all columns on the LHS be indexed before an index can be used. Fix for [d9ed4ebe]. (check-in: [0b1dbd60] user: dan branch: trunk, size: 95393)
2019-12-22
18:55
[c4cb79b7] part of check-in [56539e1c] Fix to the optimization of check-in [a47efb7c8520a011] that reads the values of expressions used in an index-on-expression directly from the index rather than recomputing the value. If the expression has a top-level COLLATE or unlikely() operator, be sure to clear the corresponding flags prior to converting it into a TK_COLUMN expression. Failure to do this is most likely harmless in production, but might cause an assertion fault in debugging builds. Ticket [b0cb8aff561a6dcd]. Test cases in TH3. (check-in: [56539e1c] user: drh branch: trunk, size: 96484)
17:32
[9c274ea8] part of check-in [8c856404] Ensure sqlite3WindowRewrite() is called on a SELECT statement before any terms aremoved from it as part of IN() clause processing. Fix for [f00d096ca]. (check-in: [8c856404] user: dan branch: trunk, size: 96331)
2019-12-20
22:46
[9c2757cb] part of check-in [056bb8dc] Do not try to access a generated column through an index if the collating sequence for the generated column is non-standard. Part 2 of ticket [e0a8120553f4b082] (check-in: [056bb8dc] user: drh branch: trunk, size: 95232)
2019-12-09
14:34
[7efa97f4] part of check-in [e3398c5f] Fix a gramfuzz find. If a partial index that does not reference any column of its table is used by an UPDATE statement in one-pass mode, then avoid the use of OP_DeferredSeek since the seek might not be resolved prior to the OP_Delete and OP_Insert that implement the UPDATE. (check-in: [e3398c5f] user: drh branch: trunk, size: 94701)
2019-11-21
18:28
[909325b9] part of check-in [8b12e95f] Fix a problem that comes up when using generated columns that evaluate to a constant in an index and then making use of that index in a join. (check-in: [8b12e95f] user: drh branch: trunk, size: 94677)
2019-11-06
19:25
[9b84737f] part of check-in [7bc8205d] Minor simplification to the changes from check-in [36c11ad51f]. (check-in: [7bc8205d] user: mistachkin branch: trunk, size: 94562)
17:31
[d1b6cfac] part of check-in [36c11ad5] Fix the OP_DeferredSeek index-to-table column map in P4 so that it works with generated columns. Ticket [ce22a07731530118] (check-in: [36c11ad5] user: drh branch: trunk, size: 94577)
2019-11-04
12:49
[4b651775] part of check-in [5710845b] Changes an unreachable testcase() into an assert(). (check-in: [5710845b] user: drh branch: trunk, size: 94460)
2019-11-03
00:07
[123cd05e] part of check-in [3be19e11] The optimization of check-in [9b2879629c34fc0a] is incorrectly reasoned. The WHERE clause of the partial index might not be true if the table of the partial index is the right table of a left join. So disable the optimization in that case. Ticket [623eff57e76d45f6] (check-in: [3be19e11] user: drh branch: trunk, size: 94290)
2019-10-24
21:02
[28a3f27b] part of check-in [b99d5701] The previous fix was incomplete. It is also necessary to disable the Expr.y.pTab field when making the translation. (check-in: [b99d5701] user: drh branch: generated-columns, size: 93991)
20:29
[c491ae0c] part of check-in [e0f7e321] Fix handling of covering indexes that use virtual columns. (check-in: [e0f7e321] user: drh branch: generated-columns, size: 93966)
2019-10-19
13:29
[d96190c0] part of check-in [27ab41c9] Refactor names of column index transformation functions, for clarity. Get generated columns working with ALTER TABLE RENAME COLUMN. (check-in: [27ab41c9] user: drh branch: generated-columns, size: 92675)
2019-10-18
12:52
[b9bb13fc] part of check-in [e8426acb] Claw back some performance from the sqlite3ExprGetColumnOfTable() routine. (check-in: [e8426acb] user: drh branch: generated-columns, size: 92660)
2019-10-16
12:18
[39df666a] part of check-in [11d472c1] Initial experimental code for generated column support. Non-functional. (check-in: [11d472c1] user: drh branch: generated-columns, size: 92670)
2019-10-15
19:01
[57d034a0] part of check-in [7248e347] Formatting change on a multi-line conditional, for improved clarity. No logic changes. (check-in: [7248e347] user: drh branch: trunk, size: 92661)
2019-10-14
20:32
[e6173659] part of check-in [bc751fb6] Futher improvements to the IN operator for row-values on virtual tables. (check-in: [bc751fb6] user: drh branch: trunk, size: 92664)
15:15
[fde87356] part of check-in [aa57d7ab] Fix a problem with row-value IN(...) operators and virtual tables. (check-in: [aa57d7ab] user: dan branch: trunk, size: 92550)
2019-08-30
23:56
[b27b95cb] part of check-in [e0d909c7] When the affinity of a table column is INT or REAL, make the affinity of corresponding index columns NUMERIC. This increases the precision of index lookups for large numbers so that it matches the precision of ordinary comparison operators. Ticket [40812aea1fde9594] (check-in: [e0d909c7] user: drh branch: trunk, size: 92553)
2019-08-23
17:09
[535c8e22] part of check-in [bfe79378] Revise the VDBE comments for NULL-scan so that they also work make sense when reading a NULLS FIRST plan. (check-in: [bfe79378] user: drh branch: nulls-last, size: 92484)
17:00
[3bed0f37] part of check-in [1383680d] Additional simplifications of the WHERE loop code generator logic for NULLS LAST. (check-in: [1383680d] user: drh branch: nulls-last, size: 92484)
16:12
[f8ba8588] part of check-in [e3ed2f49] Simplification of the WHERE loop code generator for NULLS LAST saves a few CPU cycles and about a hundred bytes of code space. (check-in: [e3ed2f49] user: drh branch: nulls-last, size: 92438)
13:32
[c02ff23e] part of check-in [bf875e1a] Invert the meaning of the regBignull flag so that it is 1 when doing the normal scan and 1 when scanning nulls. This enables the re-do jump at the bottom of the loop to be coded with a single OP_IfNotZero opcode, rather than a sequence of OP_If, OP_Integer, OP_Goto. (check-in: [bf875e1a] user: drh branch: nulls-last, size: 93058)
13:08
[1700806b] part of check-in [649b08ea] Extra VDBE comments in the NULLS LAST logic provide landmarks to help understand the EXPLAIN output. (check-in: [649b08ea] user: drh branch: nulls-last, size: 93046)
2019-08-22
21:13
[f8005a06] part of check-in [d3531f5b] Add additional VDBE coverage macros. (check-in: [d3531f5b] user: drh branch: nulls-last, size: 92872)
2019-08-21
15:41
[b8f285f9] part of check-in [6153bcf4] Update this branch with latest trunk changes. (check-in: [6153bcf4] user: dan branch: nulls-last, size: 91448)
2019-08-20
11:43
[e1131fe9] part of check-in [511da081] Retain the affinity of an expression in a WHERE clause when it is transformed to a reference to an index column on the same expression. Fix for [f043b113]. (check-in: [511da081] user: dan branch: trunk, size: 91179)
2019-08-17
17:55
[81c5d1eb] part of check-in [b49df1fe] Fix problem with DESC indexes on this branch. (check-in: [b49df1fe] user: dan branch: nulls-last, size: 91399)
2019-08-16
21:07
[58889def] part of check-in [81069d71] Add support for using indexes for some ORDER BY clauses that use non-default NULL handling. Still some problems on this branch. (check-in: [81069d71] user: dan branch: nulls-last, size: 91372)
2019-08-06
14:37
[cf885ea2] 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: 91130)
2019-08-03
19:06
[5dd20651] part of check-in [1bd4b97d] Strengthen an assert() in the WHERE clause code generator for the min/max optimization. (check-in: [1bd4b97d] user: drh branch: trunk, size: 91026)
16:37
[b45c98f2] part of check-in [d465c3ee] Fix a problem with queries of the form "SELECT min(<expr>) ... WHERE <expr>=?" where there is an index on <expr>. Fix for [71e183ca]. (check-in: [d465c3ee] user: dan branch: trunk, size: 91001)
2019-08-02
18:43
[52451ce3] part of check-in [a7277ed0] If a query like "SELECT min(a), b FROM t1" visits no rows where "a" is not null, extract a value for "b" from one of the rows where "a" is null. Possible fix for ticket [41866dc37]. (check-in: [a7277ed0] user: dan branch: tkt-41866dc37, size: 90949)
2019-05-07
17:47
[37a10042] part of check-in [8b6691f6] Strive to prevent harmless compiler warnings in GCC 4.8.5. (check-in: [8b6691f6] user: drh branch: trunk, size: 89899)
2019-04-19
13:38
[0e766729] part of check-in [7713996a] Streamline the processing of the AND operator. Slightly smaller and faster. (check-in: [7713996a] user: drh branch: trunk, size: 89896)
2019-04-05
20:56
[83be72e8] part of check-in [d2728192] Eliminate the tool/addopcodes.tcl script. The purpose of that script was to keep the number of parser codes below 256 in order to save parser table space. But we have long since blown through that ceiling so the addopcodes.tcl script was just needless complexity. There is no longer any reason to keep it around. (check-in: [d2728192] user: drh branch: trunk, size: 89888)
2019-03-30
20:37
[9572aab9] part of check-in [b5f72f10] Fix issues with the previous check-in and add more VDBE branch coverage testing macros. (check-in: [b5f72f10] user: drh branch: oops, size: 89550)
2019-03-18
10:30
[6fa4056c] part of check-in [c2f50aa4] Fix a typo in a comment. No changes to code. (check-in: [c2f50aa4] user: drh branch: trunk, size: 89497)
2019-03-01
18:07
[ce7b21e1] part of check-in [9b287962] In a query that uses a partial index, the expression that is the WHERE clause of the partial index must always be true. Use this fact to avoid evaluating identical terms in the WHERE clause of the query. (check-in: [9b287962] user: drh branch: trunk, size: 89497)
2019-02-23
00:08
[06184864] part of check-in [90c5a17c] Remove a testcase() macro which is now unreachable due to the contraction of the use of IN_INDEX_ROWID. (check-in: [90c5a17c] user: drh branch: tkt-df46dfb631, size: 88388)
2019-02-22
21:33
[cdeb7c70] part of check-in [0d456456] Check-in [fa792714ae62fa980] is not a valid fix for ticket [df46dfb631f75694], as the new test case in this check-in demonstrates. The fix here causes test cases for the [df46dfb631f75694] bug to fail again, so this check-in is on a branch. A new fix is needed for [df46dfb631f75694]. (check-in: [0d456456] user: drh branch: tkt-df46dfb631, size: 88463)
2019-02-20
12:52
[5ee878f7] part of check-in [fa792714] When an IN operator drives a query loop, mark it as "CODED" so that it will not be used afterwards for a (pointless) membership test. This is a better fix for ticket [df46dfb631f75694] than the previous fix that is now on a branch as it preserves the full optimization of check-in [e130319317e76119]. (check-in: [fa792714] user: drh branch: trunk, size: 88403)
2019-02-08
04:15
[a571d8d7] part of check-in [440a7cda] Do not do the optimization that attempts to pull expression values from an index on that expression when processing a multi-index OR (see check-in [a47efb7c8520a0111]) because the expression transformations that are applied become invalid when the processing moves off of the current index and on to the next index. Fix for ticket [4e8e4857d32d401f]. (check-in: [440a7cda] user: drh branch: trunk, size: 88369)
2018-12-31
18:30
[89d2ec66] part of check-in [9fb646f2] Merge enhancements and bug fixes from trunk. (check-in: [9fb646f2] user: drh branch: reuse-subqueries, size: 88081)
2018-12-29
02:26
[f9f790fc] 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: 88093)
2018-12-25
00:15
[daade831] part of check-in [3c2ad0e9] Increase the number of parameters to sqlite3WhereCodeOneLoopStart() to encourage the compiler to inline that routine within sqlite3WhereBegin(). This gives a performance improvement. (check-in: [3c2ad0e9] user: drh branch: reuse-subqueries, size: 88063)
2018-12-24
20:21
[3e948cba] part of check-in [7153552b] Improvements to EXPLAIN QUERY PLAN formatting. The MULTI-INDEX OR now shows a separate "INDEX" subtree for each index. SCALAR SUBQUERY entries provide a subquery number that is related back to the .selecttrace output. (check-in: [7153552b] user: drh branch: reuse-subqueries, size: 88209)
14:30
[538ca683] part of check-in [e53781f5] Restore a line of code that was previously commented out for debugging. (check-in: [e53781f5] user: drh branch: reuse-subqueries, size: 88074)
02:34
[e819fc8e] part of check-in [6c44838a] Experimental code that tries to put the computation of subqueries inside a subroutine, and reuse that subroutine if the same subquery is evaluated more than once. Current code does not work for CHECK constraints. (check-in: [6c44838a] user: drh branch: reuse-subqueries, size: 88076)
2018-12-23
21:27
[1945ccec] part of check-in [2b6494b1] Split the code generation for the RHS of IN operators and for SELECT and EXISTS expressions into two separate subroutines, because there is now little commonality between those to functions. This is intended to help make the code easier to read and maintain. (check-in: [2b6494b1] user: drh branch: trunk, size: 88075)
2018-11-05
13:35
[cf6d3ac7] part of check-in [1309c84a] Fix a assert() in the query planner that can arise when doing row-value operations on a PRIMARY KEY that contains duplicate columns. Ticket [1a84668dcfdebaf12415d]. (check-in: [1309c84a] user: drh branch: branch-3.25, size: 88030)
2018-11-03
13:11
[c45f03ae] part of check-in [dcb8c735] Fix a assert() in the query planner that can arise when doing row-value operations on a PRIMARY KEY that contains duplicate columns. Ticket [1a84668dcfdebaf12415d]. (check-in: [dcb8c735] user: drh branch: trunk, size: 88032)
2018-09-20
19:02
[3df0a541] 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: 88001)
2018-09-19
20:14
[ab599217] 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: 88518)
17:24
[3b944b6d] part of check-in [8487f84a] Fix an issue in virtual table handling associated with the new Expr.x.pRight field. (check-in: [8487f84a] user: drh branch: expr-simplify, size: 88512)
14:54
[4c3ec236] 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: 88506)
2018-09-18
21:35
[75a3b20d] 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: 88049)
2018-09-12
00:21
[4f88f5b3] part of check-in [f578e62a] Fix a harmless compiler warning that arose from the ENABLE_CURSOR_HINTS fix of check-in [0af18674ca5b34e67e] (check-in: [f578e62a] user: drh branch: trunk, size: 87999)
2018-09-11
13:38
[e04303b8] part of check-in [e7033104] Fix a problem causing ENABLE_CURSOR_HINTS builds to segfault. (check-in: [e7033104] user: dan branch: trunk, size: 88039)
2018-09-10
19:27
[c1fa3f6f] part of check-in [d879c47d] Fix a minor problem causing an incorrect cursor-hint to be generated in some cases. (check-in: [d879c47d] user: dan branch: trunk, size: 88096)
2018-08-04
15:53
[2b6cd1b2] 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: 88136)
2018-08-03
23:04
[9085b9d4] 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: 88135)
15:58
[eb558ea9] part of check-in [fa94b49e] Fix the OP_SeekRowid opcode so that it has no type-change side-effects on the key register in P3. This fixes an obcure problem that arises when doing equi-joins between a table with a TEXT column against another table with an INTEGER PRIMARY KEY. The original problem was discovered when OSSFuzz created such a query and hit an assert() in OP_VerifyTabCol that was specifically designed to catch these kinds of errors at run-time. Test cases for this fix are in TH3. (check-in: [fa94b49e] user: drh branch: trunk, size: 88569)
2018-07-27
16:57
[2c552dfe] 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: 88711)
2018-07-10
19:48
[fe23a552] 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: 88671)
2018-06-07
17:32
[3317f2b0] part of check-in [439c8162] Remove the NextIfOpen and PrevIfOpen opcodes which are no longer needed when the IN-early-out optimization is working. (check-in: [439c8162] user: drh branch: multikey-opt-idea, size: 88670)
16:07
[06950dc0] part of check-in [085e8637] Test cases. (check-in: [085e8637] user: drh branch: multikey-opt-idea, size: 88682)
14:59
[5f005bbd] part of check-in [522f1eac] Add the WHERE_IN_EARLYOUT flag and use it to clarify the logic of this optimization. (check-in: [522f1eac] user: drh branch: multikey-opt-idea, size: 88673)
2018-06-05
20:45
[12d88d01] part of check-in [6bf251af] Add the OP_IfNoHope and OP_SeekHit opcodes used to reduce the number of unnecessary sqlite3BtreeMovetoUnpacked() calls when checking for an early exit on IN-operator loops. Futher optimizations are likely possible here. (check-in: [6bf251af] user: drh branch: multikey-opt-idea, size: 88614)
15:16
[f941a484] part of check-in [87a9fc50] Use an OP_NotFound opcode to cancel futile IN operators early. The current implementation is suboptimal because it always runs teh OP_NotFound. This still needs to be enhanced to only do the OP_NotFound if no results have been seen on the current loop. (check-in: [87a9fc50] user: drh branch: multikey-opt-idea, size: 88410)
2018-05-30
00:54
[49256d67] part of check-in [92f0fe15] Demonstration code on a possible technique for optimizing the use of IN operator on columns to the right of multicolumn indexes. If the OP_Noop generated where were really a new opcode that checked to see if there existed any entries in the index with a matching prefix, it might prevent unnecessary iterations of the IN operator. (check-in: [92f0fe15] user: drh branch: multikey-opt-idea, size: 88281)
2018-05-09
13:46
[728c7f70] part of check-in [87f261f0] Make the internal dynamic string interface available to extensions using the new sqlite3_str object and its associated methods. This is mostly just a renaming of internal objects and methods to use external names, through there are a few small wrapper functions. (check-in: [87f261f0] user: drh branch: trunk, size: 88216)
2018-05-07
11:37
[414ec420] part of check-in [374d8e26] Fix harmless compiler warnings associated with the new EXPLAIN QUERY PLAN logic. (check-in: [374d8e26] user: drh branch: trunk, size: 88200)
2018-05-04
00:39
[300f945e] part of check-in [75ac7b4e] Make a separate limb in the EXPLAIN QUERY PLAN output for the various lines associated with the OR-optimization. (check-in: [75ac7b4e] user: drh branch: trunk, size: 88372)
2018-05-02
14:24
[3368f079] 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: 88286)
00:33
[13b831d2] 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: 88284)
2018-04-24
18:53
[3cb591fe] part of check-in [ce35e39c] Fix a problem with processing "LEFT JOIN tbl ON tbl.a = ? AND (tbl.b=? OR tbl.c=?)" in cases where there are indexes on both tbl(a, b) and tbl(a, c). (check-in: [ce35e39c] user: dan branch: trunk, size: 88303)
14:18
[52225f6b] part of check-in [45247c7f] Add a hyperlink to the ticket on the code comment for the fix to ticket [7fa8049685b50b5aeb0c2]. (check-in: [45247c7f] user: drh branch: trunk, size: 88145)
14:05
[4de72266] part of check-in [b8ef967a] Do not attempt to read values from indexes-on-expressions if the index is on the RHS of a LEFT JOIN. This won't work if the index cursor points at a null-row. Fix for [7fa80496]. (check-in: [b8ef967a] user: dan branch: trunk, size: 88095)
2018-04-02
00:16
[982b7450] part of check-in [b850dd15] Better solution to the LIKE problem from the previous check-in that works even if the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option is used. (check-in: [b850dd15] user: drh branch: trunk, size: 87730)
2018-03-31
23:28
[e75c351b] part of check-in [fc06ddd4] Fix a logic error discovered by OSSFuzz that can cause an assert() fault if a LIKE operator is used on an INTEGER PRIMARY KEY. (check-in: [fc06ddd4] user: drh branch: trunk, size: 87747)
2018-03-19
16:59
[051ee5c0] part of check-in [16c22ff8] Show symbolic SELECT names in EXPLAIN QUERY PLAN output when compiling with SQLITE_ENABLE_SELECTTRACE. (check-in: [16c22ff8] user: drh branch: EQP-improvements, size: 87869)
2018-02-13
18:48
[e1aaadd8] part of check-in [f3112e67] Fix an incorrect table lookup used to find the appropriate search operator for a WHERE clause on a row-value inequality. The incorrect table lookup was causing an incorrect answer for the less-than operator. Fix for ticket [f484b65f3d6230593c34f11] (check-in: [f3112e67] user: drh branch: trunk, size: 87718)
2018-01-23
16:38
[cb360c51] part of check-in [14dfd96f] Fix a bug causing spurious "sub-select returns N columns expected 1" errors in join queries with a term like "(a, b) IN (SELECT ...)" in the WHERE clause. Ticket [7310e2fb3d046a5f5]. (check-in: [14dfd96f] user: dan branch: trunk, size: 87369)
2017-12-21
21:41
[af1e7915] part of check-in [afbbfff7] Fix SQLITE_DBCONFIG_TRIGGER_EQP so that it works even if SQLITE_DEBUG is not defined. (check-in: [afbbfff7] user: drh branch: trunk, size: 87211)
2017-12-13
18:01
[ff2f0790] part of check-in [65754dc3] Correctly invalidate a column cache line when it is overwritten with NULL. Fix for ticket [123c9ba32130a6c9d432]. (check-in: [65754dc3] user: drh branch: trunk, size: 87189)
2017-11-17
21:01
[611fcabd] part of check-in [723f1be3] Improved fix for ticket [da78413751863] that does not require disabling the query flattener as was done in [005d5b870625]. This also makes the code generator for vector IN operators a little easier to understand. (check-in: [723f1be3] user: drh branch: trunk, size: 87135)
17:32
[8605c0ca] part of check-in [00c32831] New assert() statements in the rowvalue IN expression processing. (check-in: [00c32831] user: drh branch: trunk, size: 86273)
2017-10-31
03:40
[4a117dd5] part of check-in [1c80c75d] Remove unnecessary NEVER() and ALWAYS() conditionals. (check-in: [1c80c75d] user: drh branch: trunk, size: 85231)
2017-09-09
19:41
[e8c2ece5] part of check-in [34c8e952] Enhance the vtab interface to handle IS, !=, IS NOT, IS NULL and IS NOT NULL constraints. (check-in: [34c8e952] user: dan branch: vtab-extra-ops, size: 85211)
2017-08-25
19:51
[d246d19f] part of check-in [1783c54c] Fix a few over-length source code lines. No functional changes. (check-in: [1783c54c] user: drh branch: trunk, size: 85206)
2017-07-27
20:24
[e7be3b7f] part of check-in [f5d330f4] Enhance the like optimization so that it works with an ESCAPE clause. (check-in: [f5d330f4] user: drh branch: trunk, size: 85206)
2017-07-10
16:38
[c0c4c315] part of check-in [0ca7474f] Additional debugging Noop-comment in the constraint generator when wheretrace is enabled. (check-in: [0ca7474f] user: drh branch: defer-where-subqueries, size: 85206)
15:17
[cd923f92] part of check-in [a4fc9811] Fix another problem on this branch. (check-in: [a4fc9811] user: dan branch: defer-where-subqueries, size: 85004)
14:39
[39bddb38] part of check-in [7d3cb39f] Fix a problem causing non-covered WHERE terms to be evaluated before covered WHERE terms. (check-in: [7d3cb39f] user: dan branch: defer-where-subqueries, size: 84997)
14:33
[3eb21308] part of check-in [1f9c1f35] When testing non-indexed WHERE constraints, test those that involve correlated sub-queries last of all. This increases the chances of not having to run the sub-query at all. (check-in: [1f9c1f35] user: dan branch: defer-where-subqueries, size: 84997)
2017-06-24
18:10
[f17f5d51] 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: 84556)
2017-06-02
15:44
[339ee802] part of check-in [ab33d299] Change the name of the OP_Seek opcode into OP_DeferredSeek for better clarity of function. No functional code changes. (check-in: [ab33d299] user: drh branch: trunk, size: 84553)
2017-04-29
14:56
[8ad48867] part of check-in [91dfb61a] Minor size and performance improvements to the push-down optimization. (check-in: [91dfb61a] user: drh branch: pushdown-optimization, size: 84533)
2017-04-28
19:59
[878a8c75] part of check-in [afe68f0a] Within a loop that uses a non-covering index test, test non-indexed terms that can be tested without seeking the main table cursor before those that cannot. (check-in: [afe68f0a] user: dan branch: pushdown-optimization, size: 84421)
2017-04-11
01:01
[943e32e9] 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: 83931)
2017-04-07
19:41
[38d171e3] 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: 83369)
2017-02-18
20:05
[373faba5] 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: 81474)
2017-02-15
22:36
[677e9541] part of check-in [58797e9b] Query planner optimization to detect empty tables in a join early and bail out without doing excess work. (check-in: [58797e9b] user: drh branch: trunk, size: 81444)
2017-01-28
19:45
[99a8ced1] part of check-in [dc555b10] Avoid redundant table b-tree cursor seeks in UPDATE statements that use the two-pass strategy. (check-in: [dc555b10] user: dan branch: trunk, size: 81144)
2016-12-07
20:22
[e04ac8f2] part of check-in [3954f837] The use P4_DYNAMIC in place of the P4_MPRINTF operand type. (check-in: [3954f837] user: drh branch: trunk, size: 81034)
2016-12-06
22:47
[9a3b1034] 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: 81034)
2016-11-23
21:01
[e895f34f] part of check-in [27438fb4] Disable the query flattener optimization for SELECT statements that are on the RHS of vector IN operators. This is a hack that fixes the bug described in ticket [da7841375186386c]. A better solution that does not disable the query flattener is needed, but this will server for the time being. (check-in: [27438fb4] user: drh branch: branch-3.15, size: 80995)
2016-11-17
13:13
[4ea29899] part of check-in [005d5b87] Disable the query flattener optimization for SELECT statements that are on the RHS of vector IN operators. This is a hack that fixes the bug described in ticket [da7841375186386c]. A better solution that does not disable the query flattener is needed, but this will server for the time being. (check-in: [005d5b87] user: drh branch: trunk, size: 81040)
2016-11-09
00:10
[507738d9] 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: 80905)
2016-10-10
13:29
[717a6529] part of check-in [71797ba4] Make sure indexes on expressions skip over initial NULL values in the index. Fix for ticket [4baa464912129477f3c9] (check-in: [71797ba4] user: drh branch: trunk, size: 80860)
2016-10-05
20:10
[d07f784c] part of check-in [2dde3375] Fix harmless compiler warnings. (check-in: [2dde3375] user: drh branch: trunk, size: 80832)
2016-10-03
01:21
[81da7e9b] part of check-in [ea8affa9] Allocate Parse objects off of the stack where appropriate for a substantial performance increase and a size reduction. (check-in: [ea8affa9] user: drh branch: trunk, size: 80902)
2016-09-16
16:30
[e412e09a] part of check-in [a92aee55] Fix a problem causing incorrect code to be generated for IN constraints like "a IN (1, 2, 3)" where column "a" is a rowid column with an extra UNIQUE index created on it. Ticket [0eab1ac759]. (check-in: [a92aee55] user: dan branch: trunk, size: 81022)
15:42
[c23f9b26] part of check-in [a49bc0a8] Replace a faulty assert() with a testcase() to assure the condition is tested. Ticket [0eab1ac7591f]. (check-in: [a49bc0a8] user: drh branch: trunk, size: 81045)
2016-09-07
19:37
[d172dcf9] part of check-in [7f2c5c9e] Fix a problem handling expressions like "(a, b) IN (SELECT ... ORDER BY 1, 2)" when there is an index on "a" but not "b". (check-in: [7f2c5c9e] user: dan branch: rowvalue, size: 81010)
13:30
[43522ac8] part of check-in [bbab9621] Simplify the affinity handling logic in codeAllEqualityTerms(). Logically the same, just a little easier to read and understand. (check-in: [bbab9621] user: drh branch: rowvalue, size: 80301)
12:20
[019a050e] part of check-in [2d1983ff] Correct affinity computations for a SELECT on the RHS of an IN operator. Fix for ticket [199df4168c]. (check-in: [2d1983ff] user: drh branch: branch-3.14, size: 74424)
2016-09-06
17:13
[b0d4febd] part of check-in [70319c3d] Avoid unnecessary memory allocations for aiMap in codeEqualityTerm(). (check-in: [70319c3d] user: drh branch: rowvalue, size: 80446)
16:53
[4bd3e4c3] part of check-in [c6e528c1] Avoid a NULL pointer deref in codeAllEqualityConstraints() following an OOM. (check-in: [c6e528c1] user: drh branch: rowvalue, size: 80418)
16:33
[ea92c232] part of check-in [bd5a3420] Simplify the fix in commit [7d9bd22c]. (check-in: [bd5a3420] user: dan branch: rowvalue, size: 80407)
15:25
[49125c4d] part of check-in [b7e710e4] Fix the header comment on codeEqualityTerm(). (check-in: [b7e710e4] user: drh branch: rowvalue, size: 80219)
14:58
[7279bb68] part of check-in [231c72d9] Fix a problem handling (a, b) IN (SELECT ...) expressions when there is an index on just one of "a" or "b". (check-in: [231c72d9] user: dan branch: rowvalue, size: 79912)
2016-09-03
15:31
[8a9a53cb] part of check-in [f5e49855] Consider the affinity of "b" when using an "a IN (SELECT b ...)" expression with an index on "a". Fix for [199df416]. (check-in: [f5e49855] user: dan branch: rowvalue, size: 79556)
2016-08-26
18:17
[ee7b5353] part of check-in [87d40195] Fix a post-OOM crash in updateRangeAffinityStr(). Add several ALWAYS() macros on unreachable branches. (check-in: [87d40195] user: drh branch: rowvalue, size: 79278)
17:54
[71de4d2d] part of check-in [b34413ac] Fix a problem with affinity changes and vector range comparisons. (check-in: [b34413ac] user: dan branch: rowvalue, size: 79169)
2016-08-24
12:22
[5a5528c3] part of check-in [f41a0391] Fix a buffer overrun in the code for handling IN(...) operators when the LHS of the operator contains indexed columns or expressions. (check-in: [f41a0391] user: dan branch: rowvalue, size: 78538)
00:51
[0c99e2e9] part of check-in [1e3bc369] The previous OOM fix was bad. Back it out and replace it with a better one. (check-in: [1e3bc369] user: drh branch: rowvalue, size: 78528)
2016-08-20
00:07
[0c790c42] part of check-in [d8feea7d] Change the way TK_SELECT_COLUMN is handled so that the subquery is only generated once even if part of the vector comparison is used for indexing and the other part is now. This change also is a pathway to vector assignment in UPDATE statements. (check-in: [d8feea7d] user: drh branch: rowvalue, size: 78465)
2016-08-19
18:28
[f3fd16b9] part of check-in [d07be5af] Fix an obsolete comment on codeEqualityTerm(). No changes to code. (check-in: [d07be5af] user: drh branch: rowvalue, size: 79503)
2016-08-18
19:04
[916b4510] part of check-in [936146b1] Fix a SQL NULL handling bug in the vector IN operator code generation. (check-in: [936146b1] user: drh branch: rowvalue, size: 79517)
2016-08-08
20:15
[92202261] part of check-in [156a41f3] Fix some cases involving row values and virtual tables. (check-in: [156a41f3] user: dan branch: rowvalue, size: 79494)
18:42
[c2464557] part of check-in [bb606511] Fix the EXPLAIN QUERY PLAN output for row value range constaints that use an index. (check-in: [bb606511] user: dan branch: rowvalue, size: 79319)
2016-08-02
17:45
[c2392fa3] part of check-in [339f85f4] Fix SQLITE_OMIT_SUBQUERY builds. (check-in: [339f85f4] user: dan branch: rowvalue, size: 78798)
2016-08-01
20:14
[c01c8af9] 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: 78717)
2016-07-30
16:39
[6131be0c] part of check-in [e9d9c6d4] Remove the EP_Vector expression flag. (check-in: [e9d9c6d4] user: dan branch: rowvalue, size: 78306)
2016-07-29
20:58
[e3159b1d] part of check-in [42607366] Fix some issues with vector range constraints and the column cache. Also vector range constraints and rowid columns. (check-in: [42607366] user: dan branch: rowvalue, size: 78283)
18:12
[e259a0b9] part of check-in [4dfebff2] Change the way "(a, b) = (SELECT *)" expressions are handled in where.c if there is an index on one of the columns only. (check-in: [4dfebff2] user: dan branch: rowvalue, size: 78024)
2016-07-26
18:15
[3aff7683] part of check-in [d4f3d52c] Merge latest trunk changes into this branch. (check-in: [d4f3d52c] user: dan branch: rowvalue, size: 77317)
18:06
[03fbaa63] part of check-in [061b8006] Fix where.c handling of "IN (SELECT ...)" expressions when the SELECT returns more than one result column. Also error handling for other row value constructor cases. (check-in: [061b8006] user: dan branch: rowvalue, size: 77292)
04:23
[99707d11] part of check-in [0e9f534f] Make sure affinity is applied correctly on lower-bound range constraints in the min() optimization. Fix for ticket [a0bac8b3c3d1bb]. (check-in: [0e9f534f] user: drh branch: apple-osx, size: 74087)
2016-07-23
20:24
[eb0f5e87] part of check-in [e2fd6f49] Allow vector IN(SELECT ...) expressions to use an index if either all the indexed columns are declared NOT NULL or if there is no difference between the expression evaluating to 0 and NULL (as in a WHERE clause). (check-in: [e2fd6f49] user: dan branch: rowvalue, size: 75228)
2016-07-10
19:35
[877ceb19] part of check-in [728c5aa4] Merge comment typo fixes from trunk. (check-in: [728c5aa4] user: mistachkin branch: rowvalue, size: 75225)
19:35
[11e38f5e] part of check-in [77c692a6] Fix typos in comments. No changes to code. (check-in: [77c692a6] user: mistachkin branch: trunk, size: 74062)
2016-07-09
20:23
[a66c589b] 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: 75224)
2016-06-20
17:22
[e20cb381] part of check-in [7455d932] Allow LIKE operators that appear in a WHERE clause to be included in the cursor-hint for a cursor on the rhs of a LEFT JOIN. (check-in: [7455d932] user: dan branch: cursor-hints, size: 74061)
2016-06-17
19:27
[c1b11ad0] part of check-in [998095ab] Include WHERE terms in the cursor-hint passed to a cursor opened for the rhs of a LEFT JOIN iff we can be sure that those terms will not evaluate to true if the LEFT JOIN generates a row of NULLs. (check-in: [998095ab] user: dan branch: cursor-hints, size: 73915)
14:33
[b9d5f7d8] part of check-in [2a2346b0] If a table is on the rhs of a LEFT JOIN, include only terms from the joins ON(...) clause in the cursor-hint passed via OP_CursorHint. (check-in: [2a2346b0] user: dan branch: cursor-hints, size: 72686)
2016-05-26
20:56
[ba71a4e4] part of check-in [ffe80a1b] Add a new OP_SeekRowid opcode, that combines the functions of OP_MustBeInt and OP_NotExists. This makes the code slightly smaller and faster. (check-in: [ffe80a1b] user: drh branch: trunk, size: 71645)
2016-05-19
18:56
[e3f18fcd] part of check-in [d0130584] Clean up the WHERE_* macros used for the wctrlFlags parameter on the sqlite3WhereBegin() interface, freeing up some bits to be used for other things. (check-in: [d0130584] user: drh branch: trunk, size: 71722)
2016-05-09
19:58
[d227fca7] part of check-in [da94a6e0] Omit the unnecessary WHERE_REOPEN_IDX flag in the WHERE interface. (check-in: [da94a6e0] user: drh branch: dev, size: 71852)
2016-05-06
20:23
[23fc19ca] part of check-in [3a695263] Simplification to the logic used to decide between OP_Seek and OP_NotExists. Use OP_NotExists for both DELETE and UPDATE. (check-in: [3a695263] user: drh branch: trunk, size: 71896)
16:06
[6e2da244] part of check-in [150dd09e] In the WHERE generator, when building code for a DELETE operation, make sure that seeks to the main table are not deferred. This is a better fix for the [16c9801ceba49] bug than the previous. (check-in: [150dd09e] user: drh branch: ticket-16c9801ce, size: 71942)
2016-05-02
10:25
[28951741] part of check-in [54c63b32] Improvements to the way the LIKE optimization is implemented, resulting in slightly smaller and faster code that is easier to test. (check-in: [54c63b32] user: drh branch: trunk, size: 71825)
2016-04-09
18:04
[8fdad9fb] part of check-in [6c56b3a0] Fix a problem in the code generator for joins on virtual tables where the outer loop of the join uses the IN operator. (check-in: [6c56b3a0] user: drh branch: trunk, size: 71090)
2016-03-08
01:11
[863aedf0] part of check-in [721ae51e] Add a NEVER() to the code generator. Change the parameter name "mExtra" to "mPrereq" in the query planner, to more closely reflect its meaning. (check-in: [721ae51e] user: drh branch: trunk, size: 70782)
00:39
[36ea3526] part of check-in [9805f6f8] Changes so that some assert()s in the virtual table query planner are correct even following an OOM error. (check-in: [9805f6f8] user: drh branch: trunk, size: 70775)
2016-03-07
19:08
[870f3e92] part of check-in [c9240086] Avoid a NULL pointer dereference following an OOM while generating code for IN operators on virtual tables. (check-in: [c9240086] user: drh branch: trunk, size: 70781)
2016-03-02
03:28
[3ca82043] part of check-in [1622623c] Allow the left-hand side of IN operators on virtual tables to have the aConstraintUsage[].omit flag clear. (check-in: [1622623c] user: drh branch: vtab-IN-opt, size: 70754)
2016-02-22
21:19
[39c1ef45] part of check-in [a3dcf6db] Clearer presentation of the logic. No functional changes. (check-in: [a3dcf6db] user: drh branch: skip-scan-improvement, size: 69016)
20:52
[19aa0189] part of check-in [38e837e6] Avoid an unnecessary seek operation on some corner-case skip-scans. (check-in: [38e837e6] user: drh branch: skip-scan-improvement, size: 68817)
2016-02-04
11:48
[791a784b] part of check-in [b787165b] Remove unnecessary sets of db->mallocFailed. (check-in: [b787165b] user: drh branch: trunk, size: 68732)
02:34
[f5229eb1] 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: 68718)
2016-02-01
13:58
[923f5d04] part of check-in [a17712bf] Fix a problem causing the OR/covering-index optimization to be disabled if compile time parameter SQLITE_MAX_ATTACHED were set to greater than 30. (check-in: [a17712bf] user: dan branch: trunk, size: 68736)
2016-01-30
16:59
[7ea737b1] part of check-in [9bec50a1] Merge the implementation of OP_IdxRowid and OP_Seek so that OP_Seek no longer requires the rowid register and a separate OP_IdxRowid call. Shorter and faster prepared statements result. (check-in: [9bec50a1] user: drh branch: trunk, size: 68725)
12:50
[ef0d7019] part of check-in [0bdb41c4] Simplification and size reduction to the printf logic. Remove the bFlags parameter from sqlite3VXPrintf() and sqlite3XPrintf(). Use sqlite3XPrintf() instead of sqlite3_snprintf() for rendering P4 values in EXPLAIN output. (check-in: [0bdb41c4] user: drh branch: trunk, size: 68812)
00:45
[3c4757ae] 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: 68836)
2016-01-29
19:29
[1b2a96c4] part of check-in [a323ac3a] Experimental attempt to make better use of covering indexes within OR queries. (check-in: [a323ac3a] user: dan branch: covering-or, size: 68806)
16:57
[22a7fee2] part of check-in [ab946039] Avoid unnecessary WHERE clause term tests when coding a join where one of the tables contains a OR constraint. (check-in: [ab946039] user: drh branch: OR-clause-improvement, size: 66909)
2016-01-16
15:12
[8dee26eb] part of check-in [a4258cd4] Use sqlite3VdbeAddOp4() rather than a separate sqlite3VdbeChangeP4() call, for a slightly smaller and faster binary. (check-in: [a4258cd4] user: drh branch: trunk, size: 66782)
2015-12-01
21:23
[dfbfe198] part of check-in [9e1d6d4c] Add the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option. (check-in: [9e1d6d4c] user: drh branch: trunk, size: 66811)
2015-11-05
20:25
[b45fe387] part of check-in [32e31b9b] The top of an index equality loop normally starts with OP_SeekGE and OP_IdxGT. This check-in adds a flag to OP_SeekGE such that it fails immediately if the key is not equal, then jumps over the OP_IdxGT, saving a call to the key comparison functions. Consider this check-in a proof-of-concept. It needs improvement before going on trunk. Some tests fail, but only because they new use fewer key comparisons than expected (which is a good thing!). (check-in: [32e31b9b] user: drh branch: seekeq-experiment, size: 66817)
2015-10-28
20:01
[4c96182e] part of check-in [b10ab59f] Make the internal sqlite3PExpr() interface responsive to the TKFLG_DONTFOLD flag on the operator parameter. (check-in: [b10ab59f] user: drh branch: trunk, size: 66426)
2015-10-16
20:53
[9aa20436] part of check-in [26fa091d] Merge recent enhancements from trunk. Version now 3.9.1. (check-in: [26fa091d] user: drh branch: cursor-hints, size: 66411)
2015-10-15
19:21
[b924b78a] 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: 60797)
2015-10-14
20:09
[4d60b2e8] part of check-in [29444149] Merge in all the 3.9.0 updates from trunk. (check-in: [29444149] user: drh branch: cursor-hints, size: 66548)
2015-10-10
14:41
[cdfff200] 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: 60934)
2015-09-29
17:20
[a32bf1f3] part of check-in [7d272aa6] Use symbolic names XN_ROWID and XN_EXPR in place of the (-1) and (-2) magic numbers in Index.aiColumn[]. Add asserts to help verify that Index.aiColumn[] is always used correctly. Fix one place in FK processing where Index.aiColumn[] was not being used correctly. (check-in: [7d272aa6] user: drh branch: trunk, size: 60883)
10:11
[a8723817] part of check-in [820c8044] Add tests for fts3 and onepass update/delete operations. Also fix a problem with onepass updates that do not affect any rows. (check-in: [820c8044] user: dan branch: vtab-onepass, size: 60873)
2015-09-24
15:06
[16f0d8b3] part of check-in [fbe63762] Merge trunk changes into the cursor-hints branch. (check-in: [fbe63762] user: drh branch: cursor-hints, size: 66458)
2015-09-19
18:08
[7660e1ad] part of check-in [5c31ee62] Fix compiler warnings. (check-in: [5c31ee62] user: drh branch: trunk, size: 60844)
2015-09-18
18:09
[5b534714] part of check-in [25f34cb9] Fix a crash that can occur with a skip-scan on an index with expressions when SQLITE_ENABLE_EXPLAIN_COMMENTS is defined. (check-in: [25f34cb9] user: drh branch: trunk, size: 60870)
2015-09-15
17:31
[c80f4c78] part of check-in [66fe0683] Merge enhancements from trunk. (check-in: [66fe0683] user: drh branch: cursor-hints, size: 66491)
2015-09-14
14:45
[186b4935] part of check-in [16e56bda] Use symbolic names ONEPASS_OFF, ONEPASS_SINGLE, and ONEPASS_MULTI for the various modes of the one-pass optimization. (check-in: [16e56bda] user: drh branch: trunk, size: 60877)
14:08
[91c50036] part of check-in [2edd2e5e] Fix a compiler warning and providing missing VdbeCoverage() calls. (check-in: [2edd2e5e] user: drh branch: trunk, size: 60865)
09:23
[780cccf1] part of check-in [166d5af8] Avoid calling sqlite3VdbeCursorMoveto() from more than one point in vdbe.c. Doing so prevents it from being inlined as part of OP_Column. (check-in: [166d5af8] user: dan branch: onepass-delete, size: 60840)
2015-09-03
14:39
[93fa794f] part of check-in [25ee3000] Merge enhancements from trunk. (check-in: [25ee3000] user: drh branch: cursor-hints, size: 66180)
14:18
[6ac85995] part of check-in [1ab10cbf] Merge enhancements from trunk. (check-in: [1ab10cbf] user: drh branch: index-expr, size: 60722)
13:46
[c0d9b1c7] 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: 60566)
2015-09-02
18:19
[e215fc02] 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: 60569)
16:51
[713306be] part of check-in [d1592d20] Small simplification to the EXPLAIN QUERY PLAN logic. (check-in: [d1592d20] user: drh branch: trunk, size: 60580)
15:37
[f749795d] part of check-in [82355e41] Use sqlite3XPrintf() instead of sqlite3StrAccumAppend() in a few places for better performance and a smaller footprint. (check-in: [82355e41] user: drh branch: trunk, size: 60643)
2015-09-01
18:31
[a9b88cb2] part of check-in [29570a60] Merge enhancements from trunk. (check-in: [29570a60] user: drh branch: cursor-hints, size: 66313)
2015-08-27
20:33
[b0bf45ca] part of check-in [73d361ce] Fix EXPLAIN QUERY PLAN output for indexed-expressions. Fix another obscure fault in the WHERE term scanner. (check-in: [73d361ce] user: drh branch: index-expr, size: 60855)
2015-08-25
19:20
[3d9113cc] part of check-in [1ee089a7] Use the sqlite3IndexColumnAffinity() routine to quickly and correctly find the affinity of an index column. (check-in: [1ee089a7] user: drh branch: trunk, size: 60699)
2015-08-20
23:45
[3be7fd91] part of check-in [b9927c87] Merge recent enhancements from trunk, including table-valued expressions. (check-in: [b9927c87] user: drh branch: cursor-hints, size: 66306)
2015-08-19
15:20
[69f19535] 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: 60692)
2015-08-18
15:58
[ec90321e] part of check-in [b5897bc0] Provide hints for all terms in a range constraint if there are any equality terms anywhere in the constraint. Range constraint terms are only omitted for a pure range constraint with no equality prefix. (check-in: [b5897bc0] user: drh branch: cursor-hints, size: 66297)
2015-08-17
17:19
[148c5dc2] part of check-in [142b048a] Avoid generating hints using constraints that are also used to initialize the cursor, since presumably the cursor already knows about those constraints. (check-in: [142b048a] user: drh branch: cursor-hints, size: 66259)
2015-08-14
18:50
[16045545] part of check-in [581e3d49] Fix the cursor hint mechanism so that it does the right thing for indexed lookups. (check-in: [581e3d49] user: drh branch: cursor-hints, size: 65524)
15:05
[3180ac64] part of check-in [fc3fb5cd] Refactor the sqlite3BtreeCursorHint() interface for improved maintainability. (check-in: [fc3fb5cd] user: drh branch: cursor-hints, size: 63583)
01:03
[28d83834] part of check-in [f0d428d1] Fix the CursorHint so that it includes the scan boundary constraints. On the expression text for the CursorHint opcode, show rowid correctly. (check-in: [f0d428d1] user: drh branch: cursor-hints, size: 63634)
2015-08-13
20:07
[00a5d751] 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: 63737)
2015-07-23
16:39
[5da50492] part of check-in [793e206f] The sqlite3ExprCodeGetColumn() is not guaranteed to put the result in the register requested. Fix the skip-scan code generator for WITHOUT ROWID tables so that it always checks the register and copies the result if it lands in the wrong register. Fix for ticket [8fd39115d8f46ece70e7d4b3]. (check-in: [793e206f] user: drh branch: trunk, size: 60683)
2015-06-08
22:59
[3f3152ec] 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: 60547)
2015-06-06
20:12
[0669481c] part of check-in [faa0e420] Split out the bulk of the actual VDBE code generation logic from where.c into a new file, leaving behind the analysis logic. This makes the original where.c smaller and hopefully easier to edit. (check-in: [faa0e420] user: drh branch: view-optimization, size: 60544) Added