1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

In the expression-tree comparison routine, do not compiler Expr.iColumn

and Expr.iTable for TK_STRING expressions.

FossilOrigin-Name: b67bb16c72c3e015ea82665ada9b5d3289ef6fb2
This commit is contained in:
drh
2015-04-17 19:41:37 +00:00
parent 7b4da150da
commit 7693c42f1a
5 changed files with 18 additions and 11 deletions

View File

@@ -4017,7 +4017,7 @@ int sqlite3ExprCompare(Expr *pA, Expr *pB, int iTab){
if( sqlite3ExprCompare(pA->pLeft, pB->pLeft, iTab) ) return 2;
if( sqlite3ExprCompare(pA->pRight, pB->pRight, iTab) ) return 2;
if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList, iTab) ) return 2;
if( ALWAYS((combinedFlags & EP_Reduced)==0) ){
if( ALWAYS((combinedFlags & EP_Reduced)==0) && pA->op!=TK_STRING ){
if( pA->iColumn!=pB->iColumn ) return 2;
if( pA->iTable!=pB->iTable
&& (pA->iTable!=iTab || NEVER(pB->iTable>=0)) ) return 2;