1
by brian
clean slate |
1 |
-- source include/have_innodb.inc
|
2 |
||
3 |
--disable_warnings
|
|
4 |
drop table if exists t1; |
|
5 |
--enable_warnings
|
|
6 |
||
7 |
connect (a,localhost,root,,); |
|
8 |
connect (b,localhost,root,,); |
|
9 |
||
10 |
||
11 |
#
|
|
12 |
# BUG#11238 - in prelocking mode SELECT .. FOR UPDATE is changed to |
|
13 |
# non-blocking SELECT |
|
14 |
#
|
|
15 |
create table t1 (col1 integer primary key, col2 integer) engine=innodb; |
|
16 |
insert t1 values (1,100); |
|
17 |
start transaction; |
|
18 |
select col2 from t1 where col1=1 for update; |
|
19 |
connection b; |
|
20 |
send update t1 set col2=0 where col1=1; |
|
21 |
connection default; |
|
22 |
select * from t1; |
|
23 |
connection a; |
|
24 |
rollback; |
|
25 |
connection b; |
|
26 |
reap; |
|
27 |
rollback; |
|
28 |
connection default; |
|
29 |
drop table t1; |
|
30 |
disconnect a; |
|
31 |
disconnect b; |