Debian Codegraph @

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

raw
1 -- source include/have_ndb.inc
2 --source include/not_windows.inc
3 --source suite/ndb/include/have_little_endian.inc
4
5 --let $KEYS=40
6
7 use test;
8
9 --echo Test read-locality of READ-BACKUP
10
11 create table test.t1 (a int primary key,
12 b int,
13 c int,
14 d int,
15 unique(b) using hash,
16 key(c),
17 key(a,c))
18 comment="NDB_TABLE=READ_BACKUP=1"
19 engine=ndb;
20
21 create table test.t2 (a int primary key,
22 b int,
23 c int,
24 d text,
25 unique(b) using hash,
26 key(c))
27 comment="NDB_TABLE=READ_BACKUP=1"
28 engine=ndb;
29
30 --source ndb_read_location_domain.inc
31
32 drop table test.t1;
33 drop table test.t2;
34
35 --echo Test read-locality of FULLY-REPLICATED
36
37 create table test.t1 (a int primary key,
38 b int,
39 c int,
40 d int,
41 unique(b) using hash,
42 key(c),
43 key(a,c))
44 comment="NDB_TABLE=FULLY_REPLICATED=1"
45 engine=ndb;
46
47 create table test.t2 (a int primary key,
48 b int,
49 c int,
50 d text,
51 unique(b) using hash,
52 key(c))
53 comment="NDB_TABLE=FULLY_REPLICATED=1"
54 engine=ndb;
55
56 --source ndb_read_location_domain.inc
57
58 --echo Test read-locality of FULLY-REPLICATED with 2 node groups
59 --exec $NDB_MGM -e'create nodegroup 3,4'
60 alter table t1 algorithm=inplace, reorganize partition;
61 alter table t2 algorithm=inplace, reorganize partition;
62
63 --source ndb_read_location_domain.inc
64 drop table test.t1;
65 drop table test.t2;
66
67 --echo Test read-locality of READ-BACKUP with 3 node groups
68 --exec $NDB_MGM -e'create nodegroup 5,6'
69
70 create table test.t1 (a int primary key,
71 b int,
72 c int,
73 d int,
74 unique(b) using hash,
75 key(c),
76 key(a,c))
77 comment="NDB_TABLE=READ_BACKUP=1"
78 engine=ndb;
79
80 create table test.t2 (a int primary key,
81 b int,
82 c int,
83 d text,
84 unique(b) using hash,
85 key(c))
86 comment="NDB_TABLE=READ_BACKUP=1"
87 engine=ndb;
88
89 --source ndb_read_location_domain.inc
90 drop table test.t1;
91 drop table test.t2;