Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add ALWAYS() to an always true conditional that results from the previous check-in. Add a test case for ticket [dbaf8a6820be1ece] to supplement those already checked into TH3. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
aff209804722ac902c7abfde80ad2677 |
User & Date: | drh 2019-08-27 17:28:05 |
Context
2019-08-27
| ||
17:59 | The ALWAYS() added by the previous check-in was incorrect. Take it back out. check-in: 336235db2b user: drh tags: trunk | |
17:28 | Add ALWAYS() to an always true conditional that results from the previous check-in. Add a test case for ticket [dbaf8a6820be1ece] to supplement those already checked into TH3. check-in: aff2098047 user: drh tags: trunk | |
17:01 | Omit the "x IN (y)" to "x==y" optimization of check-in [e68b427afbc82e20] (and ticket [e39d032577df6942]) as it causes difficult affinity problems as demonstrated by ticket [dbaf8a6820be1ece] and the original assertion fault is no longer a factor due to countless other changes of the previous 5 years. check-in: 7f5168a76a user: drh tags: trunk | |
Changes
Changes to src/where.c.
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 |
testcase( iCol==BMS-1 );
testcase( iCol==BMS );
if( (idxCols & cMask)==0 ){
Expr *pX = pTerm->pExpr;
idxCols |= cMask;
pIdx->aiColumn[n] = pTerm->u.leftColumn;
pColl = sqlite3BinaryCompareCollSeq(pParse, pX->pLeft, pX->pRight);
pIdx->azColl[n] = pColl ? pColl->zName : sqlite3StrBINARY;
n++;
}
}
}
assert( (u32)n==pLoop->u.btree.nEq );
/* Add additional columns needed to make the automatic index into
|
| |
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 |
testcase( iCol==BMS-1 );
testcase( iCol==BMS );
if( (idxCols & cMask)==0 ){
Expr *pX = pTerm->pExpr;
idxCols |= cMask;
pIdx->aiColumn[n] = pTerm->u.leftColumn;
pColl = sqlite3BinaryCompareCollSeq(pParse, pX->pLeft, pX->pRight);
pIdx->azColl[n] = ALWAYS(pColl) ? pColl->zName : sqlite3StrBINARY;
n++;
}
}
}
assert( (u32)n==pLoop->u.btree.nEq );
/* Add additional columns needed to make the automatic index into
|
Changes to test/in.test.
745 746 747 748 749 750 751 752 753 |
} 0 do_execsql_test in-17.3 { SELECT 1 IN (CAST('1' AS text)); } 0 do_execsql_test in-17.4 { SELECT 1 IN (CAST('1' AS text) COLLATE nocase); } 0 finish_test |
> > > > > > > > > > |
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 |
} 0 do_execsql_test in-17.3 { SELECT 1 IN (CAST('1' AS text)); } 0 do_execsql_test in-17.4 { SELECT 1 IN (CAST('1' AS text) COLLATE nocase); } 0 # 2019-08-27 ticket https://sqlite.org/src/info/dbaf8a6820be1ece # do_execsql_test in-18.1 { DROP TABLE IF EXISTS t0; CREATE TABLE t0(c0 INT UNIQUE); INSERT INTO t0(c0) VALUES (1); SELECT * FROM t0 WHERE '1' IN (t0.c0); } {} finish_test |