/ Changes On Branch tkt-e39d0325
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Changes In Branch tkt-e39d0325 Excluding Merge-Ins

This is equivalent to a diff from ca314081 to eae6dfbe

2014-03-20
13:26
Convert expressions of the form "X IN (?)" with exactly one value on the RHS of the IN into equality tests: "X=?". Add test cases to verify that statements work correctly on this corner case. Fix for ticket [e39d032577df6942]. check-in: e68b427a user: drh tags: trunk
12:36
One possible fix for the [e39d032577d] problem it to replace the failing assert() with a testcase() as shown here. Closed-Leaf check-in: eae6dfbe user: drh tags: tkt-e39d0325
12:17
Fix an unnecessarily obtuse use of a bitmask flag. check-in: ca314081 user: drh tags: trunk
2014-03-19
20:01
Avoid some unnecessary calls to sqlite3VdbeRecordUnpack() that were being made when merging data from two or more temp files together in vdbesort.c check-in: 707ea170 user: dan tags: trunk

Changes to src/where.c.

4015
4016
4017
4018
4019
4020
4021

4022
4023
4024
4025
4026
4027
4028
4029
    }else if( pTerm->eOperator & (WO_EQ) ){
      assert(
        (pNew->wsFlags & (WHERE_COLUMN_NULL|WHERE_COLUMN_IN|WHERE_SKIPSCAN))!=0
        || nInMul==0
      );
      pNew->wsFlags |= WHERE_COLUMN_EQ;
      if( iCol<0 || (nInMul==0 && pNew->u.btree.nEq==pProbe->nKeyCol-1)){

        assert( (pNew->wsFlags & WHERE_COLUMN_IN)==0 || iCol<0 );
        if( iCol>=0 && pProbe->onError==OE_None ){
          pNew->wsFlags |= WHERE_UNQ_WANTED;
        }else{
          pNew->wsFlags |= WHERE_ONEROW;
        }
      }
      pNew->u.btree.nEq++;







>
|







4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
    }else if( pTerm->eOperator & (WO_EQ) ){
      assert(
        (pNew->wsFlags & (WHERE_COLUMN_NULL|WHERE_COLUMN_IN|WHERE_SKIPSCAN))!=0
        || nInMul==0
      );
      pNew->wsFlags |= WHERE_COLUMN_EQ;
      if( iCol<0 || (nInMul==0 && pNew->u.btree.nEq==pProbe->nKeyCol-1)){
        /* Ticket [e39d032577df]: WHERE a=? AND b IN (?) -- a, b indexed */
        testcase( (pNew->wsFlags & WHERE_COLUMN_IN)!=0 && iCol>=0 );
        if( iCol>=0 && pProbe->onError==OE_None ){
          pNew->wsFlags |= WHERE_UNQ_WANTED;
        }else{
          pNew->wsFlags |= WHERE_ONEROW;
        }
      }
      pNew->u.btree.nEq++;