| 1 |
set @save_ndb_read_backup = @@global.ndb_read_backup; |
| 2 |
set @@global.ndb_read_backup = ON; |
| 3 |
create table t1 (a bigint, primary key (a)) engine=ndb; |
| 4 |
show create table t1; |
| 5 |
Table Create Table |
| 6 |
t1 CREATE TABLE `t1` ( |
| 7 |
`a` bigint NOT NULL, |
| 8 |
PRIMARY KEY (`a`) |
| 9 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 10 |
drop table t1; |
| 11 |
create table t1 (a bigint, primary key (a)) engine=ndb |
| 12 |
comment="junk"; |
| 13 |
show create table t1; |
| 14 |
Table Create Table |
| 15 |
t1 CREATE TABLE `t1` ( |
| 16 |
`a` bigint NOT NULL, |
| 17 |
PRIMARY KEY (`a`) |
| 18 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='junk' |
| 19 |
create table t2 (a bigint, primary key (a)) engine=ndb |
| 20 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RP_BY_LDM"; |
| 21 |
show create table t2; |
| 22 |
Table Create Table |
| 23 |
t2 CREATE TABLE `t2` ( |
| 24 |
`a` bigint NOT NULL, |
| 25 |
PRIMARY KEY (`a`) |
| 26 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=PARTITION_BALANCE=FOR_RP_BY_LDM' |
| 27 |
drop table t2; |
| 28 |
create table t2 (a bigint, primary key (a)) engine=ndb |
| 29 |
comment="before NDB_TABLE=PARTITION_BALANCE=FOR_RP_BY_LDM after"; |
| 30 |
show create table t2; |
| 31 |
Table Create Table |
| 32 |
t2 CREATE TABLE `t2` ( |
| 33 |
`a` bigint NOT NULL, |
| 34 |
PRIMARY KEY (`a`) |
| 35 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='before NDB_TABLE=PARTITION_BALANCE=FOR_RP_BY_LDM after' |
| 36 |
create table t3 (a bigint, primary key (a)) engine=ndb |
| 37 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_LDM"; |
| 38 |
show create table t3; |
| 39 |
Table Create Table |
| 40 |
t3 CREATE TABLE `t3` ( |
| 41 |
`a` bigint NOT NULL, |
| 42 |
PRIMARY KEY (`a`) |
| 43 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_LDM' |
| 44 |
create table t4 (a bigint, primary key (a)) engine=ndb |
| 45 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RP_BY_NODE"; |
| 46 |
show create table t4; |
| 47 |
Table Create Table |
| 48 |
t4 CREATE TABLE `t4` ( |
| 49 |
`a` bigint NOT NULL, |
| 50 |
PRIMARY KEY (`a`) |
| 51 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=PARTITION_BALANCE=FOR_RP_BY_NODE' |
| 52 |
create table t5 (a bigint, primary key (a)) engine=ndb |
| 53 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_NODE"; |
| 54 |
show create table t5; |
| 55 |
Table Create Table |
| 56 |
t5 CREATE TABLE `t5` ( |
| 57 |
`a` bigint NOT NULL, |
| 58 |
PRIMARY KEY (`a`) |
| 59 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_NODE' |
| 60 |
-- t1 -- |
| 61 |
Version: Any |
| 62 |
Fragment type: HashMapPartition |
| 63 |
K Value: 6 |
| 64 |
Min load factor: 78 |
| 65 |
Max load factor: 80 |
| 66 |
Temporary table: no |
| 67 |
Number of attributes: 1 |
| 68 |
Number of primary keys: 1 |
| 69 |
Length of frm data: XXX |
| 70 |
Max Rows: 0 |
| 71 |
Row Checksum: 1 |
| 72 |
Row GCI: 1 |
| 73 |
SingleUserMode: 0 |
| 74 |
ForceVarPart: 1 |
| 75 |
PartitionCount: 8 |
| 76 |
FragmentCount: 8 |
| 77 |
PartitionBalance: FOR_RP_BY_LDM |
| 78 |
ExtraRowGciBits: 0 |
| 79 |
ExtraRowAuthorBits: 0 |
| 80 |
TableStatus: Retrieved |
| 81 |
Table options: readbackup |
| 82 |
HashMap: DEFAULT-HASHMAP-3840-8 |
| 83 |
-- Attributes -- |
| 84 |
a Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY |
| 85 |
-- Indexes -- |
| 86 |
PRIMARY KEY(a) - UniqueHashIndex |
| 87 |
PRIMARY(a) - OrderedIndex |
| 88 |
-- t2 -- |
| 89 |
Version: Any |
| 90 |
Fragment type: HashMapPartition |
| 91 |
K Value: 6 |
| 92 |
Min load factor: 78 |
| 93 |
Max load factor: 80 |
| 94 |
Temporary table: no |
| 95 |
Number of attributes: 1 |
| 96 |
Number of primary keys: 1 |
| 97 |
Length of frm data: XXX |
| 98 |
Max Rows: 0 |
| 99 |
Row Checksum: 1 |
| 100 |
Row GCI: 1 |
| 101 |
SingleUserMode: 0 |
| 102 |
ForceVarPart: 1 |
| 103 |
PartitionCount: 8 |
| 104 |
FragmentCount: 8 |
| 105 |
PartitionBalance: FOR_RP_BY_LDM |
| 106 |
ExtraRowGciBits: 0 |
| 107 |
ExtraRowAuthorBits: 0 |
| 108 |
TableStatus: Retrieved |
| 109 |
Table options: readbackup |
| 110 |
HashMap: DEFAULT-HASHMAP-3840-8 |
| 111 |
-- Attributes -- |
| 112 |
a Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY |
| 113 |
-- Indexes -- |
| 114 |
PRIMARY KEY(a) - UniqueHashIndex |
| 115 |
PRIMARY(a) - OrderedIndex |
| 116 |
-- t3 -- |
| 117 |
Version: Any |
| 118 |
Fragment type: HashMapPartition |
| 119 |
K Value: 6 |
| 120 |
Min load factor: 78 |
| 121 |
Max load factor: 80 |
| 122 |
Temporary table: no |
| 123 |
Number of attributes: 1 |
| 124 |
Number of primary keys: 1 |
| 125 |
Length of frm data: XXX |
| 126 |
Max Rows: 0 |
| 127 |
Row Checksum: 1 |
| 128 |
Row GCI: 1 |
| 129 |
SingleUserMode: 0 |
| 130 |
ForceVarPart: 1 |
| 131 |
PartitionCount: 4 |
| 132 |
FragmentCount: 4 |
| 133 |
PartitionBalance: FOR_RA_BY_LDM |
| 134 |
ExtraRowGciBits: 0 |
| 135 |
ExtraRowAuthorBits: 0 |
| 136 |
TableStatus: Retrieved |
| 137 |
Table options: readbackup |
| 138 |
HashMap: DEFAULT-HASHMAP-3840-4 |
| 139 |
-- Attributes -- |
| 140 |
a Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY |
| 141 |
-- Indexes -- |
| 142 |
PRIMARY KEY(a) - UniqueHashIndex |
| 143 |
PRIMARY(a) - OrderedIndex |
| 144 |
-- t4 -- |
| 145 |
Version: Any |
| 146 |
Fragment type: HashMapPartition |
| 147 |
K Value: 6 |
| 148 |
Min load factor: 78 |
| 149 |
Max load factor: 80 |
| 150 |
Temporary table: no |
| 151 |
Number of attributes: 1 |
| 152 |
Number of primary keys: 1 |
| 153 |
Length of frm data: XXX |
| 154 |
Max Rows: 0 |
| 155 |
Row Checksum: 1 |
| 156 |
Row GCI: 1 |
| 157 |
SingleUserMode: 0 |
| 158 |
ForceVarPart: 1 |
| 159 |
PartitionCount: 2 |
| 160 |
FragmentCount: 2 |
| 161 |
PartitionBalance: FOR_RP_BY_NODE |
| 162 |
ExtraRowGciBits: 0 |
| 163 |
ExtraRowAuthorBits: 0 |
| 164 |
TableStatus: Retrieved |
| 165 |
Table options: readbackup |
| 166 |
HashMap: DEFAULT-HASHMAP-3840-2 |
| 167 |
-- Attributes -- |
| 168 |
a Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY |
| 169 |
-- Indexes -- |
| 170 |
PRIMARY KEY(a) - UniqueHashIndex |
| 171 |
PRIMARY(a) - OrderedIndex |
| 172 |
-- t5 -- |
| 173 |
Version: Any |
| 174 |
Fragment type: HashMapPartition |
| 175 |
K Value: 6 |
| 176 |
Min load factor: 78 |
| 177 |
Max load factor: 80 |
| 178 |
Temporary table: no |
| 179 |
Number of attributes: 1 |
| 180 |
Number of primary keys: 1 |
| 181 |
Length of frm data: XXX |
| 182 |
Max Rows: 0 |
| 183 |
Row Checksum: 1 |
| 184 |
Row GCI: 1 |
| 185 |
SingleUserMode: 0 |
| 186 |
ForceVarPart: 1 |
| 187 |
PartitionCount: 1 |
| 188 |
FragmentCount: 1 |
| 189 |
PartitionBalance: FOR_RA_BY_NODE |
| 190 |
ExtraRowGciBits: 0 |
| 191 |
ExtraRowAuthorBits: 0 |
| 192 |
TableStatus: Retrieved |
| 193 |
Table options: readbackup |
| 194 |
HashMap: DEFAULT-HASHMAP-3840-1 |
| 195 |
-- Attributes -- |
| 196 |
a Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY |
| 197 |
-- Indexes -- |
| 198 |
PRIMARY KEY(a) - UniqueHashIndex |
| 199 |
PRIMARY(a) - OrderedIndex |
| 200 |
drop table t1, t2, t3, t4, t5; |
| 201 |
set @@global.ndb_read_backup = @save_ndb_read_backup; |
| 202 |
set @save_ndb_fully_replicated = @@global.ndb_fully_replicated; |
| 203 |
set @@global.ndb_fully_replicated = ON; |
| 204 |
create table t1 (a bigint, primary key (a)) engine=ndb; |
| 205 |
show create table t1; |
| 206 |
Table Create Table |
| 207 |
t1 CREATE TABLE `t1` ( |
| 208 |
`a` bigint NOT NULL, |
| 209 |
PRIMARY KEY (`a`) |
| 210 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 211 |
drop table t1; |
| 212 |
create table t1 (a bigint, primary key (a)) engine=ndb |
| 213 |
comment="junk"; |
| 214 |
show create table t1; |
| 215 |
Table Create Table |
| 216 |
t1 CREATE TABLE `t1` ( |
| 217 |
`a` bigint NOT NULL, |
| 218 |
PRIMARY KEY (`a`) |
| 219 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='junk' |
| 220 |
create table t2 (a bigint, primary key (a)) engine=ndb |
| 221 |
comment="before NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_LDM after"; |
| 222 |
show create table t2; |
| 223 |
Table Create Table |
| 224 |
t2 CREATE TABLE `t2` ( |
| 225 |
`a` bigint NOT NULL, |
| 226 |
PRIMARY KEY (`a`) |
| 227 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='before NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_LDM after' |
| 228 |
create table t5 (a bigint, primary key (a)) engine=ndb |
| 229 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_NODE"; |
| 230 |
show create table t5; |
| 231 |
Table Create Table |
| 232 |
t5 CREATE TABLE `t5` ( |
| 233 |
`a` bigint NOT NULL, |
| 234 |
PRIMARY KEY (`a`) |
| 235 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_NODE' |
| 236 |
drop table t1, t2, t5; |
| 237 |
set @@global.ndb_fully_replicated = @save_ndb_fully_replicated; |