~drizzle-trunk/drizzle/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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.

-- source include/have_log_bin.inc

# And it requires InnoDB
-- source include/have_log_bin.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;
set autocommit=0;
insert t1 values (1);
connection con2;
flush tables with read lock;
connection con1;
send commit;
connection con2;
sleep 1;
unlock tables;
connection con1;
reap;
drop table t1;
set autocommit=1;