Bug#24400628: DEBUG ASSETION KICKS IN WHEN LONG SUBPARTITION NAME
IS USED IN CREATE TABLE The problem was that using a very long subpartition name could lead to the server exiting abnormally. This patch fixes the problem by reporting ER_TOO_LONG_IDENT if a name with more than 64 characters are used as partition and subpartition name.
This commit is contained in:
parent
8dc642112c
commit
55a2babcef
@ -4655,6 +4655,12 @@ part_name:
|
|||||||
{
|
{
|
||||||
partition_info *part_info= Lex->part_info;
|
partition_info *part_info= Lex->part_info;
|
||||||
partition_element *p_elem= part_info->curr_part_elem;
|
partition_element *p_elem= part_info->curr_part_elem;
|
||||||
|
if (check_string_char_length(&$1, "", NAME_CHAR_LEN,
|
||||||
|
system_charset_info, true))
|
||||||
|
{
|
||||||
|
my_error(ER_TOO_LONG_IDENT, MYF(0), $1.str);
|
||||||
|
MYSQL_YYABORT;
|
||||||
|
}
|
||||||
p_elem->partition_name= $1.str;
|
p_elem->partition_name= $1.str;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -4949,7 +4955,15 @@ sub_part_definition:
|
|||||||
|
|
||||||
sub_name:
|
sub_name:
|
||||||
ident_or_text
|
ident_or_text
|
||||||
{ Lex->part_info->curr_part_elem->partition_name= $1.str; }
|
{
|
||||||
|
if (check_string_char_length(&$1, "", NAME_CHAR_LEN,
|
||||||
|
system_charset_info, true))
|
||||||
|
{
|
||||||
|
my_error(ER_TOO_LONG_IDENT, MYF(0), $1.str);
|
||||||
|
MYSQL_YYABORT;
|
||||||
|
}
|
||||||
|
Lex->part_info->curr_part_elem->partition_name= $1.str;
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
opt_part_options:
|
opt_part_options:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user