1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Change the way "(a, b) = (SELECT *)" expressions are handled in where.c if there is an index on one of the columns only.

FossilOrigin-Name: 4dfebff2924f46284d5b9cda69175f79b29d6028
This commit is contained in:
dan
2016-07-29 18:12:12 +00:00
parent 7b35a77b1a
commit 145b4ea519
7 changed files with 45 additions and 31 deletions

View File

@@ -3512,18 +3512,6 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
break;
}
case TK_SELECT_COLUMN: {
Expr *pLeft = pExpr->pLeft;
assert( pLeft );
assert( pLeft->op==TK_SELECT || pLeft->op==TK_REGISTER );
if( pLeft->op==TK_SELECT ){
pLeft->iTable = sqlite3CodeSubselect(pParse, pLeft, 0, 0);
pLeft->op = TK_REGISTER;
}
inReg = pLeft->iTable + pExpr->iColumn;
break;
}
/*
** Form A:
** CASE x WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END