Debian Codegraph @

mysql-test/suite/perfschema/t/innodb_ix_data_locks.test

raw
1 --echo #Test for Intention Exclusive lock
2
3 -- connect (con1,localhost,root,,)
4 -- connect (con2,localhost,root,,)
5
6 --disable_warnings
7 drop table if exists t1_ix;
8 --enable_warnings
9
10 --connection con1
11 use test;
12 create table t1_ix (id integer, x integer, PRIMARY KEY (id)) engine=INNODB;
13 insert into t1_ix values(0,0),(1,1);
14 SET autocommit=0;
15 SELECT * FROM t1_ix where id=1 for update;
16
17 --connection con2
18 select object_schema, object_name, lock_type, lock_mode, lock_status, lock_data
19 from performance_schema.data_locks
20 where object_name="t1_ix";
21
22 --connection con1
23 unlock tables;
24 drop table t1_ix;
25
26 --disconnect con1
27 --disconnect con2