~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
# Let's see if FLUSH TABLES WITH READ LOCK blocks COMMIT of existing
2
# transactions.
3
# We verify that we did not introduce a deadlock.
4
# This is intended to mimick how mysqldump and innobackup work.
5
6
-- source include/have_log_bin.inc
7
8
# And it requires InnoDB
9
-- source include/have_log_bin.inc
10
-- source include/have_innodb.inc
11
12
connect (con1,localhost,root,,);
13
connect (con2,localhost,root,,);
14
15
# FLUSH TABLES WITH READ LOCK should block writes to binlog too
16
connection con1;
17
create table t1 (a int) engine=innodb;
18
reset master;
19
set autocommit=0;
20
insert t1 values (1);
21
connection con2;
22
flush tables with read lock;
23
show master status;
24
connection con1;
25
send commit;
26
connection con2;
27
sleep 1;
28
show master status;
29
unlock tables;
30
connection con1;
31
reap;
32
drop table t1;
33
set autocommit=1;
34