summaryrefslogtreecommitdiff
path: root/sql/sql_reload.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r--sql/sql_reload.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index 9bcb9a30a4c..abdf9d76d15 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -289,9 +289,18 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
*/
if (tables)
{
+ int err;
for (TABLE_LIST *t= tables; t; t= t->next_local)
- if (!find_table_for_mdl_upgrade(thd, t->db.str, t->table_name.str, false))
- return 1;
+ if (!find_table_for_mdl_upgrade(thd, t->db.str, t->table_name.str, &err))
+ {
+ if (is_locked_view(thd, t))
+ t->next_local= t->next_global;
+ else
+ {
+ my_error(err, MYF(0), t->table_name.str);
+ return 1;
+ }
+ }
}
else
{
@@ -616,4 +625,3 @@ static void disable_checkpoints(THD *thd)
ha_checkpoint_state(1); // Disable checkpoints
}
}
-