summaryrefslogtreecommitdiff
path: root/strings/ctype-bin.c
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2005-02-26 17:15:04 +0300
committerunknown <sergefp@mysql.com>2005-02-26 17:15:04 +0300
commit1a72e219f206fbf20691baaf2d1fbdb2dd73e13c (patch)
tree634503b3aeeeb2fce812563b5fc98f0fb05d6b9c /strings/ctype-bin.c
parent46a8c5221750f4f0b5baf870d4f131d8f3de2821 (diff)
downloadmariadb-git-1a72e219f206fbf20691baaf2d1fbdb2dd73e13c.tar.gz
Fix for BUG#8560: Set max_sort_char for any 8-bit charset with binary collation. max_sort_char is needed by
my_like_range_simple to produce upper bound constants for LIKE "str_%" and similar expressions. mysql-test/r/ctype_cp1251.result: Test for BUG#8560 mysql-test/t/ctype_cp1251.test: Test for BUG#8560
Diffstat (limited to 'strings/ctype-bin.c')
-rw-r--r--strings/ctype-bin.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c
index 618879607ec..425985e6bc1 100644
--- a/strings/ctype-bin.c
+++ b/strings/ctype-bin.c
@@ -67,6 +67,13 @@ static uchar bin_char_array[] =
};
+static my_bool
+my_coll_init_8bit_bin(CHARSET_INFO *cs,
+ void *(*alloc)(uint) __attribute__((unused)))
+{
+ cs->max_sort_char=255;
+ return FALSE;
+}
static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)),
const uchar *s, uint slen,
@@ -428,7 +435,7 @@ skip:
MY_COLLATION_HANDLER my_collation_8bit_bin_handler =
{
- NULL, /* init */
+ my_coll_init_8bit_bin,
my_strnncoll_8bit_bin,
my_strnncollsp_8bit_bin,
my_strnxfrm_8bit_bin,