92 lines
2.4 KiB
Plaintext
92 lines
2.4 KiB
Plaintext
-- source include/have_ndb.inc
|
|
--source include/not_windows.inc
|
|
--source suite/ndb/include/have_little_endian.inc
|
|
|
|
--let $KEYS=40
|
|
|
|
use test;
|
|
|
|
--echo Test read-locality of READ-BACKUP
|
|
|
|
create table test.t1 (a int primary key,
|
|
b int,
|
|
c int,
|
|
d int,
|
|
unique(b) using hash,
|
|
key(c),
|
|
key(a,c))
|
|
comment="NDB_TABLE=READ_BACKUP=1"
|
|
engine=ndb;
|
|
|
|
create table test.t2 (a int primary key,
|
|
b int,
|
|
c int,
|
|
d text,
|
|
unique(b) using hash,
|
|
key(c))
|
|
comment="NDB_TABLE=READ_BACKUP=1"
|
|
engine=ndb;
|
|
|
|
--source ndb_read_location_domain.inc
|
|
|
|
drop table test.t1;
|
|
drop table test.t2;
|
|
|
|
--echo Test read-locality of FULLY-REPLICATED
|
|
|
|
create table test.t1 (a int primary key,
|
|
b int,
|
|
c int,
|
|
d int,
|
|
unique(b) using hash,
|
|
key(c),
|
|
key(a,c))
|
|
comment="NDB_TABLE=FULLY_REPLICATED=1"
|
|
engine=ndb;
|
|
|
|
create table test.t2 (a int primary key,
|
|
b int,
|
|
c int,
|
|
d text,
|
|
unique(b) using hash,
|
|
key(c))
|
|
comment="NDB_TABLE=FULLY_REPLICATED=1"
|
|
engine=ndb;
|
|
|
|
--source ndb_read_location_domain.inc
|
|
|
|
--echo Test read-locality of FULLY-REPLICATED with 2 node groups
|
|
--exec $NDB_MGM --verbose=0 -e'create nodegroup 3,4'
|
|
alter table t1 algorithm=inplace, reorganize partition;
|
|
alter table t2 algorithm=inplace, reorganize partition;
|
|
|
|
--source ndb_read_location_domain.inc
|
|
drop table test.t1;
|
|
drop table test.t2;
|
|
|
|
--echo Test read-locality of READ-BACKUP with 3 node groups
|
|
--exec $NDB_MGM --verbose=0 -e'create nodegroup 5,6'
|
|
|
|
create table test.t1 (a int primary key,
|
|
b int,
|
|
c int,
|
|
d int,
|
|
unique(b) using hash,
|
|
key(c),
|
|
key(a,c))
|
|
comment="NDB_TABLE=READ_BACKUP=1"
|
|
engine=ndb;
|
|
|
|
create table test.t2 (a int primary key,
|
|
b int,
|
|
c int,
|
|
d text,
|
|
unique(b) using hash,
|
|
key(c))
|
|
comment="NDB_TABLE=READ_BACKUP=1"
|
|
engine=ndb;
|
|
|
|
--source ndb_read_location_domain.inc
|
|
drop table test.t1;
|
|
drop table test.t2;
|