mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
BUG#18750: Various problems with partition names, quotation marks
mysql-test/r/partition.result: Added new test cases mysql-test/t/partition.test: Added new test cases sql/partition_info.cc: Check partition names that they don't have trailing spaces sql/share/errmsg.txt: Added error code for wrong partition names sql/sql_partition.cc: New method to add partition name strings, ignore OPTION_SHOW_QUOTE_CREATE sql/sql_show.cc: require_quotes had a bug with identifiers that consisted of only digits, these are allowed identifiers but must be quoted and require_quote didn't tell this. sql/sql_yacc.yy: Partition names should identifers and not ident_or_text
This commit is contained in:
@ -753,6 +753,7 @@ mysqld_dump_create_info(THD *thd, TABLE_LIST *table_list, int fd)
|
||||
static const char *require_quotes(const char *name, uint name_length)
|
||||
{
|
||||
uint length;
|
||||
bool pure_digit= TRUE;
|
||||
const char *end= name + name_length;
|
||||
|
||||
for (; name < end ; name++)
|
||||
@ -761,7 +762,11 @@ static const char *require_quotes(const char *name, uint name_length)
|
||||
length= my_mbcharlen(system_charset_info, chr);
|
||||
if (length == 1 && !system_charset_info->ident_map[chr])
|
||||
return name;
|
||||
if (length == 1 && (chr < '0' || chr > '9'))
|
||||
pure_digit= FALSE;
|
||||
}
|
||||
if (pure_digit)
|
||||
return name;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user