summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authormithun <mithun.c.y@oracle.com>2014-08-12 17:16:51 +0530
committermithun <mithun.c.y@oracle.com>2014-08-12 17:16:51 +0530
commitf8893dc472570383d2445c026c1488a010865a84 (patch)
treebd50bb93b6f22cbf2b91384b383484d3fb448a2e /strings
parent77a5517c93ddca99a49d051a24bd31501d4c67ce (diff)
downloadmariadb-git-f8893dc472570383d2445c026c1488a010865a84.tar.gz
Bug #11755818 : LIKE DOESN'T MATCH WHEN CP932_BIN/SJIS_BIN
COLLATIONS ARE USED. ISSUE : ------- Code points of HALF WIDTH KATAKANA in SJIS/CP932 range from A1 to DF. In function my_wildcmp_mb_bin_impl while comparing such single byte code points, there is a code which compares signed character with unsigned character. Because of this, comparisons of two same code points representing a HALF WIDTH KATAKANA character always fails. Solution: --------- A code point of HALF WIDTH KATAKANA at-least need 8 bits. Promoting the variable from uchar to int will fix the issue. mysql-test/t/ctype_cp932.test: Tests which have conditions LIKE 'STRING PATTERN WITH HALF WIDTH KATAKANA'. strings/ctype-mb.c: A code point of HALF WIDTH KATAKANA at-least need 8 bits. Promoting the variable from uchar to int will fix the issue.
Diffstat (limited to 'strings')
-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 258613d3b05..02373304672 100644
--- a/strings/ctype-mb.c
+++ b/strings/ctype-mb.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1044,7 +1044,7 @@ static int my_wildcmp_mb_bin_impl(CHARSET_INFO *cs,
}
if (*wildstr == w_many)
{ /* Found w_many */
- uchar cmp;
+ int cmp;
const char* mb = wildstr;
int mb_len=0;