summaryrefslogtreecommitdiff
path: root/strings/ctype-mb.c
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-02-01 16:27:08 +0200
committermonty@mysql.com <>2005-02-01 16:27:08 +0200
commitb87e0c52a70891a0c23562ec309ea5d33b5a8ef4 (patch)
tree7c6914d5b5f63b475e8b75119e24cfccb97f40c8 /strings/ctype-mb.c
parentdabb56a7cbacf084525a00e45860a3513d23ac8d (diff)
downloadmariadb-git-b87e0c52a70891a0c23562ec309ea5d33b5a8ef4.tar.gz
Proper fix for comparision with ' '
(Bug #7788 "Table is full" occurs during a multitable update")
Diffstat (limited to 'strings/ctype-mb.c')
-rw-r--r--strings/ctype-mb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c
index 731fc460cef..6cf48291c91 100644
--- a/strings/ctype-mb.c
+++ b/strings/ctype-mb.c
@@ -389,7 +389,7 @@ static int my_strnncollsp_mb_bin(CHARSET_INFO * cs __attribute__((unused)),
}
if (a_length != b_length)
{
- int swap= 0;
+ int swap= 1;
/*
Check the next not space character of the longer key. If it's < ' ',
then it's smaller than the other key.
@@ -404,7 +404,7 @@ static int my_strnncollsp_mb_bin(CHARSET_INFO * cs __attribute__((unused)),
for (end= a + a_length-length; a < end ; a++)
{
if (*a != ' ')
- return ((int) *a - (int) ' ') ^ swap;
+ return (*a < ' ') ? -swap : swap;
}
}
return 0;