mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 14:15:33 +02:00
Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.1-opt mysql-test/r/func_str.result: Auto merged mysql-test/r/key.result: Auto merged mysql-test/r/row.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/subselect3.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/t/func_str.test: Auto merged mysql-test/t/key.test: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_strfunc.h: Auto merged sql/item_subselect.h: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_view.cc: Auto merged mysql-test/t/view.test: Manually merged sql/sql_lex.h: Manually merged
This commit is contained in:
commit
efe42b3857
15 changed files with 378 additions and 20 deletions
|
|
@ -2733,18 +2733,32 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||
res= open_normal_and_derived_tables(thd, show_table_list,
|
||||
MYSQL_LOCK_IGNORE_FLUSH);
|
||||
lex->sql_command= save_sql_command;
|
||||
/*
|
||||
We should use show_table_list->alias instead of
|
||||
show_table_list->table_name because table_name
|
||||
could be changed during opening of I_S tables. It's safe
|
||||
to use alias because alias contains original table name
|
||||
in this case.
|
||||
/*
|
||||
They can drop table after table names list creation and
|
||||
before table opening. We open non existing table and
|
||||
get ER_NO_SUCH_TABLE error. In this case we do not store
|
||||
the record into I_S table and clear error.
|
||||
*/
|
||||
res= schema_table->process_table(thd, show_table_list, table,
|
||||
res, orig_base_name,
|
||||
show_table_list->alias);
|
||||
close_tables_for_reopen(thd, &show_table_list);
|
||||
DBUG_ASSERT(!lex->query_tables_own_last);
|
||||
if (thd->net.last_errno == ER_NO_SUCH_TABLE)
|
||||
{
|
||||
res= 0;
|
||||
thd->clear_error();
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
We should use show_table_list->alias instead of
|
||||
show_table_list->table_name because table_name
|
||||
could be changed during opening of I_S tables. It's safe
|
||||
to use alias because alias contains original table name
|
||||
in this case.
|
||||
*/
|
||||
res= schema_table->process_table(thd, show_table_list, table,
|
||||
res, orig_base_name,
|
||||
show_table_list->alias);
|
||||
close_tables_for_reopen(thd, &show_table_list);
|
||||
DBUG_ASSERT(!lex->query_tables_own_last);
|
||||
}
|
||||
if (res)
|
||||
goto err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue