diff options
author | unknown <gluh@eagle.(none)> | 2007-02-26 17:46:52 +0400 |
---|---|---|
committer | unknown <gluh@eagle.(none)> | 2007-02-26 17:46:52 +0400 |
commit | 536adef69d62c2da0e4639cf467b59493e852089 (patch) | |
tree | 185ac7a280e77363b762413b995aad95ed8238a8 /sql/sql_base.cc | |
parent | 1eb71c68cb1b2f335a8e6b393cdb3e724ea65a0a (diff) | |
parent | bab42f674d95186ccc7a3fdb4901fbb0b00a1b96 (diff) | |
download | mariadb-git-536adef69d62c2da0e4639cf467b59493e852089.tar.gz |
Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 15d616bdd4f..02f7044a4bf 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -5465,21 +5465,8 @@ bool setup_tables(THD *thd, Name_resolution_context *context, uint tablenr= 0; DBUG_ENTER("setup_tables"); - /* - Due to the various call paths that lead to setup_tables() it may happen - that context->table_list and context->first_name_resolution_table can be - NULL (this is typically done when creating TABLE_LISTs internally). - TODO: - Investigate all cases when this my happen, initialize the name resolution - context correctly in all those places, and remove the context reset below. - */ - if (!context->table_list || !context->first_name_resolution_table) - { - /* Test whether the context is in a consistent state. */ - DBUG_ASSERT(!context->first_name_resolution_table && !context->table_list); - context->table_list= context->first_name_resolution_table= tables; - } - + DBUG_ASSERT ((select_insert && !tables->next_name_resolution_table) || !tables || + (context->table_list && context->first_name_resolution_table)); /* this is used for INSERT ... SELECT. For select we setup tables except first (and its underlying tables) |