mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt mysql-test/r/innodb.result: Auto merged mysql-test/r/insert_update.result: Auto merged mysql-test/r/myisam.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/r/subselect3.result: Auto merged mysql-test/r/type_blob.result: Auto merged mysql-test/t/insert_update.test: Auto merged mysql-test/t/select.test: Auto merged BitKeeper/deleted/.del-bdb.result: Auto merged mysql-test/extra/binlog_tests/blackhole.test: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_delete.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_yacc.yy: Auto merged storage/blackhole/ha_blackhole.cc: Auto merged mysql-test/r/binlog_stm_blackhole.result: manual merge mysql-test/r/insert_select.result: manual merge mysql-test/r/subselect.result: manual merge mysql-test/r/update.result: manual merge mysql-test/t/insert_select.test: manual merge mysql-test/t/subselect.test: manual merge sql/sql_help.cc: manual merge sql/sql_insert.cc: manual merge sql/sql_update.cc: manual merge
This commit is contained in:
@@ -5443,21 +5443,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)
|
||||
|
||||
Reference in New Issue
Block a user