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

Fix a problem in the sqlite3ExprCompare() function that caused two

dissimilar expressions to match if they have the same "COLLATE name" at
the outer layer.

FossilOrigin-Name: fb16348a5bd52752098c9aeacc3281c4e1e8eb5a868d131ea6c3271dc4226b40
This commit is contained in:
drh
2018-04-18 17:52:28 +00:00
parent 6651e10ee7
commit e79f629985
3 changed files with 8 additions and 9 deletions

View File

@@ -4902,7 +4902,7 @@ int sqlite3ExprCompare(Parse *pParse, Expr *pA, Expr *pB, int iTab){
if( pA->op==TK_FUNCTION ){
if( sqlite3StrICmp(pA->u.zToken,pB->u.zToken)!=0 ) return 2;
}else if( pA->op==TK_COLLATE ){
return sqlite3_stricmp(pA->u.zToken,pB->u.zToken)!=0 ? 2 : 0;
if( sqlite3_stricmp(pA->u.zToken,pB->u.zToken)!=0 ) return 2;
}else if( strcmp(pA->u.zToken,pB->u.zToken)!=0 ){
return 2;
}