Commit 55a2babc authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

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.
parent 8dc64211
......@@ -4655,6 +4655,12 @@ part_name:
{
partition_info *part_info= Lex->part_info;
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;
}
;
......@@ -4949,7 +4955,15 @@ sub_part_definition:
sub_name:
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment