diff options
author | unknown <bar@mysql.com> | 2005-07-19 16:48:12 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2005-07-19 16:48:12 +0500 |
commit | 300d34124c0d3e9e2e55651fe349dacea62baf6d (patch) | |
tree | 6fac0fdc2477ec6fe60af724110b498444342096 /strings | |
parent | ddc3586495aa82f310b0e5c2127b77f28c711c27 (diff) | |
download | mariadb-git-300d34124c0d3e9e2e55651fe349dacea62baf6d.tar.gz |
ctype_utf8.result, ctype_utf8.test:
added test case
ctype-utf8.c:
bug#11754: SET NAMES utf8 followed by SELECT "A\\" LIKE "A\\" returns 0
strings/ctype-utf8.c:
bug#11754: SET NAMES utf8 followed by SELECT "A\\" LIKE "A\\" returns 0
mysql-test/t/ctype_utf8.test:
added test case
mysql-test/r/ctype_utf8.result:
added test case
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-utf8.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index f5192b26ce2..205701e87c7 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -1557,7 +1557,7 @@ int my_wildcmp_unicode(CHARSET_INFO *cs, } wildstr+= scan; - if (w_wc == (my_wc_t)escape) + if (w_wc == (my_wc_t)escape && wildstr < wildend) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) @@ -1629,13 +1629,17 @@ int my_wildcmp_unicode(CHARSET_INFO *cs, if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <=0) return 1; + wildstr+= scan; if (w_wc == (my_wc_t)escape) { - wildstr+= scan; - if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, - (const uchar*)wildend)) <=0) - return 1; + if (wildstr < wildend) + { + if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, + (const uchar*)wildend)) <=0) + return 1; + wildstr+= scan; + } } while (1) @@ -1661,14 +1665,12 @@ int my_wildcmp_unicode(CHARSET_INFO *cs, if (str == str_end) return -1; + str+= scan; result= my_wildcmp_unicode(cs, str, str_end, wildstr, wildend, escape, w_one, w_many, weights); - if (result <= 0) return result; - - str+= scan; } } } |