diff options
author | drh <drh@noemail.net> | 2017-02-11 14:59:58 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-02-11 14:59:58 +0000 |
commit | f9463dfbcf8069bb1df1dd3407bc6e2837f9cee6 (patch) | |
tree | db4610c4625f5d1909ddd056a34d04adfb085522 /src/expr.c | |
parent | 13ac46eea2effd6e6f6033e062b760665bf4b7d3 (diff) | |
download | sqlite-f9463dfbcf8069bb1df1dd3407bc6e2837f9cee6.tar.gz sqlite-f9463dfbcf8069bb1df1dd3407bc6e2837f9cee6.zip |
Fix indexes on expressions so that they can be actually used with
a COLLATE clause.
FossilOrigin-Name: e464b919f76520b45bb58983c6702db59d820ee4
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c index ff4f1b5ad..6a1a9288a 100644 --- a/src/expr.c +++ b/src/expr.c @@ -4681,6 +4681,17 @@ int sqlite3ExprListCompare(ExprList *pA, ExprList *pB, int iTab){ } /* +** Like sqlite3ExprCompare() except COLLATE operators at the top-level +** are ignored. +*/ +int sqlite3ExprCompareSkip(Expr *pA, Expr *pB, int iTab){ + return sqlite3ExprCompare( + sqlite3ExprSkipCollate(pA), + sqlite3ExprSkipCollate(pB), + iTab); +} + +/* ** Return true if we can prove the pE2 will always be true if pE1 is ** true. Return false if we cannot complete the proof or if pE2 might ** be false. Examples: |