mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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. mysql-test/r/ctype_cp1251.result: Test for BUG#8560 mysql-test/t/ctype_cp1251.test: Test for BUG#8560
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user