mirror of
https://github.com/MariaDB/server.git
synced 2026-04-27 18:55:31 +02:00
MDEV-15888 Implement FLUSH TABLES tbl_name [, tbl_name] ... WITH READ LOCK for views.
Enable the FLUSH TABLES for views. It works now.
This commit is contained in:
parent
be8e51c459
commit
b118f92be6
6 changed files with 120 additions and 16 deletions
|
|
@ -592,7 +592,8 @@ bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables)
|
|||
for (TABLE_LIST *table_list= all_tables; table_list;
|
||||
table_list= table_list->next_global)
|
||||
{
|
||||
if (!(table_list->table->file->ha_table_flags() & HA_CAN_EXPORT))
|
||||
if (!(table_list->is_view() ||
|
||||
table_list->table->file->ha_table_flags() & HA_CAN_EXPORT))
|
||||
{
|
||||
my_error(ER_ILLEGAL_HA, MYF(0),table_list->table->file->table_type(),
|
||||
table_list->db.str, table_list->table_name.str);
|
||||
|
|
@ -606,7 +607,8 @@ bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables)
|
|||
for (auto table_list= all_tables; table_list;
|
||||
table_list= table_list->next_global)
|
||||
{
|
||||
if (table_list->table->file->extra(HA_EXTRA_FLUSH))
|
||||
if (!table_list->is_view() &&
|
||||
table_list->table->file->extra(HA_EXTRA_FLUSH))
|
||||
goto error_reset_bits;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue