/ Check-in [5710845b]
Login

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

Overview
Comment:Changes an unreachable testcase() into an assert().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5710845b6314f924b490434b4446169f4bb50576aaa940472af68150db16e127
User & Date: drh 2019-11-04 12:49:15
Context
2019-11-06
14:49
Fix the handling of NOT NULL constraint violations for generated columns in a REPLACE statement. Ticket [2399f5986134f79c] check-in: 77b1c90a user: drh tags: trunk
2019-11-04
12:49
Changes an unreachable testcase() into an assert(). check-in: 5710845b user: drh tags: trunk
02:05
Fix a false-postive in the sqlite3ExprImpliesNonNullRow() decision routine, that resulted in an incorrect LEFT JOIN strength reduction when the WHERE clause contained a row-value comparison. Ticket [02aa2bd02f97d0f2] check-in: ea20068e user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/wherecode.c.

1899
1900
1901
1902
1903
1904
1905
1906
1907




1908
1909
1910
1911
1912
1913
1914
      ** 2019-11-02 ticket 623eff57e76d45f6: This optimization does not work
      ** for a LEFT JOIN.
      */
      if( pIdx->pPartIdxWhere ){
        whereApplyPartialIndexConstraints(pIdx->pPartIdxWhere, iCur, pWC);
      }
    }else{
      testcase( (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE)==0 );
      testcase( pIdx->pPartIdxWhere );




    }
  
    /* Record the instruction used to terminate the loop. */
    if( pLoop->wsFlags & WHERE_ONEROW ){
      pLevel->op = OP_Noop;
    }else if( bRev ){
      pLevel->op = OP_Prev;







<

>
>
>
>







1899
1900
1901
1902
1903
1904
1905

1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
      ** 2019-11-02 ticket 623eff57e76d45f6: This optimization does not work
      ** for a LEFT JOIN.
      */
      if( pIdx->pPartIdxWhere ){
        whereApplyPartialIndexConstraints(pIdx->pPartIdxWhere, iCur, pWC);
      }
    }else{

      testcase( pIdx->pPartIdxWhere );
      /* The following assert() is not a requirement, merely an observation:
      ** The OR-optimization doesn't work for the right hand table of
      ** a LEFT JOIN: */
      assert( (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE)==0 );
    }
  
    /* Record the instruction used to terminate the loop. */
    if( pLoop->wsFlags & WHERE_ONEROW ){
      pLevel->op = OP_Noop;
    }else if( bRev ){
      pLevel->op = OP_Prev;