Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
FLUSH TABLES tbl_name [, tbl_name] ... WITH READ LOCK does not currently work for views.
For example, if we have this view:
CREATE TABLE t (qty INT, price INT);
|
CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM t;
|
We can see this behavior:
MariaDB [db1]> FLUSH TABLES v WITH READ LOCK;
|
ERROR 1347 (HY000): 'db1.v' is not BASE TABLE
|
However, LOCK TABLES ... READ is smart enough to lock the underlying tables:
MariaDB [db1]> LOCK TABLES v READ;
|
Query OK, 0 rows affected (0.00 sec)
|
Some users would like to see FLUSH TABLES tbl_name [, tbl_name] ... WITH READ LOCK work similarly for views.
Attachments
Issue Links
- causes
-
MDEV-25837 Assertion `thd->locked_tables_mode == LTM_NONE' failed in Locked_tables_list::init_locked_tables
- Closed
- relates to
-
MDEV-15890 Strange error message if you try to FLUSH TABLES <view> after LOCK TABLES <view>
- Closed
-
MDEV-25906 SIGSEGV in flush_tables_with_read_lock on FTWRL or FTFE | SIGSEGV in ha_maria::extra
- Closed
-
MDEV-26086 FTRWL and FLUSH .. FOR EXPORT on TEMPTABLE view take too weak locks on underlying tables
- Open
-
MDEV-26087 InnoDB: Failing assertion: table->quiesce == QUIESCE_START upon concurrent FLUSH on view
- Confirmed