| 1 |
use ndbinfo; |
| 2 |
Small test to show server-specific nature of server view |
| 3 |
create table test.t1 (a int primary key, b int) engine=ndb; |
| 4 |
insert into test.t1 values (1,1), (2,2); |
| 5 |
Lock a row from each server... |
| 6 |
Server0 |
| 7 |
begin; |
| 8 |
select * from test.t1 where a=1 for update; |
| 9 |
a b |
| 10 |
1 1 |
| 11 |
Server1 |
| 12 |
begin; |
| 13 |
select * from test.t1 where a=2 for update; |
| 14 |
a b |
| 15 |
2 2 |
| 16 |
Show content of server_locks vs cluster_locks |
| 17 |
select count(1) from ndbinfo.cluster_locks; |
| 18 |
count(1) |
| 19 |
2 |
| 20 |
select count(1) from ndbinfo.server_locks; |
| 21 |
count(1) |
| 22 |
1 |
| 23 |
select count(1) from ndbinfo.cluster_locks; |
| 24 |
count(1) |
| 25 |
2 |
| 26 |
select count(1) from ndbinfo.server_locks; |
| 27 |
count(1) |
| 28 |
1 |
| 29 |
Finished |
| 30 |
rollback; |
| 31 |
rollback; |
| 32 |
drop table test.t1; |