diff options
author | unknown <monty@mysql.com> | 2005-02-01 16:27:08 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-02-01 16:27:08 +0200 |
commit | c53184ebb775290d2e0f8397815832f1c84a8a5c (patch) | |
tree | 7c6914d5b5f63b475e8b75119e24cfccb97f40c8 /mysys/my_handler.c | |
parent | e5d8e72a78c75c37c7b5fdd88dce295e861c0659 (diff) | |
download | mariadb-git-c53184ebb775290d2e0f8397815832f1c84a8a5c.tar.gz |
Proper fix for comparision with ' '
(Bug #7788 "Table is full" occurs during a multitable update")
client/mysqldump.c:
Style fixes
innobase/include/univ.i:
UNIV_DEBUG should not depend on configure --debug but on --debug=full
mysql-test/r/compare.result:
Added test to find bug in previous bugfix
mysql-test/t/compare.test:
Added test to find bug in previous bugfix
mysys/my_handler.c:
Proper fix for comparision with ' '
strings/ctype-big5.c:
Proper fix for comparision with ' '
strings/ctype-bin.c:
Proper fix for comparision with ' '
strings/ctype-gbk.c:
Proper fix for comparision with ' '
strings/ctype-latin1.c:
Proper fix for comparision with ' '
strings/ctype-mb.c:
Proper fix for comparision with ' '
strings/ctype-simple.c:
Proper fix for comparision with ' '
strings/ctype-sjis.c:
Proper fix for comparision with ' '
strings/ctype-tis620.c:
Proper fix for comparision with ' '
strings/ctype-ucs2.c:
Proper fix for comparision with ' '
strings/ctype-utf8.c:
Proper fix for comparision with ' '
Diffstat (limited to 'mysys/my_handler.c')
-rw-r--r-- | mysys/my_handler.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mysys/my_handler.c b/mysys/my_handler.c index df1e9e55e0a..5ee181ca78e 100644 --- a/mysys/my_handler.c +++ b/mysys/my_handler.c @@ -43,7 +43,7 @@ static int compare_bin(uchar *a, uint a_length, uchar *b, uint b_length, return 0; if (skip_end_space && a_length != b_length) { - int swap= 0; + int swap= 1; /* We are using space compression. We have to check if longer key has next character < ' ', in which case it's less than the shorter @@ -57,12 +57,12 @@ static int compare_bin(uchar *a, uint a_length, uchar *b, uint b_length, /* put shorter key in a */ a_length= b_length; a= b; - swap= -1 ^ 1; /* swap sign of result */ + swap= -1; /* swap sign of result */ } for (end= a + a_length-length; a < end ; a++) { if (*a != ' ') - return ((int) *a - (int) ' ') ^ swap; + return (*a < ' ') ? -swap : swap; } return 0; } |