1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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.
This commit is contained in:
sergefp@mysql.com
2005-02-26 17:15:04 +03:00
parent 41e45ab16a
commit eb5d5de05f
3 changed files with 38 additions and 1 deletions

View File

@@ -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,