Commit 5f34962a authored by unknown's avatar unknown

Post-merge fix.


sql/sql_parse.cc:
  Post-merge fix.  No need to check DB name twice.
parent 22b92457
...@@ -6385,7 +6385,9 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, ...@@ -6385,7 +6385,9 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
my_error(ER_WRONG_TABLE_NAME, MYF(0), table->table.str); my_error(ER_WRONG_TABLE_NAME, MYF(0), table->table.str);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
if (table->db.str && check_db_name(table->db.str))
if (table->is_derived_table() == FALSE && table->db.str &&
check_db_name(table->db.str))
{ {
my_error(ER_WRONG_DB_NAME, MYF(0), table->db.str); my_error(ER_WRONG_DB_NAME, MYF(0), table->db.str);
DBUG_RETURN(0); DBUG_RETURN(0);
...@@ -6406,11 +6408,6 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, ...@@ -6406,11 +6408,6 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
DBUG_RETURN(0); /* purecov: inspected */ DBUG_RETURN(0); /* purecov: inspected */
if (table->db.str) 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= table->db.str;
ptr->db_length= table->db.length; ptr->db_length= table->db.length;
} }
......
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