diff options
Diffstat (limited to 'mysql-test/suite/innodb/t/defrag_mdl-9155.test')
-rw-r--r-- | mysql-test/suite/innodb/t/defrag_mdl-9155.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/defrag_mdl-9155.test b/mysql-test/suite/innodb/t/defrag_mdl-9155.test new file mode 100644 index 00000000..1e1efb9c --- /dev/null +++ b/mysql-test/suite/innodb/t/defrag_mdl-9155.test @@ -0,0 +1,22 @@ +# +# MDEV-9155 Enabling Defragmenting in 10.1.8 still causes OPTIMIZE TABLE to take metadatalocks +# +source include/have_innodb.inc; +source include/have_sequence.inc; + +set global innodb_defragment=1; +create table t1 (a int not null primary key auto_increment, b varchar(256), key second(a, b)) engine=innodb; +insert t1 select null, repeat('a', 256) from seq_1_to_100; +select count(*) from t1; + +connect (con1,localhost,root); +start transaction; +select count(*) from t1; + +connection default; +optimize table t1; + +connection con1; +drop table t1; + +set global innodb_defragment=default; |