1drop table if exists t1; 2set binlog_format=mixed; 3set session transaction isolation level repeatable read; 4create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1; 5insert into t1 values (1),(2),(3),(4),(5),(6),(7); 6set autocommit=0; 7select * from t1 where a=3 lock in share mode; 8a 93 10set binlog_format=mixed; 11set session transaction isolation level repeatable read; 12set autocommit=0; 13update t1 set a=10 where a=5; 14ERROR HY000: Lock wait timeout exceeded; try restarting transaction 15commit; 16commit; 17set session transaction isolation level read committed; 18update t1 set a=10 where a=5; 19select * from t1 where a=2 for update; 20ERROR HY000: Lock wait timeout exceeded; try restarting transaction 21select * from t1 where a=2 limit 1 for update; 22a 232 24update t1 set a=11 where a=6; 25update t1 set a=12 where a=2; 26ERROR HY000: Lock wait timeout exceeded; try restarting transaction 27update t1 set a=13 where a=1; 28ERROR HY000: Lock wait timeout exceeded; try restarting transaction 29commit; 30update t1 set a=14 where a=1; 31commit; 32select * from t1; 33a 3414 352 363 374 3810 3911 407 41drop table t1; 42create table t1 (a int, b int) engine=myisam; 43create table t2 (c int, d int, key (c)) engine=innodb; 44insert into t1 values (1,1); 45insert into t2 values (1,2); 46set session transaction isolation level read committed; 47delete from t1 using t1 join t2 on t1.a = t2.c where t2.d in (1); 48drop table t1, t2; 49