/ Check-in [0cdae60e]
Login

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

Overview
Comment:Merge the fix for ticket [4e8e4857d32d401f], so that this branch now contains release 3.27.1 plus the extra patch to preserve ROWID values on VACUUM.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | apple-osx
Files: files | file ages | folders
SHA3-256: 0cdae60ed7920f29e4a092c07d0aab7a33db16e7d308fb5b0becb6bbe57e49ff
User & Date: drh 2019-02-08 14:59:03
Context
2019-02-20
13:23
Merge the latest performance enhancements and fixes from trunk. check-in: be71d1e2 user: drh tags: apple-osx
2019-02-08
14:59
Merge the fix for ticket [4e8e4857d32d401f], so that this branch now contains release 3.27.1 plus the extra patch to preserve ROWID values on VACUUM. check-in: 0cdae60e user: drh tags: apple-osx
04:15
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 tags: trunk
2019-02-07
19:28
Pull in the change that causes VACUUM to preserve rowid values. check-in: c9af2f71 user: drh tags: apple-osx
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/wherecode.c.

  1752   1752       ** into reference to index columns.
  1753   1753       **
  1754   1754       ** Do not do this for the RHS of a LEFT JOIN. This is because the 
  1755   1755       ** expression may be evaluated after OP_NullRow has been executed on
  1756   1756       ** the cursor. In this case it is important to do the full evaluation,
  1757   1757       ** as the result of the expression may not be NULL, even if all table
  1758   1758       ** column values are.  https://www.sqlite.org/src/info/7fa8049685b50b5a
         1759  +    **
         1760  +    ** Also, do not do this when processing one index an a multi-index
         1761  +    ** OR clause, since the transformation will become invalid once we
         1762  +    ** move forward to the next index.
         1763  +    ** https://sqlite.org/src/info/4e8e4857d32d401f
  1759   1764       */
  1760         -    if( pLevel->iLeftJoin==0 ){
         1765  +    if( pLevel->iLeftJoin==0 && (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE)==0 ){
  1761   1766         whereIndexExprTrans(pIdx, iCur, iIdxCur, pWInfo);
  1762   1767       }
  1763   1768   
  1764   1769       /* Record the instruction used to terminate the loop. */
  1765   1770       if( pLoop->wsFlags & WHERE_ONEROW ){
  1766   1771         pLevel->op = OP_Noop;
  1767   1772       }else if( bRev ){

Changes to test/join5.test.

   236    236     SELECT ifnull(z, '!!!') FROM t3 LEFT JOIN t4 ON (x=y);
   237    237   } {!!!}
   238    238   
   239    239   do_execsql_test 6.3.2 {
   240    240     CREATE INDEX t4i ON t4(y, ifnull(z, '!!!'));
   241    241     SELECT ifnull(z, '!!!') FROM t3 LEFT JOIN t4 ON (x=y);
   242    242   } {!!!}
          243  +
          244  +# 2019-02-08 https://sqlite.org/src/info/4e8e4857d32d401f
          245  +reset_db
          246  +do_execsql_test 6.100 {
          247  +  CREATE TABLE t1(aa, bb);
          248  +  CREATE INDEX t1x1 on t1(abs(aa), abs(bb));
          249  +  INSERT INTO t1 VALUES(-2,-3),(+2,-3),(-2,+3),(+2,+3);
          250  +  SELECT * FROM (t1) 
          251  +   WHERE ((abs(aa)=1 AND 1=2) OR abs(aa)=2)
          252  +     AND abs(bb)=3
          253  +  ORDER BY +1, +2;
          254  +} {-2 -3 -2 3 2 -3 2 3}
   243    255   
   244    256   #-------------------------------------------------------------------------
   245    257   #
   246    258   reset_db
   247    259   do_execsql_test 7.0 {
   248    260     CREATE TABLE t1(x);
   249    261     INSERT INTO t1 VALUES(1);