mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
several fixes to make tests pass in embedded-server mode
This commit is contained in:
32
mysql-test/t/flush_block_commit_notembedded.test
Normal file
32
mysql-test/t/flush_block_commit_notembedded.test
Normal file
@@ -0,0 +1,32 @@
|
||||
# Let's see if FLUSH TABLES WITH READ LOCK blocks COMMIT of existing
|
||||
# transactions.
|
||||
# We verify that we did not introduce a deadlock.
|
||||
# This is intended to mimick how mysqldump and innobackup work.
|
||||
|
||||
# And it requires InnoDB
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
|
||||
# FLUSH TABLES WITH READ LOCK should block writes to binlog too
|
||||
connection con1;
|
||||
create table t1 (a int) engine=innodb;
|
||||
reset master;
|
||||
set autocommit=0;
|
||||
insert t1 values (1);
|
||||
connection con2;
|
||||
flush tables with read lock;
|
||||
show master status;
|
||||
connection con1;
|
||||
send commit;
|
||||
connection con2;
|
||||
sleep 1;
|
||||
show master status;
|
||||
unlock tables;
|
||||
connection con1;
|
||||
reap;
|
||||
drop table t1;
|
||||
set autocommit=1;
|
||||
|
||||
Reference in New Issue
Block a user