summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <kroki/tomash@moonlight.intranet>2006-08-09 16:37:26 +0400
committerunknown <kroki/tomash@moonlight.intranet>2006-08-09 16:37:26 +0400
commit5f34962adbbcc82b7e8390e07e8417b0b0ce9666 (patch)
tree8c735ab0caf3611aff9156a430b34d26cf0c0a98
parent22b92457fc8168cf04d7ce4eabac548e4ac10287 (diff)
downloadmariadb-git-5f34962adbbcc82b7e8390e07e8417b0b0ce9666.tar.gz
Post-merge fix.
sql/sql_parse.cc: Post-merge fix. No need to check DB name twice.
-rw-r--r--sql/sql_parse.cc9
1 files 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;
}