summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <brian@avenger.(none)>2004-11-24 12:34:44 -0800
committerunknown <brian@avenger.(none)>2004-11-24 12:34:44 -0800
commit80282a9418baf94eccaac7af6ec389a87f3f79b8 (patch)
tree184c2f723a69e1c6ecf790a3a85c9dcb045efea1 /strings
parent0f61fec47e427e7780dbe67900b173a5fd99ac73 (diff)
parentc3272ae7186bb59a406a671080b98766dc8e4064 (diff)
downloadmariadb-git-80282a9418baf94eccaac7af6ec389a87f3f79b8.tar.gz
Merging 4.1 to 5.0
Build-tools/Do-compile: Auto merged client/Makefile.am: Auto merged client/mysqladmin.cc: Auto merged configure.in: Auto merged ndb/src/common/util/version.c: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/ha_ndbcluster.h: Auto merged ndb/src/mgmsrv/main.cpp: Resolved NDB conflict between 4.1 and 5.0
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-uca.c4
-rw-r--r--strings/ctype-utf8.c26
-rw-r--r--strings/uca-dump.c4
3 files changed, 19 insertions, 15 deletions
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c
index 8df5b3277c1..89c876ad10c 100644
--- a/strings/ctype-uca.c
+++ b/strings/ctype-uca.c
@@ -7288,6 +7288,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs,
{
while (1)
{
+ my_bool escaped= 0;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
@@ -7305,6 +7306,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
+ escaped= 1;
}
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
@@ -7312,7 +7314,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs,
return 1;
str+= scan;
- if (w_wc == (my_wc_t)w_one)
+ if (!escaped && w_wc == (my_wc_t)w_one)
{
result= 1; /* Found an anchor char */
}
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index b3097649158..ce9346eb475 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -1545,31 +1545,33 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
{
while (1)
{
+ my_bool escaped= 0;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
-
- 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 (w_wc == (my_wc_t)w_many)
{
result= 1; /* Found an anchor char */
break;
}
-
+
wildstr+= scan;
+ if (w_wc == (my_wc_t)escape)
+ {
+ if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
+ (const uchar*)wildend)) <= 0)
+ return 1;
+ wildstr+= scan;
+ escaped= 1;
+ }
+
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
- (const uchar*)str_end)) <=0)
+ (const uchar*)str_end)) <= 0)
return 1;
str+= scan;
- if (w_wc == (my_wc_t)w_one)
+ if (!escaped && w_wc == (my_wc_t)w_one)
{
result= 1; /* Found an anchor char */
}
diff --git a/strings/uca-dump.c b/strings/uca-dump.c
index db5cb7e999a..dd3b74a55e8 100644
--- a/strings/uca-dump.c
+++ b/strings/uca-dump.c
@@ -269,7 +269,7 @@ int main(int ac, char **av)
*/
int tmp= weight[i];
if (w == 2 && tmp)
- tmp= (int)(0x100 - weight[i]);
+ tmp= (int)(0x20 - weight[i]);
printf("0x%04X", tmp);
@@ -304,7 +304,7 @@ int main(int ac, char **av)
const char *comma= page < MY_UCA_NPAGES-1 ? "," : "";
const char *nline= (page+1) % 4 ? "" : "\n";
if (!pagemaxlen[page])
- printf("NULL %s%s", comma , nline);
+ printf("NULL %s%s%s", w ? " ": "", comma , nline);
else
printf("page%03Xdata%s%s%s", page, pname[w], comma, nline);
}