--source include/have_innodb.inc connect (addconroot, localhost, root,,); connect (is, localhost, root,,); --connection default set transaction isolation level read committed; create table locker (pk int not null auto_increment, some_key varchar(10) not null, some_val varchar(25) default 'hi', primary key (pk), unique key uk_locker (some_key)); insert into locker values(1, 'key-one', 'some-value'); start transaction; select * from locker where some_key='key-one' for update; --connection addconroot set transaction isolation level read committed; set innodb_lock_wait_timeout=50; start transaction; --send select * from locker where some_key='key-one' for update --connection is --vertical_results select * from information_schema.innodb_trx; select * from performance_schema.data_locks; select * from performance_schema.data_lock_waits; --horizontal_results --connection default delete from locker where some_key='key-one'; --connection is --vertical_results select * from information_schema.innodb_trx; select * from performance_schema.data_locks; select * from performance_schema.data_lock_waits; --horizontal_results --connection default insert into locker values(1, 'key-one', 'some-value'); --connection addconroot --error 1213 --reap --connection default rollback; alter table locker drop key uk_locker; start transaction; select * from locker where some_key='key-one' for update; --connection addconroot set innodb_lock_wait_timeout=50; start transaction; --send select * from locker where some_key='key-one' for update --connection is --vertical_results select * from information_schema.innodb_trx; select * from performance_schema.data_locks; select * from performance_schema.data_lock_waits; --horizontal_results --connection default delete from locker where some_key='key-one'; --connection is --vertical_results select * from information_schema.innodb_trx; select * from performance_schema.data_locks; select * from performance_schema.data_lock_waits; --horizontal_results --connection default insert into locker values(1, 'key-one', 'some-value'); --connection addconroot --error 1205 --reap rollback; --connection default rollback; drop table locker;