1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Fix EXPLAIN QUERY PLAN output for indexed-expressions. Fix another

obscure fault in the WHERE term scanner.

FossilOrigin-Name: 73d361ce9e4d72c943def8b0b3caa227f9199aed
This commit is contained in:
drh
2015-08-27 20:33:38 +00:00
parent 29d03f6517
commit c7c4680ffd
4 changed files with 22 additions and 15 deletions

View File

@@ -191,10 +191,9 @@ static WhereTerm *whereScanNext(WhereScan *pScan){
){
if( (pTerm->eOperator & WO_EQUIV)!=0
&& pScan->nEquiv<ArraySize(pScan->aiCur)
&& (pX = sqlite3ExprSkipCollate(pTerm->pExpr->pRight))->op==TK_COLUMN
){
int j;
pX = sqlite3ExprSkipCollate(pTerm->pExpr->pRight);
assert( pX->op==TK_COLUMN );
for(j=0; j<pScan->nEquiv; j++){
if( pScan->aiCur[j]==pX->iTable
&& pScan->aiColumn[j]==pX->iColumn ){