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

Get the conflict-target clause parsing working correctly, with test

cases.  This change involves an enhancement to sqlite3ExprCompare() which
needs to be reviewed on trunk prior to merging.

FossilOrigin-Name: 5bf704256206f84b3db7a5d8523215604eeb218ef8db86316d1e43ecd7248d6a
This commit is contained in:
drh
2018-04-13 14:27:01 +00:00
parent 3b45d8bfb7
commit d5af54207d
5 changed files with 45 additions and 21 deletions

View File

@@ -4899,8 +4899,10 @@ int sqlite3ExprCompare(Parse *pParse, Expr *pA, Expr *pB, int iTab){
if( pA->op!=TK_COLUMN && pA->op!=TK_AGG_COLUMN && pA->u.zToken ){
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;
}else if( strcmp(pA->u.zToken,pB->u.zToken)!=0 ){
return pA->op==TK_COLLATE ? 1 : 2;
return 2;
}
}
if( (pA->flags & EP_Distinct)!=(pB->flags & EP_Distinct) ) return 2;