1
-- source include/not_embedded.inc
2
-- source include/have_innodb.inc
3
-- source suite/innodb/include/have_innodb_plugin.inc
6
drop table if exists t1;
9
# REPLACE INTO ... SELECT and INSERT INTO ... SELECT should do
10
# a consistent read of the source table.
12
connect (a,localhost,root,,);
13
connect (b,localhost,root,,);
15
set session transaction isolation level read committed;
16
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
17
create table t2 like t1;
18
insert into t2 values (1),(2),(3),(4),(5),(6),(7);
21
# REPLACE INTO ... SELECT case
23
# this should not result in any locks on t2.
24
replace into t1 select * from t2;
27
set session transaction isolation level read committed;
29
# should not cuase a lock wait.
30
delete from t2 where a=5;
37
# INSERT INTO ... SELECT case
39
# this should not result in any locks on t2.
40
insert into t1 select * from t2;
43
set session transaction isolation level read committed;
45
# should not cuase a lock wait.
46
delete from t2 where a=5;