diff options
author | bar@mysql.com <> | 2005-07-22 13:27:30 +0500 |
---|---|---|
committer | bar@mysql.com <> | 2005-07-22 13:27:30 +0500 |
commit | 4d75b059c0b454f477f72caf79b42a8cc1a19d0b (patch) | |
tree | cb883a8fdca69262bc3f87550e01b36168fe50df /strings | |
parent | 62aad2bcd04f90b9a41bb94b319471f6ba85c93c (diff) | |
parent | 53478eb07f1fe49bbe259de941586c3cad566f73 (diff) | |
download | mariadb-git-4d75b059c0b454f477f72caf79b42a8cc1a19d0b.tar.gz |
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/bar/mysql-4.1.b11754
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; } } } |