summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 00a06a6e404..76970676c3b 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -5129,7 +5129,8 @@ end:
*/
DBUG_ASSERT(thd->open_tables == NULL);
thd->mdl_context.rollback_to_savepoint(open_tables_state_backup->mdl_system_tables_svp);
- thd->clear_error();
+ if (!thd->is_fatal_error)
+ thd->clear_error();
return res;
}
@@ -5345,6 +5346,8 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
error= 0;
goto err;
}
+ if (thd->is_fatal_error)
+ goto err;
DEBUG_SYNC(thd, "before_open_in_get_all_tables");
if (fill_schema_table_by_open(thd, &tmp_mem_root, FALSE,