diff options
author | drh <drh@noemail.net> | 2018-04-13 14:27:01 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-04-13 14:27:01 +0000 |
commit | d5af54207db43d5f5329ad545685a9dc71609c56 (patch) | |
tree | 98e02cf911b87db0de6d907701f1960fcd20d324 /src/expr.c | |
parent | 3b45d8bfb789a492afa6fabbea6ed2bbc0083870 (diff) | |
download | sqlite-d5af54207db43d5f5329ad545685a9dc71609c56.tar.gz sqlite-d5af54207db43d5f5329ad545685a9dc71609c56.zip |
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
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index eac5476f7..ca7c96604 100644 --- a/src/expr.c +++ b/src/expr.c @@ -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; |