diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-11-21 15:04:57 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-12-12 20:27:43 +0100 |
commit | 8b3b6dc377c548b1b72978a015af999cf6e99760 (patch) | |
tree | 4d74a0789353b2f87e9951f4310f4292e0b88858 | |
parent | 1cae1af6f9286ca6695206ce20c63bb639c60310 (diff) | |
download | mariadb-git-8b3b6dc377c548b1b72978a015af999cf6e99760.tar.gz |
test how MDL blocks InnoDB purge
it must, because purge opens a table that might be being altered right now
-rw-r--r-- | mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result | 19 | ||||
-rw-r--r-- | mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test | 22 |
2 files changed, 40 insertions, 1 deletions
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result index 82513c5c5ca..a266952866a 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result @@ -138,4 +138,23 @@ a b c 6 6 12 8 8 16 DROP TABLE t0, t1; +create table t (a blob, b blob, c blob as (concat(a,b)), h varchar(10), index (c(100))); +insert t(a,b,h) values (repeat('g', 16000), repeat('x', 16000), "kk"); +insert t(a,b,h) values (repeat('a', 16000), repeat('b', 16000), "mm"); +set global innodb_purge_stop_now = 1; +set global debug_dbug="+d,ib_purge_virtual_index_callback"; +update t set a = repeat('m', 16000) where a like "aaa%"; +connect con1, localhost, root; +lock table t write; +connection default; +set global innodb_purge_run_now=1; +select variable_value>1 from information_schema.global_status where variable_name='innodb_purge_trx_id_age'; +variable_value>1 +1 +disconnect con1; +select variable_value>1 from information_schema.global_status where variable_name='innodb_purge_trx_id_age'; +variable_value>1 +0 +set global debug_dbug=@old_dbug; +drop table t; set debug_sync=reset; diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test index d2634aa1ee8..1e6cd44d0aa 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test @@ -169,6 +169,26 @@ SELECT * FROM t1; DROP TABLE t0, t1; ---source include/wait_until_count_sessions.inc +# +# test MDLs with purge +# +create table t (a blob, b blob, c blob as (concat(a,b)), h varchar(10), index (c(100))); +insert t(a,b,h) values (repeat('g', 16000), repeat('x', 16000), "kk"); +insert t(a,b,h) values (repeat('a', 16000), repeat('b', 16000), "mm"); +set global innodb_purge_stop_now = 1; +set global debug_dbug="+d,ib_purge_virtual_index_callback"; +update t set a = repeat('m', 16000) where a like "aaa%"; +connect(con1, localhost, root); +lock table t write; +connection default; +set global innodb_purge_run_now=1; +sleep 3; +select variable_value>1 from information_schema.global_status where variable_name='innodb_purge_trx_id_age'; +disconnect con1; +sleep 3; +select variable_value>1 from information_schema.global_status where variable_name='innodb_purge_trx_id_age'; +set global debug_dbug=@old_dbug; +drop table t; +--source include/wait_until_count_sessions.inc set debug_sync=reset; |