| 1 |
create table t1 (id int NOT NULL PRIMARY KEY, data char(8)) engine=ndb; |
| 2 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 3 |
where fq_name = 'test/def/t1' order by node_id, fragment_num, block_instance; |
| 4 |
node_id fragment_num block_instance |
| 5 |
1 0 1 |
| 6 |
1 2 2 |
| 7 |
1 4 3 |
| 8 |
1 6 4 |
| 9 |
1 8 1 |
| 10 |
1 10 2 |
| 11 |
1 12 3 |
| 12 |
1 14 4 |
| 13 |
2 0 1 |
| 14 |
2 2 2 |
| 15 |
2 4 3 |
| 16 |
2 6 4 |
| 17 |
2 8 1 |
| 18 |
2 10 2 |
| 19 |
2 12 3 |
| 20 |
2 14 4 |
| 21 |
3 1 1 |
| 22 |
3 3 2 |
| 23 |
3 5 3 |
| 24 |
3 7 4 |
| 25 |
3 9 1 |
| 26 |
3 11 2 |
| 27 |
3 13 3 |
| 28 |
3 15 4 |
| 29 |
4 1 1 |
| 30 |
4 3 2 |
| 31 |
4 5 3 |
| 32 |
4 7 4 |
| 33 |
4 9 1 |
| 34 |
4 11 2 |
| 35 |
4 13 3 |
| 36 |
4 15 4 |
| 37 |
create table t2 (id int NOT NULL PRIMARY KEY, data char(8)) engine=ndb |
| 38 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RP_BY_LDM"; |
| 39 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 40 |
where fq_name = 'test/def/t2' order by node_id, fragment_num, block_instance; |
| 41 |
node_id fragment_num block_instance |
| 42 |
1 0 1 |
| 43 |
1 2 2 |
| 44 |
1 4 3 |
| 45 |
1 6 4 |
| 46 |
1 8 1 |
| 47 |
1 10 2 |
| 48 |
1 12 3 |
| 49 |
1 14 4 |
| 50 |
2 0 1 |
| 51 |
2 2 2 |
| 52 |
2 4 3 |
| 53 |
2 6 4 |
| 54 |
2 8 1 |
| 55 |
2 10 2 |
| 56 |
2 12 3 |
| 57 |
2 14 4 |
| 58 |
3 1 1 |
| 59 |
3 3 2 |
| 60 |
3 5 3 |
| 61 |
3 7 4 |
| 62 |
3 9 1 |
| 63 |
3 11 2 |
| 64 |
3 13 3 |
| 65 |
3 15 4 |
| 66 |
4 1 1 |
| 67 |
4 3 2 |
| 68 |
4 5 3 |
| 69 |
4 7 4 |
| 70 |
4 9 1 |
| 71 |
4 11 2 |
| 72 |
4 13 3 |
| 73 |
4 15 4 |
| 74 |
create table t3 (id int NOT NULL PRIMARY KEY, data char(8)) engine=ndb |
| 75 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_LDM"; |
| 76 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 77 |
where fq_name = 'test/def/t3' order by node_id, fragment_num, block_instance; |
| 78 |
node_id fragment_num block_instance |
| 79 |
1 0 1 |
| 80 |
1 2 2 |
| 81 |
1 4 3 |
| 82 |
1 6 4 |
| 83 |
2 0 1 |
| 84 |
2 2 2 |
| 85 |
2 4 3 |
| 86 |
2 6 4 |
| 87 |
3 1 1 |
| 88 |
3 3 2 |
| 89 |
3 5 3 |
| 90 |
3 7 4 |
| 91 |
4 1 1 |
| 92 |
4 3 2 |
| 93 |
4 5 3 |
| 94 |
4 7 4 |
| 95 |
create table t4 (id int NOT NULL PRIMARY KEY, data char(8)) engine=ndb |
| 96 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RP_BY_NODE"; |
| 97 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 98 |
where fq_name = 'test/def/t4' order by node_id, fragment_num, block_instance; |
| 99 |
node_id fragment_num block_instance |
| 100 |
1 0 1 |
| 101 |
1 2 2 |
| 102 |
2 0 1 |
| 103 |
2 2 2 |
| 104 |
3 1 1 |
| 105 |
3 3 2 |
| 106 |
4 1 1 |
| 107 |
4 3 2 |
| 108 |
create table t5 (id int NOT NULL PRIMARY KEY, data char(8)) engine=ndb |
| 109 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_NODE"; |
| 110 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 111 |
where fq_name = 'test/def/t5' order by node_id, fragment_num, block_instance; |
| 112 |
node_id fragment_num block_instance |
| 113 |
1 0 3 |
| 114 |
2 0 3 |
| 115 |
3 1 3 |
| 116 |
4 1 3 |
| 117 |
create table t6 (id int NOT NULL PRIMARY KEY, data char(8)) engine=ndb |
| 118 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_LDM_X_2"; |
| 119 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 120 |
where fq_name = 'test/def/t6' order by node_id, fragment_num, block_instance; |
| 121 |
node_id fragment_num block_instance |
| 122 |
1 0 1 |
| 123 |
1 2 2 |
| 124 |
1 4 3 |
| 125 |
1 6 4 |
| 126 |
1 8 1 |
| 127 |
1 10 2 |
| 128 |
1 12 3 |
| 129 |
1 14 4 |
| 130 |
2 0 1 |
| 131 |
2 2 2 |
| 132 |
2 4 3 |
| 133 |
2 6 4 |
| 134 |
2 8 1 |
| 135 |
2 10 2 |
| 136 |
2 12 3 |
| 137 |
2 14 4 |
| 138 |
3 1 1 |
| 139 |
3 3 2 |
| 140 |
3 5 3 |
| 141 |
3 7 4 |
| 142 |
3 9 1 |
| 143 |
3 11 2 |
| 144 |
3 13 3 |
| 145 |
3 15 4 |
| 146 |
4 1 1 |
| 147 |
4 3 2 |
| 148 |
4 5 3 |
| 149 |
4 7 4 |
| 150 |
4 9 1 |
| 151 |
4 11 2 |
| 152 |
4 13 3 |
| 153 |
4 15 4 |
| 154 |
create table t7 (id int NOT NULL PRIMARY KEY, data char(8)) engine=ndb |
| 155 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_LDM_X_3"; |
| 156 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 157 |
where fq_name = 'test/def/t7' order by node_id, fragment_num, block_instance; |
| 158 |
node_id fragment_num block_instance |
| 159 |
1 0 1 |
| 160 |
1 2 2 |
| 161 |
1 4 3 |
| 162 |
1 6 4 |
| 163 |
1 8 1 |
| 164 |
1 10 2 |
| 165 |
1 12 3 |
| 166 |
1 14 4 |
| 167 |
1 16 1 |
| 168 |
1 18 2 |
| 169 |
1 20 3 |
| 170 |
1 22 4 |
| 171 |
2 0 1 |
| 172 |
2 2 2 |
| 173 |
2 4 3 |
| 174 |
2 6 4 |
| 175 |
2 8 1 |
| 176 |
2 10 2 |
| 177 |
2 12 3 |
| 178 |
2 14 4 |
| 179 |
2 16 1 |
| 180 |
2 18 2 |
| 181 |
2 20 3 |
| 182 |
2 22 4 |
| 183 |
3 1 1 |
| 184 |
3 3 2 |
| 185 |
3 5 3 |
| 186 |
3 7 4 |
| 187 |
3 9 1 |
| 188 |
3 11 2 |
| 189 |
3 13 3 |
| 190 |
3 15 4 |
| 191 |
3 17 1 |
| 192 |
3 19 2 |
| 193 |
3 21 3 |
| 194 |
3 23 4 |
| 195 |
4 1 1 |
| 196 |
4 3 2 |
| 197 |
4 5 3 |
| 198 |
4 7 4 |
| 199 |
4 9 1 |
| 200 |
4 11 2 |
| 201 |
4 13 3 |
| 202 |
4 15 4 |
| 203 |
4 17 1 |
| 204 |
4 19 2 |
| 205 |
4 21 3 |
| 206 |
4 23 4 |
| 207 |
create table t8 (id int NOT NULL PRIMARY KEY, data char(8)) engine=ndb |
| 208 |
comment="NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_LDM_X_4"; |
| 209 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 210 |
where fq_name = 'test/def/t8' order by node_id, fragment_num, block_instance; |
| 211 |
node_id fragment_num block_instance |
| 212 |
1 0 1 |
| 213 |
1 2 2 |
| 214 |
1 4 3 |
| 215 |
1 6 4 |
| 216 |
1 8 1 |
| 217 |
1 10 2 |
| 218 |
1 12 3 |
| 219 |
1 14 4 |
| 220 |
1 16 1 |
| 221 |
1 18 2 |
| 222 |
1 20 3 |
| 223 |
1 22 4 |
| 224 |
1 24 1 |
| 225 |
1 26 2 |
| 226 |
1 28 3 |
| 227 |
1 30 4 |
| 228 |
2 0 1 |
| 229 |
2 2 2 |
| 230 |
2 4 3 |
| 231 |
2 6 4 |
| 232 |
2 8 1 |
| 233 |
2 10 2 |
| 234 |
2 12 3 |
| 235 |
2 14 4 |
| 236 |
2 16 1 |
| 237 |
2 18 2 |
| 238 |
2 20 3 |
| 239 |
2 22 4 |
| 240 |
2 24 1 |
| 241 |
2 26 2 |
| 242 |
2 28 3 |
| 243 |
2 30 4 |
| 244 |
3 1 1 |
| 245 |
3 3 2 |
| 246 |
3 5 3 |
| 247 |
3 7 4 |
| 248 |
3 9 1 |
| 249 |
3 11 2 |
| 250 |
3 13 3 |
| 251 |
3 15 4 |
| 252 |
3 17 1 |
| 253 |
3 19 2 |
| 254 |
3 21 3 |
| 255 |
3 23 4 |
| 256 |
3 25 1 |
| 257 |
3 27 2 |
| 258 |
3 29 3 |
| 259 |
3 31 4 |
| 260 |
4 1 1 |
| 261 |
4 3 2 |
| 262 |
4 5 3 |
| 263 |
4 7 4 |
| 264 |
4 9 1 |
| 265 |
4 11 2 |
| 266 |
4 13 3 |
| 267 |
4 15 4 |
| 268 |
4 17 1 |
| 269 |
4 19 2 |
| 270 |
4 21 3 |
| 271 |
4 23 4 |
| 272 |
4 25 1 |
| 273 |
4 27 2 |
| 274 |
4 29 3 |
| 275 |
4 31 4 |
| 276 |
select count(*) into @cnt_t1_0 |
| 277 |
from information_schema.partitions |
| 278 |
where table_schema = 'test' and table_name = 't1'; |
| 279 |
select count(*) into @cnt_t2_0 |
| 280 |
from information_schema.partitions |
| 281 |
where table_schema = 'test' and table_name = 't2'; |
| 282 |
select count(*) into @cnt_t3_0 |
| 283 |
from information_schema.partitions |
| 284 |
where table_schema = 'test' and table_name = 't3'; |
| 285 |
select count(*) into @cnt_t4_0 |
| 286 |
from information_schema.partitions |
| 287 |
where table_schema = 'test' and table_name = 't4'; |
| 288 |
select count(*) into @cnt_t5_0 |
| 289 |
from information_schema.partitions |
| 290 |
where table_schema = 'test' and table_name = 't5'; |
| 291 |
select count(*) into @cnt_t6_0 |
| 292 |
from information_schema.partitions |
| 293 |
where table_schema = 'test' and table_name = 't6'; |
| 294 |
select count(*) into @cnt_t7_0 |
| 295 |
from information_schema.partitions |
| 296 |
where table_schema = 'test' and table_name = 't7'; |
| 297 |
select count(*) into @cnt_t8_0 |
| 298 |
from information_schema.partitions |
| 299 |
where table_schema = 'test' and table_name = 't8'; |
| 300 |
select @cnt_t1_0 = @cnt_t2_0; |
| 301 |
@cnt_t1_0 = @cnt_t2_0 |
| 302 |
1 |
| 303 |
select @cnt_t2_0 > @cnt_t3_0; |
| 304 |
@cnt_t2_0 > @cnt_t3_0 |
| 305 |
1 |
| 306 |
select @cnt_t3_0 > @cnt_t4_0; |
| 307 |
@cnt_t3_0 > @cnt_t4_0 |
| 308 |
1 |
| 309 |
select @cnt_t4_0 > @cnt_t5_0; |
| 310 |
@cnt_t4_0 > @cnt_t5_0 |
| 311 |
1 |
| 312 |
select @cnt_t6_0 = 2 * @cnt_t3_0; |
| 313 |
@cnt_t6_0 = 2 * @cnt_t3_0 |
| 314 |
1 |
| 315 |
select @cnt_t7_0 = 3 * @cnt_t3_0; |
| 316 |
@cnt_t7_0 = 3 * @cnt_t3_0 |
| 317 |
1 |
| 318 |
select @cnt_t8_0 = 4 * @cnt_t3_0; |
| 319 |
@cnt_t8_0 = 4 * @cnt_t3_0 |
| 320 |
1 |
| 321 |
Creating nodegroup |
| 322 |
alter table t1 algorithm=inplace, reorganize partition; |
| 323 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 324 |
where fq_name = 'test/def/t1' order by node_id, fragment_num, block_instance; |
| 325 |
node_id fragment_num block_instance |
| 326 |
1 0 1 |
| 327 |
1 2 2 |
| 328 |
1 4 3 |
| 329 |
1 6 4 |
| 330 |
1 8 1 |
| 331 |
1 10 2 |
| 332 |
1 12 3 |
| 333 |
1 14 4 |
| 334 |
2 0 1 |
| 335 |
2 2 2 |
| 336 |
2 4 3 |
| 337 |
2 6 4 |
| 338 |
2 8 1 |
| 339 |
2 10 2 |
| 340 |
2 12 3 |
| 341 |
2 14 4 |
| 342 |
3 1 1 |
| 343 |
3 3 2 |
| 344 |
3 5 3 |
| 345 |
3 7 4 |
| 346 |
3 9 1 |
| 347 |
3 11 2 |
| 348 |
3 13 3 |
| 349 |
3 15 4 |
| 350 |
4 1 1 |
| 351 |
4 3 2 |
| 352 |
4 5 3 |
| 353 |
4 7 4 |
| 354 |
4 9 1 |
| 355 |
4 11 2 |
| 356 |
4 13 3 |
| 357 |
4 15 4 |
| 358 |
5 16 1 |
| 359 |
5 17 2 |
| 360 |
5 18 3 |
| 361 |
5 19 4 |
| 362 |
5 20 1 |
| 363 |
5 21 2 |
| 364 |
5 22 3 |
| 365 |
5 23 4 |
| 366 |
6 16 1 |
| 367 |
6 17 2 |
| 368 |
6 18 3 |
| 369 |
6 19 4 |
| 370 |
6 20 1 |
| 371 |
6 21 2 |
| 372 |
6 22 3 |
| 373 |
6 23 4 |
| 374 |
alter table t2 algorithm=inplace, reorganize partition; |
| 375 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 376 |
where fq_name = 'test/def/t2' order by node_id, fragment_num, block_instance; |
| 377 |
node_id fragment_num block_instance |
| 378 |
1 0 1 |
| 379 |
1 2 2 |
| 380 |
1 4 3 |
| 381 |
1 6 4 |
| 382 |
1 8 1 |
| 383 |
1 10 2 |
| 384 |
1 12 3 |
| 385 |
1 14 4 |
| 386 |
2 0 1 |
| 387 |
2 2 2 |
| 388 |
2 4 3 |
| 389 |
2 6 4 |
| 390 |
2 8 1 |
| 391 |
2 10 2 |
| 392 |
2 12 3 |
| 393 |
2 14 4 |
| 394 |
3 1 1 |
| 395 |
3 3 2 |
| 396 |
3 5 3 |
| 397 |
3 7 4 |
| 398 |
3 9 1 |
| 399 |
3 11 2 |
| 400 |
3 13 3 |
| 401 |
3 15 4 |
| 402 |
4 1 1 |
| 403 |
4 3 2 |
| 404 |
4 5 3 |
| 405 |
4 7 4 |
| 406 |
4 9 1 |
| 407 |
4 11 2 |
| 408 |
4 13 3 |
| 409 |
4 15 4 |
| 410 |
5 16 1 |
| 411 |
5 17 2 |
| 412 |
5 18 3 |
| 413 |
5 19 4 |
| 414 |
5 20 1 |
| 415 |
5 21 2 |
| 416 |
5 22 3 |
| 417 |
5 23 4 |
| 418 |
6 16 1 |
| 419 |
6 17 2 |
| 420 |
6 18 3 |
| 421 |
6 19 4 |
| 422 |
6 20 1 |
| 423 |
6 21 2 |
| 424 |
6 22 3 |
| 425 |
6 23 4 |
| 426 |
alter table t3 algorithm=inplace, reorganize partition; |
| 427 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 428 |
where fq_name = 'test/def/t3' order by node_id, fragment_num, block_instance; |
| 429 |
node_id fragment_num block_instance |
| 430 |
1 0 1 |
| 431 |
1 2 2 |
| 432 |
1 4 3 |
| 433 |
1 6 4 |
| 434 |
2 0 1 |
| 435 |
2 2 2 |
| 436 |
2 4 3 |
| 437 |
2 6 4 |
| 438 |
3 1 1 |
| 439 |
3 3 2 |
| 440 |
3 5 3 |
| 441 |
3 7 4 |
| 442 |
4 1 1 |
| 443 |
4 3 2 |
| 444 |
4 5 3 |
| 445 |
4 7 4 |
| 446 |
5 8 1 |
| 447 |
5 9 2 |
| 448 |
5 10 3 |
| 449 |
5 11 4 |
| 450 |
6 8 1 |
| 451 |
6 9 2 |
| 452 |
6 10 3 |
| 453 |
6 11 4 |
| 454 |
alter table t4 algorithm=inplace, reorganize partition; |
| 455 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 456 |
where fq_name = 'test/def/t4' order by node_id, fragment_num, block_instance; |
| 457 |
node_id fragment_num block_instance |
| 458 |
1 0 1 |
| 459 |
1 2 2 |
| 460 |
2 0 1 |
| 461 |
2 2 2 |
| 462 |
3 1 1 |
| 463 |
3 3 2 |
| 464 |
4 1 1 |
| 465 |
4 3 2 |
| 466 |
5 4 1 |
| 467 |
5 5 2 |
| 468 |
6 4 1 |
| 469 |
6 5 2 |
| 470 |
alter table t5 algorithm=inplace, reorganize partition; |
| 471 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 472 |
where fq_name = 'test/def/t5' order by node_id, fragment_num, block_instance; |
| 473 |
node_id fragment_num block_instance |
| 474 |
1 0 3 |
| 475 |
2 0 3 |
| 476 |
3 1 3 |
| 477 |
4 1 3 |
| 478 |
5 2 3 |
| 479 |
6 2 3 |
| 480 |
alter table t6 algorithm=inplace, reorganize partition; |
| 481 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 482 |
where fq_name = 'test/def/t6' order by node_id, fragment_num, block_instance; |
| 483 |
node_id fragment_num block_instance |
| 484 |
1 0 1 |
| 485 |
1 2 2 |
| 486 |
1 4 3 |
| 487 |
1 6 4 |
| 488 |
1 8 1 |
| 489 |
1 10 2 |
| 490 |
1 12 3 |
| 491 |
1 14 4 |
| 492 |
2 0 1 |
| 493 |
2 2 2 |
| 494 |
2 4 3 |
| 495 |
2 6 4 |
| 496 |
2 8 1 |
| 497 |
2 10 2 |
| 498 |
2 12 3 |
| 499 |
2 14 4 |
| 500 |
3 1 1 |
| 501 |
3 3 2 |
| 502 |
3 5 3 |
| 503 |
3 7 4 |
| 504 |
3 9 1 |
| 505 |
3 11 2 |
| 506 |
3 13 3 |
| 507 |
3 15 4 |
| 508 |
4 1 1 |
| 509 |
4 3 2 |
| 510 |
4 5 3 |
| 511 |
4 7 4 |
| 512 |
4 9 1 |
| 513 |
4 11 2 |
| 514 |
4 13 3 |
| 515 |
4 15 4 |
| 516 |
5 16 1 |
| 517 |
5 17 2 |
| 518 |
5 18 3 |
| 519 |
5 19 4 |
| 520 |
5 20 1 |
| 521 |
5 21 2 |
| 522 |
5 22 3 |
| 523 |
5 23 4 |
| 524 |
6 16 1 |
| 525 |
6 17 2 |
| 526 |
6 18 3 |
| 527 |
6 19 4 |
| 528 |
6 20 1 |
| 529 |
6 21 2 |
| 530 |
6 22 3 |
| 531 |
6 23 4 |
| 532 |
alter table t7 algorithm=inplace, reorganize partition; |
| 533 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 534 |
where fq_name = 'test/def/t7' order by node_id, fragment_num, block_instance; |
| 535 |
node_id fragment_num block_instance |
| 536 |
1 0 1 |
| 537 |
1 2 2 |
| 538 |
1 4 3 |
| 539 |
1 6 4 |
| 540 |
1 8 1 |
| 541 |
1 10 2 |
| 542 |
1 12 3 |
| 543 |
1 14 4 |
| 544 |
1 16 1 |
| 545 |
1 18 2 |
| 546 |
1 20 3 |
| 547 |
1 22 4 |
| 548 |
2 0 1 |
| 549 |
2 2 2 |
| 550 |
2 4 3 |
| 551 |
2 6 4 |
| 552 |
2 8 1 |
| 553 |
2 10 2 |
| 554 |
2 12 3 |
| 555 |
2 14 4 |
| 556 |
2 16 1 |
| 557 |
2 18 2 |
| 558 |
2 20 3 |
| 559 |
2 22 4 |
| 560 |
3 1 1 |
| 561 |
3 3 2 |
| 562 |
3 5 3 |
| 563 |
3 7 4 |
| 564 |
3 9 1 |
| 565 |
3 11 2 |
| 566 |
3 13 3 |
| 567 |
3 15 4 |
| 568 |
3 17 1 |
| 569 |
3 19 2 |
| 570 |
3 21 3 |
| 571 |
3 23 4 |
| 572 |
4 1 1 |
| 573 |
4 3 2 |
| 574 |
4 5 3 |
| 575 |
4 7 4 |
| 576 |
4 9 1 |
| 577 |
4 11 2 |
| 578 |
4 13 3 |
| 579 |
4 15 4 |
| 580 |
4 17 1 |
| 581 |
4 19 2 |
| 582 |
4 21 3 |
| 583 |
4 23 4 |
| 584 |
5 24 1 |
| 585 |
5 25 2 |
| 586 |
5 26 3 |
| 587 |
5 27 4 |
| 588 |
5 28 1 |
| 589 |
5 29 2 |
| 590 |
5 30 3 |
| 591 |
5 31 4 |
| 592 |
5 32 1 |
| 593 |
5 33 2 |
| 594 |
5 34 3 |
| 595 |
5 35 4 |
| 596 |
6 24 1 |
| 597 |
6 25 2 |
| 598 |
6 26 3 |
| 599 |
6 27 4 |
| 600 |
6 28 1 |
| 601 |
6 29 2 |
| 602 |
6 30 3 |
| 603 |
6 31 4 |
| 604 |
6 32 1 |
| 605 |
6 33 2 |
| 606 |
6 34 3 |
| 607 |
6 35 4 |
| 608 |
alter table t8 algorithm=inplace, reorganize partition; |
| 609 |
select node_id, fragment_num, block_instance from ndbinfo.memory_per_fragment |
| 610 |
where fq_name = 'test/def/t8' order by node_id, fragment_num, block_instance; |
| 611 |
node_id fragment_num block_instance |
| 612 |
1 0 1 |
| 613 |
1 2 2 |
| 614 |
1 4 3 |
| 615 |
1 6 4 |
| 616 |
1 8 1 |
| 617 |
1 10 2 |
| 618 |
1 12 3 |
| 619 |
1 14 4 |
| 620 |
1 16 1 |
| 621 |
1 18 2 |
| 622 |
1 20 3 |
| 623 |
1 22 4 |
| 624 |
1 24 1 |
| 625 |
1 26 2 |
| 626 |
1 28 3 |
| 627 |
1 30 4 |
| 628 |
2 0 1 |
| 629 |
2 2 2 |
| 630 |
2 4 3 |
| 631 |
2 6 4 |
| 632 |
2 8 1 |
| 633 |
2 10 2 |
| 634 |
2 12 3 |
| 635 |
2 14 4 |
| 636 |
2 16 1 |
| 637 |
2 18 2 |
| 638 |
2 20 3 |
| 639 |
2 22 4 |
| 640 |
2 24 1 |
| 641 |
2 26 2 |
| 642 |
2 28 3 |
| 643 |
2 30 4 |
| 644 |
3 1 1 |
| 645 |
3 3 2 |
| 646 |
3 5 3 |
| 647 |
3 7 4 |
| 648 |
3 9 1 |
| 649 |
3 11 2 |
| 650 |
3 13 3 |
| 651 |
3 15 4 |
| 652 |
3 17 1 |
| 653 |
3 19 2 |
| 654 |
3 21 3 |
| 655 |
3 23 4 |
| 656 |
3 25 1 |
| 657 |
3 27 2 |
| 658 |
3 29 3 |
| 659 |
3 31 4 |
| 660 |
4 1 1 |
| 661 |
4 3 2 |
| 662 |
4 5 3 |
| 663 |
4 7 4 |
| 664 |
4 9 1 |
| 665 |
4 11 2 |
| 666 |
4 13 3 |
| 667 |
4 15 4 |
| 668 |
4 17 1 |
| 669 |
4 19 2 |
| 670 |
4 21 3 |
| 671 |
4 23 4 |
| 672 |
4 25 1 |
| 673 |
4 27 2 |
| 674 |
4 29 3 |
| 675 |
4 31 4 |
| 676 |
5 32 1 |
| 677 |
5 33 2 |
| 678 |
5 34 3 |
| 679 |
5 35 4 |
| 680 |
5 36 1 |
| 681 |
5 37 2 |
| 682 |
5 38 3 |
| 683 |
5 39 4 |
| 684 |
5 40 1 |
| 685 |
5 41 2 |
| 686 |
5 42 3 |
| 687 |
5 43 4 |
| 688 |
5 44 1 |
| 689 |
5 45 2 |
| 690 |
5 46 3 |
| 691 |
5 47 4 |
| 692 |
6 32 1 |
| 693 |
6 33 2 |
| 694 |
6 34 3 |
| 695 |
6 35 4 |
| 696 |
6 36 1 |
| 697 |
6 37 2 |
| 698 |
6 38 3 |
| 699 |
6 39 4 |
| 700 |
6 40 1 |
| 701 |
6 41 2 |
| 702 |
6 42 3 |
| 703 |
6 43 4 |
| 704 |
6 44 1 |
| 705 |
6 45 2 |
| 706 |
6 46 3 |
| 707 |
6 47 4 |
| 708 |
select count(*) into @cnt_t1_1 |
| 709 |
from information_schema.partitions |
| 710 |
where table_schema = 'test' and table_name = 't1'; |
| 711 |
select count(*) into @cnt_t2_1 |
| 712 |
from information_schema.partitions |
| 713 |
where table_schema = 'test' and table_name = 't2'; |
| 714 |
select count(*) into @cnt_t3_1 |
| 715 |
from information_schema.partitions |
| 716 |
where table_schema = 'test' and table_name = 't3'; |
| 717 |
select count(*) into @cnt_t4_1 |
| 718 |
from information_schema.partitions |
| 719 |
where table_schema = 'test' and table_name = 't4'; |
| 720 |
select count(*) into @cnt_t5_1 |
| 721 |
from information_schema.partitions |
| 722 |
where table_schema = 'test' and table_name = 't5'; |
| 723 |
select count(*) into @cnt_t6_0 |
| 724 |
from information_schema.partitions |
| 725 |
where table_schema = 'test' and table_name = 't6'; |
| 726 |
select count(*) into @cnt_t7_0 |
| 727 |
from information_schema.partitions |
| 728 |
where table_schema = 'test' and table_name = 't7'; |
| 729 |
select count(*) into @cnt_t8_0 |
| 730 |
from information_schema.partitions |
| 731 |
where table_schema = 'test' and table_name = 't8'; |
| 732 |
select @cnt_t1_1 = @cnt_t2_1; |
| 733 |
@cnt_t1_1 = @cnt_t2_1 |
| 734 |
1 |
| 735 |
select @cnt_t2_1 > @cnt_t3_1; |
| 736 |
@cnt_t2_1 > @cnt_t3_1 |
| 737 |
1 |
| 738 |
select @cnt_t3_1 > @cnt_t4_1; |
| 739 |
@cnt_t3_1 > @cnt_t4_1 |
| 740 |
1 |
| 741 |
select @cnt_t4_1 > @cnt_t5_1; |
| 742 |
@cnt_t4_1 > @cnt_t5_1 |
| 743 |
1 |
| 744 |
select @cnt_t6_1 = 2 * @cnt_t3_1; |
| 745 |
@cnt_t6_1 = 2 * @cnt_t3_1 |
| 746 |
NULL |
| 747 |
select @cnt_t7_1 = 3 * @cnt_t3_1; |
| 748 |
@cnt_t7_1 = 3 * @cnt_t3_1 |
| 749 |
NULL |
| 750 |
select @cnt_t8_1 = 4 * @cnt_t3_1; |
| 751 |
@cnt_t8_1 = 4 * @cnt_t3_1 |
| 752 |
NULL |
| 753 |
select @cnt_t1_1 > @cnt_t1_0; |
| 754 |
@cnt_t1_1 > @cnt_t1_0 |
| 755 |
1 |
| 756 |
select @cnt_t2_1 > @cnt_t2_0; |
| 757 |
@cnt_t2_1 > @cnt_t2_0 |
| 758 |
1 |
| 759 |
select @cnt_t3_1 > @cnt_t3_0; |
| 760 |
@cnt_t3_1 > @cnt_t3_0 |
| 761 |
1 |
| 762 |
select @cnt_t4_1 > @cnt_t4_0; |
| 763 |
@cnt_t4_1 > @cnt_t4_0 |
| 764 |
1 |
| 765 |
select @cnt_t5_1 > @cnt_t5_0; |
| 766 |
@cnt_t5_1 > @cnt_t5_0 |
| 767 |
1 |
| 768 |
select @cnt_t6_1 > @cnt_t6_0; |
| 769 |
@cnt_t6_1 > @cnt_t6_0 |
| 770 |
NULL |
| 771 |
select @cnt_t7_1 > @cnt_t7_0; |
| 772 |
@cnt_t7_1 > @cnt_t7_0 |
| 773 |
NULL |
| 774 |
select @cnt_t8_1 > @cnt_t8_0; |
| 775 |
@cnt_t8_1 > @cnt_t8_0 |
| 776 |
NULL |
| 777 |
-- t1 -- |
| 778 |
Version: Any |
| 779 |
Fragment type: HashMapPartition |
| 780 |
K Value: 6 |
| 781 |
Min load factor: 78 |
| 782 |
Max load factor: 80 |
| 783 |
Temporary table: no |
| 784 |
Number of attributes: 2 |
| 785 |
Number of primary keys: 1 |
| 786 |
Length of frm data: XXX |
| 787 |
Max Rows: 0 |
| 788 |
Row Checksum: 1 |
| 789 |
Row GCI: 1 |
| 790 |
SingleUserMode: 0 |
| 791 |
ForceVarPart: 1 |
| 792 |
PartitionCount: 24 |
| 793 |
FragmentCount: 24 |
| 794 |
PartitionBalance: FOR_RP_BY_LDM |
| 795 |
ExtraRowGciBits: 0 |
| 796 |
ExtraRowAuthorBits: 0 |
| 797 |
TableStatus: Retrieved |
| 798 |
Table options: |
| 799 |
HashMap: HASHMAP-3840-16-24 |
| 800 |
-- Attributes -- |
| 801 |
id Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY |
| 802 |
data Char(32;utf8mb4_0900_ai_ci) NULL AT=FIXED ST=MEMORY |
| 803 |
-- Indexes -- |
| 804 |
PRIMARY KEY(id) - UniqueHashIndex |
| 805 |
PRIMARY(id) - OrderedIndex |
| 806 |
-- Per partition info -- |
| 807 |
Partition Row count Commit count Frag fixed memory Frag varsized memory Extent_space Free extent_space |
| 808 |
0 ... |
| 809 |
1 ... |
| 810 |
2 ... |
| 811 |
3 ... |
| 812 |
4 ... |
| 813 |
5 ... |
| 814 |
6 ... |
| 815 |
7 ... |
| 816 |
8 ... |
| 817 |
9 ... |
| 818 |
10 ... |
| 819 |
11 ... |
| 820 |
12 ... |
| 821 |
13 ... |
| 822 |
14 ... |
| 823 |
15 ... |
| 824 |
16 ... |
| 825 |
17 ... |
| 826 |
18 ... |
| 827 |
19 ... |
| 828 |
20 ... |
| 829 |
21 ... |
| 830 |
22 ... |
| 831 |
23 ... |
| 832 |
|
| 833 |
drop table t1,t2,t3,t4,t5,t6,t7,t8; |
| 834 |
Drop Node Group 2 done |