1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-21 11:13:54 +03:00

Fix an issue with the LIKE operator when it includes the "ESCAPE '_'" clause.

Ticket [c0aeea67d58ae0fd].

FossilOrigin-Name: 27d4117980d125975b5e70eeea58a6ab07bcf066e71b5fcb81b822e05afdbab0
This commit is contained in:
drh
2021-02-15 17:02:01 +00:00
parent f2b32e8915
commit 33941691a5
4 changed files with 18 additions and 10 deletions

View File

@@ -694,7 +694,8 @@ static int patternCompare(
/* Skip over multiple "*" characters in the pattern. If there
** are also "?" characters, skip those as well, but consume a
** single character of the input string for each "?" skipped */
while( (c=Utf8Read(zPattern)) == matchAll || c == matchOne ){
while( (c=Utf8Read(zPattern)) == matchAll
|| (c == matchOne && matchOne!=0) ){
if( c==matchOne && sqlite3Utf8Read(&zString)==0 ){
return SQLITE_NOWILDCARDMATCH;
}