241 lines
7.0 KiB
Plaintext
241 lines
7.0 KiB
Plaintext
set @save_ndb_read_backup = @@global.ndb_read_backup;
|
|
set @@global.ndb_read_backup = ON;
|
|
create table t1 (a bigint, primary key (a)) engine=ndb;
|
|
show create table t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`a` bigint(20) NOT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=READ_BACKUP=1'
|
|
drop table t1;
|
|
create table t1 (a bigint, primary key (a)) engine=ndb
|
|
comment="junk";
|
|
show create table t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`a` bigint(20) NOT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=READ_BACKUP=1 junk'
|
|
create table t2 (a bigint, primary key (a)) engine=ndb
|
|
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RP_BY_LDM";
|
|
show create table t2;
|
|
Table Create Table
|
|
t2 CREATE TABLE `t2` (
|
|
`a` bigint(20) NOT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=READ_BACKUP=1,PARTITION_BALANCE=FOR_RP_BY_LDM'
|
|
drop table t2;
|
|
create table t2 (a bigint, primary key (a)) engine=ndb
|
|
comment="before NDB_TABLE=PARTITION_BALANCE=FOR_RP_BY_LDM after";
|
|
show create table t2;
|
|
Table Create Table
|
|
t2 CREATE TABLE `t2` (
|
|
`a` bigint(20) NOT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='before NDB_TABLE=READ_BACKUP=1,PARTITION_BALANCE=FOR_RP_BY_LDM after'
|
|
create table t3 (a bigint, primary key (a)) engine=ndb
|
|
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_LDM";
|
|
show create table t3;
|
|
Table Create Table
|
|
t3 CREATE TABLE `t3` (
|
|
`a` bigint(20) NOT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=READ_BACKUP=1,PARTITION_BALANCE=FOR_RA_BY_LDM'
|
|
create table t4 (a bigint, primary key (a)) engine=ndb
|
|
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RP_BY_NODE";
|
|
show create table t4;
|
|
Table Create Table
|
|
t4 CREATE TABLE `t4` (
|
|
`a` bigint(20) NOT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=READ_BACKUP=1,PARTITION_BALANCE=FOR_RP_BY_NODE'
|
|
create table t5 (a bigint, primary key (a)) engine=ndb
|
|
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_NODE";
|
|
show create table t5;
|
|
Table Create Table
|
|
t5 CREATE TABLE `t5` (
|
|
`a` bigint(20) NOT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=READ_BACKUP=1,PARTITION_BALANCE=FOR_RA_BY_NODE'
|
|
-- t1 --
|
|
Version: Any
|
|
Fragment type: HashMapPartition
|
|
K Value: 6
|
|
Min load factor: 78
|
|
Max load factor: 80
|
|
Temporary table: no
|
|
Number of attributes: 1
|
|
Number of primary keys: 1
|
|
Length of frm data: XXX
|
|
Max Rows: 0
|
|
Row Checksum: 1
|
|
Row GCI: 1
|
|
SingleUserMode: 0
|
|
ForceVarPart: 1
|
|
PartitionCount: 8
|
|
FragmentCount: 8
|
|
PartitionBalance: FOR_RP_BY_LDM
|
|
ExtraRowGciBits: 0
|
|
ExtraRowAuthorBits: 0
|
|
TableStatus: Retrieved
|
|
Table options: readbackup
|
|
HashMap: DEFAULT-HASHMAP-3840-8
|
|
-- Attributes --
|
|
a Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
|
|
-- Indexes --
|
|
PRIMARY KEY(a) - UniqueHashIndex
|
|
PRIMARY(a) - OrderedIndex
|
|
-- t2 --
|
|
Version: Any
|
|
Fragment type: HashMapPartition
|
|
K Value: 6
|
|
Min load factor: 78
|
|
Max load factor: 80
|
|
Temporary table: no
|
|
Number of attributes: 1
|
|
Number of primary keys: 1
|
|
Length of frm data: XXX
|
|
Max Rows: 0
|
|
Row Checksum: 1
|
|
Row GCI: 1
|
|
SingleUserMode: 0
|
|
ForceVarPart: 1
|
|
PartitionCount: 8
|
|
FragmentCount: 8
|
|
PartitionBalance: FOR_RP_BY_LDM
|
|
ExtraRowGciBits: 0
|
|
ExtraRowAuthorBits: 0
|
|
TableStatus: Retrieved
|
|
Table options: readbackup
|
|
HashMap: DEFAULT-HASHMAP-3840-8
|
|
-- Attributes --
|
|
a Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
|
|
-- Indexes --
|
|
PRIMARY KEY(a) - UniqueHashIndex
|
|
PRIMARY(a) - OrderedIndex
|
|
-- t3 --
|
|
Version: Any
|
|
Fragment type: HashMapPartition
|
|
K Value: 6
|
|
Min load factor: 78
|
|
Max load factor: 80
|
|
Temporary table: no
|
|
Number of attributes: 1
|
|
Number of primary keys: 1
|
|
Length of frm data: XXX
|
|
Max Rows: 0
|
|
Row Checksum: 1
|
|
Row GCI: 1
|
|
SingleUserMode: 0
|
|
ForceVarPart: 1
|
|
PartitionCount: 4
|
|
FragmentCount: 4
|
|
PartitionBalance: FOR_RA_BY_LDM
|
|
ExtraRowGciBits: 0
|
|
ExtraRowAuthorBits: 0
|
|
TableStatus: Retrieved
|
|
Table options: readbackup
|
|
HashMap: DEFAULT-HASHMAP-3840-4
|
|
-- Attributes --
|
|
a Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
|
|
-- Indexes --
|
|
PRIMARY KEY(a) - UniqueHashIndex
|
|
PRIMARY(a) - OrderedIndex
|
|
-- t4 --
|
|
Version: Any
|
|
Fragment type: HashMapPartition
|
|
K Value: 6
|
|
Min load factor: 78
|
|
Max load factor: 80
|
|
Temporary table: no
|
|
Number of attributes: 1
|
|
Number of primary keys: 1
|
|
Length of frm data: XXX
|
|
Max Rows: 0
|
|
Row Checksum: 1
|
|
Row GCI: 1
|
|
SingleUserMode: 0
|
|
ForceVarPart: 1
|
|
PartitionCount: 2
|
|
FragmentCount: 2
|
|
PartitionBalance: FOR_RP_BY_NODE
|
|
ExtraRowGciBits: 0
|
|
ExtraRowAuthorBits: 0
|
|
TableStatus: Retrieved
|
|
Table options: readbackup
|
|
HashMap: DEFAULT-HASHMAP-3840-2
|
|
-- Attributes --
|
|
a Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
|
|
-- Indexes --
|
|
PRIMARY KEY(a) - UniqueHashIndex
|
|
PRIMARY(a) - OrderedIndex
|
|
-- t5 --
|
|
Version: Any
|
|
Fragment type: HashMapPartition
|
|
K Value: 6
|
|
Min load factor: 78
|
|
Max load factor: 80
|
|
Temporary table: no
|
|
Number of attributes: 1
|
|
Number of primary keys: 1
|
|
Length of frm data: XXX
|
|
Max Rows: 0
|
|
Row Checksum: 1
|
|
Row GCI: 1
|
|
SingleUserMode: 0
|
|
ForceVarPart: 1
|
|
PartitionCount: 1
|
|
FragmentCount: 1
|
|
PartitionBalance: FOR_RA_BY_NODE
|
|
ExtraRowGciBits: 0
|
|
ExtraRowAuthorBits: 0
|
|
TableStatus: Retrieved
|
|
Table options: readbackup
|
|
HashMap: DEFAULT-HASHMAP-3840-1
|
|
-- Attributes --
|
|
a Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
|
|
-- Indexes --
|
|
PRIMARY KEY(a) - UniqueHashIndex
|
|
PRIMARY(a) - OrderedIndex
|
|
|
|
NDBT_ProgramExit: 0 - OK
|
|
|
|
drop table t1, t2, t3, t4, t5;
|
|
set @@global.ndb_read_backup = @save_ndb_read_backup;
|
|
set @save_ndb_fully_replicated = @@global.ndb_fully_replicated;
|
|
set @@global.ndb_fully_replicated = ON;
|
|
create table t1 (a bigint, primary key (a)) engine=ndb;
|
|
show create table t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`a` bigint(20) NOT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=FULLY_REPLICATED=1'
|
|
drop table t1;
|
|
create table t1 (a bigint, primary key (a)) engine=ndb
|
|
comment="junk";
|
|
show create table t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`a` bigint(20) NOT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=FULLY_REPLICATED=1 junk'
|
|
create table t2 (a bigint, primary key (a)) engine=ndb
|
|
comment="before NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_LDM after";
|
|
show create table t2;
|
|
Table Create Table
|
|
t2 CREATE TABLE `t2` (
|
|
`a` bigint(20) NOT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='before NDB_TABLE=FULLY_REPLICATED=1,PARTITION_BALANCE=FOR_RA_BY_LDM after'
|
|
create table t5 (a bigint, primary key (a)) engine=ndb
|
|
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_NODE";
|
|
show create table t5;
|
|
Table Create Table
|
|
t5 CREATE TABLE `t5` (
|
|
`a` bigint(20) NOT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=FULLY_REPLICATED=1,PARTITION_BALANCE=FOR_RA_BY_NODE'
|
|
drop table t1, t2, t5;
|
|
set @@global.ndb_fully_replicated = @save_ndb_fully_replicated;
|