Debian Codegraph @

mysql-test/suite/ndb/t/ndbinfo_server_locks.test

raw
1 --source include/have_ndb.inc
2
3 use ndbinfo;
4
5 #
6 # WL 7656 server_operations view
7 #
8
9 --echo Small test to show server-specific nature of server view
10
11 connect(mysqld1,127.0.0.1,root,,test,$MASTER_MYPORT1);
12
13 create table test.t1 (a int primary key, b int) engine=ndb;
14
15 insert into test.t1 values (1,1), (2,2);
16
17 --echo Lock a row from each server...
18 --connection default
19 --echo Server0
20 begin;
21 select * from test.t1 where a=1 for update;
22
23 --connection mysqld1
24 --echo Server1
25 begin;
26 select * from test.t1 where a=2 for update;
27
28
29 --echo Show content of server_locks vs cluster_locks
30 --connection default
31 select count(1) from ndbinfo.cluster_locks;
32 select count(1) from ndbinfo.server_locks;
33
34 --connection mysqld1
35 select count(1) from ndbinfo.cluster_locks;
36 select count(1) from ndbinfo.server_locks;
37
38 --echo Finished
39 --connection default
40 rollback;
41
42 --connection mysqld1
43 rollback;
44
45 drop table test.t1;
46