summaryrefslogtreecommitdiff
path: root/sql/sql_reload.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-09-14 08:47:22 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2018-09-14 08:47:22 +0200
commit28f08d3753eb10a1393a63e6c581d43aad9f93b9 (patch)
tree86c9df8c3fb6d4ebd99d431697c84f06ef242989 /sql/sql_reload.cc
parent38665893087e20c3ad65d5b0e227a75185a4865e (diff)
parentf1bcfbb4373e40dda2c18c137f76fc6ff32e1a45 (diff)
downloadmariadb-git-28f08d3753eb10a1393a63e6c581d43aad9f93b9.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r--sql/sql_reload.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index ce3ff5964e2..ac66f7e9609 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, t->table_name, false))
- return 1;
+ if (!find_table_for_mdl_upgrade(thd, t->db, t->table_name, &err))
+ {
+ if (is_locked_view(thd, t))
+ t->next_local= t->next_global;
+ else
+ {
+ my_error(err, MYF(0), t->table_name);
+ return 1;
+ }
+ }
}
else
{