Commit ea54709f authored by Staale Smedseng's avatar Staale Smedseng

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.
parent 715dc22d
...@@ -4298,7 +4298,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, ...@@ -4298,7 +4298,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
ER_VIEW_CHECKSUM, ER(ER_VIEW_CHECKSUM)); ER_VIEW_CHECKSUM, ER(ER_VIEW_CHECKSUM));
if (thd->main_da.is_error() && 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 */ /* A missing table is just issued as a failed command */
result_code= HA_ADMIN_FAILED; result_code= HA_ADMIN_FAILED;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment