mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-release
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-main VC++Files/sql/mysqld.vcproj: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/r/warnings.result: Auto merged mysql-test/t/warnings-master.opt: Auto merged mysql-test/t/warnings.test: Auto merged sql/handler.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_parse.cc: Auto merged
This commit is contained in:
@ -6118,8 +6118,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
if (!table)
|
||||
DBUG_RETURN(0); // End of memory
|
||||
alias_str= alias ? alias->str : table->table.str;
|
||||
if (check_table_name(table->table.str,table->table.length) ||
|
||||
table->db.str && check_db_name(table->db.str))
|
||||
if (check_table_name(table->table.str, table->table.length))
|
||||
{
|
||||
my_error(ER_WRONG_TABLE_NAME, MYF(0), table->table.str);
|
||||
DBUG_RETURN(0);
|
||||
@ -6140,6 +6139,11 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
DBUG_RETURN(0); /* purecov: inspected */
|
||||
if (table->db.str)
|
||||
{
|
||||
if (table->is_derived_table() == FALSE && check_db_name(table->db.str))
|
||||
{
|
||||
my_error(ER_WRONG_DB_NAME, MYF(0), table->db.str);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
ptr->db= table->db.str;
|
||||
ptr->db_length= table->db.length;
|
||||
}
|
||||
|
Reference in New Issue
Block a user