1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug#35068 Assertion fails when reading from i_s.tables and there is incorrect merge table

Hide "Table doesn't exist" errors if the table belongs to a merge table.


mysql-test/r/merge.result:
  result fix
mysql-test/t/merge.test:
  test case
sql/sql_base.cc:
  Hide "Table doesn't exist" errors if the table belongs to a merge table.
This commit is contained in:
Sergey Glukhov
2008-10-09 13:55:16 +05:00
parent 95b721e628
commit 56810c9d65
3 changed files with 47 additions and 17 deletions

View File

@@ -489,12 +489,20 @@ static TABLE_SHARE
"no such table" errors.
@todo Rework the alternative ways to deal with ER_NO_SUCH TABLE.
*/
if (thd->is_error() && table_list->belong_to_view)
if (thd->is_error())
{
TABLE_LIST *view= table_list->belong_to_view;
thd->clear_error();
my_error(ER_VIEW_INVALID, MYF(0),
view->view_db.str, view->view_name.str);
if (table_list->parent_l)
{
thd->clear_error();
my_error(ER_WRONG_MRG_TABLE, MYF(0));
}
else if (table_list->belong_to_view)
{
TABLE_LIST *view= table_list->belong_to_view;
thd->clear_error();
my_error(ER_VIEW_INVALID, MYF(0),
view->view_db.str, view->view_name.str);
}
}
DBUG_RETURN(0);
}