From f08d47b4f3e5780cc56c6ab76599c5a4b6a1e3e6 Mon Sep 17 00:00:00 2001 From: Staale Smedseng Date: Thu, 5 Mar 2009 09:41:00 +0100 Subject: [PATCH] Addendum to previous patch for Bug#29458. A number of system errnos when opening a table are masked as ER_FILE_NOT_FOUND. This patch handles this as "Operation failed" as well. --- sql/sql_table.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index e06f951d525..60714348d03 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4298,7 +4298,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_VIEW_CHECKSUM, ER(ER_VIEW_CHECKSUM)); if (thd->main_da.is_error() && - thd->main_da.sql_errno() == ER_NO_SUCH_TABLE) + (thd->main_da.sql_errno() == ER_NO_SUCH_TABLE || + thd->main_da.sql_errno() == ER_FILE_NOT_FOUND)) /* A missing table is just issued as a failed command */ result_code= HA_ADMIN_FAILED; else