mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts: Text conflict in mysql-test/r/grant.result Text conflict in mysql-test/t/grant.test Text conflict in mysys/mf_loadpath.c Text conflict in sql/slave.cc Text conflict in sql/sql_priv.h
This commit is contained in:
@@ -1170,6 +1170,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
}
|
||||
thd->convert_string(&conv_name, system_charset_info,
|
||||
packet, arg_length, thd->charset());
|
||||
if (check_table_name(conv_name.str, conv_name.length, FALSE))
|
||||
{
|
||||
/* this is OK due to convert_string() null-terminating the string */
|
||||
my_error(ER_WRONG_TABLE_NAME, MYF(0), conv_name.str);
|
||||
break;
|
||||
}
|
||||
|
||||
table_list.alias= table_list.table_name= conv_name.str;
|
||||
packet= arg_end + 1;
|
||||
|
||||
@@ -6063,7 +6070,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
DBUG_RETURN(0); // End of memory
|
||||
alias_str= alias ? alias->str : table->table.str;
|
||||
if (!test(table_options & TL_OPTION_ALIAS) &&
|
||||
check_table_name(table->table.str, table->table.length))
|
||||
check_table_name(table->table.str, table->table.length, FALSE))
|
||||
{
|
||||
my_error(ER_WRONG_TABLE_NAME, MYF(0), table->table.str);
|
||||
DBUG_RETURN(0);
|
||||
|
||||
Reference in New Issue
Block a user