From 5f34962adbbcc82b7e8390e07e8417b0b0ce9666 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Aug 2006 16:37:26 +0400 Subject: Post-merge fix. sql/sql_parse.cc: Post-merge fix. No need to check DB name twice. --- sql/sql_parse.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 555cac03c64..1af80f2c4b0 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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); 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); DBUG_RETURN(0); @@ -6406,11 +6408,6 @@ 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; } -- cgit v1.2.1