diff options
| author | Alexey Botchkov <holyfoot@askmonty.org> | 2021-06-29 16:03:26 +0400 |
|---|---|---|
| committer | Alexey Botchkov <holyfoot@askmonty.org> | 2021-06-29 16:03:26 +0400 |
| commit | c2ebe8147d72f62ee10ec0a0815971ebd21aa8ff (patch) | |
| tree | d6c9d22461e702b1e26f422bb901605832ca03e3 /mysql-test/main | |
| parent | 0237e9bb65a9a70303bd59c3febc4e738df1b72a (diff) | |
| download | mariadb-git-c2ebe8147d72f62ee10ec0a0815971ebd21aa8ff.tar.gz | |
MDEV-25837 Assertion `thd->locked_tables_mode == LTM_NONE' failed in Locked_tables_list::init_locked_tables.
don't do prelocking for the FLUSH command.
Diffstat (limited to 'mysql-test/main')
| -rw-r--r-- | mysql-test/main/flush.result | 11 | ||||
| -rw-r--r-- | mysql-test/main/flush.test | 13 |
2 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/main/flush.result b/mysql-test/main/flush.result index 941dc63e3da..c73125e3420 100644 --- a/mysql-test/main/flush.result +++ b/mysql-test/main/flush.result @@ -606,6 +606,17 @@ drop view v1, v2; drop table t1; disconnect con1; # +# MDEV-25837 Assertion `thd->locked_tables_mode == LTM_NONE' failed in Locked_tables_list::init_locked_tables. +# +CREATE FUNCTION f() RETURNS INTEGER RETURN 1; +CREATE TABLE t (a INT); +CREATE VIEW v AS SELECT 2 FROM t WHERE f() < 3; +FLUSH TABLE v WITH READ LOCK; +UNLOCK TABLES; +DROP VIEW v; +DROP FUNCTION f; +DROP TABLE t; +# # Test FLUSH THREADS # set @save_thread_cache_size=@@global.thread_cache_size; diff --git a/mysql-test/main/flush.test b/mysql-test/main/flush.test index 97830238b0e..f546b6f1fca 100644 --- a/mysql-test/main/flush.test +++ b/mysql-test/main/flush.test @@ -722,6 +722,19 @@ drop view v1, v2; drop table t1; disconnect con1; +--echo # +--echo # MDEV-25837 Assertion `thd->locked_tables_mode == LTM_NONE' failed in Locked_tables_list::init_locked_tables. +--echo # + +CREATE FUNCTION f() RETURNS INTEGER RETURN 1; +CREATE TABLE t (a INT); +CREATE VIEW v AS SELECT 2 FROM t WHERE f() < 3; +FLUSH TABLE v WITH READ LOCK; + +UNLOCK TABLES; +DROP VIEW v; +DROP FUNCTION f; +DROP TABLE t; --echo # --echo # Test FLUSH THREADS |
