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

Overview
Comment:Fix an typo affecting virtual WHERE clause terms made in [3f4a1c7648].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 736b5e6a1afd92840f4df1f9abd3364335608ad0
User & Date: dan 2013-07-29 12:31:02.027
Context
2013-07-29
17:15
Improved EXPLAIN output for the OP_Permutation and OP_Blob opcodes. check-in: 753ffb5857 user: drh tags: trunk
12:31
Fix an typo affecting virtual WHERE clause terms made in [3f4a1c7648]. check-in: 736b5e6a1a user: dan tags: trunk
2013-07-27
18:52
Fixes for sqlite_stat3 related functionality. Also EXPLAIN QUERY PLAN. check-in: 2fbe583868 user: dan tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/where.c.
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
    */
    if( pWC->nTerm>1 ){
      int iTerm;
      for(iTerm=0; iTerm<pWC->nTerm; iTerm++){
        Expr *pExpr = pWC->a[iTerm].pExpr;
        if( &pWC->a[iTerm] == pTerm ) continue;
        if( ExprHasProperty(pExpr, EP_FromJoin) ) continue;
        if( pWC->a[iTerm].wtFlags & (TERM_VIRTUAL|TERM_ORINFO) ) continue;
        if( (pWC->a[iTerm].eOperator & WO_ALL)==0 ) continue;
        pExpr = sqlite4ExprDup(pParse->db, pExpr, 0);
        pAndExpr = sqlite4ExprAnd(pParse->db, pAndExpr, pExpr);
      }
      if( pAndExpr ){
        pAndExpr = sqlite4PExpr(pParse, TK_AND, 0, pAndExpr, 0);
      }







|







3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
    */
    if( pWC->nTerm>1 ){
      int iTerm;
      for(iTerm=0; iTerm<pWC->nTerm; iTerm++){
        Expr *pExpr = pWC->a[iTerm].pExpr;
        if( &pWC->a[iTerm] == pTerm ) continue;
        if( ExprHasProperty(pExpr, EP_FromJoin) ) continue;
        if( pWC->a[iTerm].wtFlags & (TERM_ORINFO) ) continue;
        if( (pWC->a[iTerm].eOperator & WO_ALL)==0 ) continue;
        pExpr = sqlite4ExprDup(pParse->db, pExpr, 0);
        pAndExpr = sqlite4ExprAnd(pParse->db, pAndExpr, pExpr);
      }
      if( pAndExpr ){
        pAndExpr = sqlite4PExpr(pParse, TK_AND, 0, pAndExpr, 0);
      }
Changes to test/where8.test.
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
  }
} {2 2 3 3 0 0}

do_test where8-3.5 {
  execsql_status {
    SELECT a, d FROM t1, t2 WHERE (a = 2 OR a = 3) AND (d = a OR e = 'sixteen')
  }
} {2 2 2 4 3 3 3 4 0 0}

do_test where8-3.6 {
  # The first part of the WHERE clause in this query, (a=2 OR a=3) is
  # transformed into "a IN (2, 3)". This is why the sort is required.
  #
  execsql_status {
    SELECT a, d 







|







215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
  }
} {2 2 3 3 0 0}

do_test where8-3.5 {
  execsql_status {
    SELECT a, d FROM t1, t2 WHERE (a = 2 OR a = 3) AND (d = a OR e = 'sixteen')
  }
} {2 2 3 3 2 4 3 4 0 0}

do_test where8-3.6 {
  # The first part of the WHERE clause in this query, (a=2 OR a=3) is
  # transformed into "a IN (2, 3)". This is why the sort is required.
  #
  execsql_status {
    SELECT a, d