Debian Codegraph @

mysql-test/suite/innodb/t/innodb_bug52663.test

raw
1 --source include/have_innodb.inc
2
3 SET @save_innodb_timeout=@@innodb_lock_wait_timeout;
4 SET GLOBAL innodb_lock_wait_timeout=1;
5 set session transaction isolation level read committed;
6
7 create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key
8 (what, id)) engine=innodb;
9 insert into innodb_bug52663 values ('total', 0, 0);
10 begin;
11
12 connect (addconroot, localhost, root,,);
13 set session transaction isolation level read committed;
14 begin;
15
16 connection default;
17 update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
18 select * from innodb_bug52663;
19
20 connection addconroot;
21 --error ER_LOCK_WAIT_TIMEOUT
22 update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
23 select * from innodb_bug52663;
24
25 connection default;
26 commit;
27
28 connection addconroot;
29 update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
30 commit;
31 select * from innodb_bug52663;
32
33 connection default;
34 select * from innodb_bug52663;
35 drop table innodb_bug52663;
36 SET GLOBAL innodb_lock_wait_timeout=@save_innodb_timeout;