aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-08-20 14:12:16 +0000
committerdrh <>2024-08-20 14:12:16 +0000
commit781163aa9dce91608ba33af479564f83dda1bd40 (patch)
tree262c69c514d2c64c9c7f3a8d975a1b427bd7e197 /src
parent6ad4e9fd2a45bd5204b55c73179c6e06689312eb (diff)
downloadsqlite-781163aa9dce91608ba33af479564f83dda1bd40.tar.gz
sqlite-781163aa9dce91608ba33af479564f83dda1bd40.zip
When the database encoding is UTF-16LE and the GLOB optimization is used,
it is ok to use the range search over an index, but it is not ok to disable the actual GLOB function call. FossilOrigin-Name: 3399698376761ab8c422f8ea02bfa2759afb606f08bedbd1cf7eee834229a9aa
Diffstat (limited to 'src')
-rw-r--r--src/whereexpr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/whereexpr.c b/src/whereexpr.c
index 4a7cdb3ed..d44085a78 100644
--- a/src/whereexpr.c
+++ b/src/whereexpr.c
@@ -248,7 +248,7 @@ static int isLikeOrGlob(
Expr *pPrefix;
/* A "complete" match if the pattern ends with "*" or "%" */
- *pisComplete = c==wc[0] && z[cnt+1]==0;
+ *pisComplete = c==wc[0] && z[cnt+1]==0 && ENC(db)!=SQLITE_UTF16LE;
/* Get the pattern prefix. Remove all escapes from the prefix. */
pPrefix = sqlite3Expr(db, TK_STRING, (char*)z);