summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-01-28 17:18:35 -0800
committerunknown <jimw@mysql.com>2005-01-28 17:18:35 -0800
commitc2383412b243e05ec01434b8667aafa3559225b3 (patch)
treeb8a1d55380d40a9795bcd517a40e07dc79b2460d /strings
parentbc12f6734362705fcd25abda70ac70ca2535b721 (diff)
downloadmariadb-git-c2383412b243e05ec01434b8667aafa3559225b3.tar.gz
Fix error in string comparisons with CHAR(31) against the space-padding
of strings of unequal length. (Bug #8134) mysql-test/t/compare.test: Add new regression test strings/ctype-simple.c: Fix value used for swapping negative/positive values using XOR mysql-test/r/compare.result: Add new test result
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-simple.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 5bfa9e52595..4dc6a1be27b 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -153,7 +153,7 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, uint a_length,
/* put shorter key in s */
a_length= b_length;
a= b;
- swap= -1; /* swap sign of result */
+ swap= -1^1; /* swap sign of result */
}
for (end= a + a_length-length; a < end ; a++)
{