mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
The sqlite3ExprCompare() routine should always compare the same variables
as equal to one another, regardless of whether or not QPSG is set. FossilOrigin-Name: df95d5209a77c0302e08ea7b1f248646fb2a062ba5beca898678aee0a1d03a3a
This commit is contained in:
@@ -6193,6 +6193,15 @@ static SQLITE_NOINLINE int exprCompareVariable(
|
||||
int iVar;
|
||||
sqlite3_value *pL, *pR = 0;
|
||||
|
||||
if( pExpr->op==TK_VARIABLE ){
|
||||
assert( pVar->u.zToken!=0 );
|
||||
assert( pExpr->u.zToken!=0 );
|
||||
if( pVar->iColumn==pExpr->iColumn
|
||||
&& strcmp(pVar->u.zToken,pExpr->u.zToken)==0
|
||||
){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if( (pParse->db->flags & SQLITE_EnableQPSG)!=0 ) return 2;
|
||||
sqlite3ValueFromExpr(pParse->db, pExpr, SQLITE_UTF8, SQLITE_AFF_BLOB, &pR);
|
||||
if( pR ){
|
||||
|
Reference in New Issue
Block a user