mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-15890 Strange error message if you try to FLUSH TABLES <view> after LOCK TABLES <view>.
Check if the argument of the FLUSH TABLE is a VIEW and handle it accordingly.
This commit is contained in:
@ -288,9 +288,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
|
||||
{
|
||||
|
Reference in New Issue
Block a user