summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <elliot@mysql.com>2005-06-21 14:28:55 -0400
committerunknown <elliot@mysql.com>2005-06-21 14:28:55 -0400
commit5031e9adc81a10acc8902b0b8492a926a7fc3300 (patch)
tree23adfbe7b44e6537f6c0df7f9ac6333d651b9c1a /sql
parentd18ab5a0243ac431d001b59f440ed0d5b6fe4d91 (diff)
parent98ff15531f2c6d4d84c7ed5bac563182625c3eb4 (diff)
downloadmariadb-git-5031e9adc81a10acc8902b0b8492a926a7fc3300.tar.gz
Merge mysql.com:/Users/emurphy/src/bk-clean/mysql-4.1
into mysql.com:/Users/emurphy/src/work/mysql-4.1-bug10442
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_parse.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index c107203b548..81fcc30dd08 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1943,6 +1943,14 @@ mysql_execute_command(THD *thd)
if (tables || &lex->select_lex != lex->all_selects_list)
mysql_reset_errors(thd);
+ /* When subselects or time_zone info is used in a query
+ * we create a new TABLE_LIST containing all referenced tables
+ * and set local variable 'tables' to point to this list. */
+ if ((&lex->select_lex != lex->all_selects_list ||
+ lex->time_zone_tables_used) &&
+ lex->unit.create_total_list(thd, lex, &tables))
+ DBUG_VOID_RETURN;
+
#ifdef HAVE_REPLICATION
if (thd->slave_thread)
{
@@ -1993,14 +2001,6 @@ mysql_execute_command(THD *thd)
}
#endif /* !HAVE_REPLICATION */
- /* When subselects or time_zone info is used in a query
- * we create a new TABLE_LIST containing all referenced tables
- * and set local variable 'tables' to point to this list. */
- if ((&lex->select_lex != lex->all_selects_list ||
- lex->time_zone_tables_used) &&
- lex->unit.create_total_list(thd, lex, &tables))
- DBUG_VOID_RETURN;
-
/*
When option readonly is set deny operations which change tables.
Except for the replication thread and the 'super' users.