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

Fix indexes on expressions so that they can be actually used with

a COLLATE clause.

FossilOrigin-Name: e464b919f76520b45bb58983c6702db59d820ee4
This commit is contained in:
drh
2017-02-11 14:59:58 +00:00
parent 13ac46eea2
commit f9463dfbcf
6 changed files with 25 additions and 12 deletions

View File

@@ -4680,6 +4680,17 @@ int sqlite3ExprListCompare(ExprList *pA, ExprList *pB, int iTab){
return 0;
}
/*
** 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