~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
set autocommit=0;
19
insert t1 values (1);
20
connection con2;
21
flush tables with read lock;
22
connection con1;
23
send commit;
24
connection con2;
25
sleep 1;
26
unlock tables;
27
connection con1;
28
reap;
29
drop table t1;
30
set autocommit=1;
31