| 1 |
# |
| 2 |
# Test for IBD2SDI tool |
| 3 |
# |
| 4 |
# restart: --datadir=MYSQLD_DATADIR1 --innodb_data_file_path=ibdata1:16M;ibdata2:20M:autoextend --innodb_redo_log_capacity=30M |
| 5 |
set global innodb_limit_optimistic_insert_debug = 2; |
| 6 |
INSERT INTO cache_policies VALUES('cache_policy', 'innodb_only', |
| 7 |
'innodb_only', 'innodb_only', 'innodb_only'); |
| 8 |
INSERT INTO config_options VALUES('separator', '|'); |
| 9 |
INSERT INTO containers VALUES ('desc_t1', 'test', 't1', |
| 10 |
'c1', 'c2', '0', '0', '0', 'PRIMARY'); |
| 11 |
USE test; |
| 12 |
# ---------------------------------------------- |
| 13 |
# Case 1: Insert small SDI in uncompressed table |
| 14 |
# ---------------------------------------------- |
| 15 |
SET GLOBAL innodb_file_per_table=OFF; |
| 16 |
CREATE TABLE t1(c1 VARCHAR(32), |
| 17 |
c2 TEXT, |
| 18 |
primary key(c1)) |
| 19 |
ENGINE = INNODB; |
| 20 |
SET GLOBAL innodb_file_per_table=ON; |
| 21 |
CREATE TABLE t2(a INT) ENGINE = INNODB; |
| 22 |
SET GLOBAL innodb_file_per_table=OFF; |
| 23 |
INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; |
| 24 |
Warnings: |
| 25 |
Warning 1681 'InnoDB Memcached Plugin' is deprecated and will be removed in a future release. |
| 26 |
# check if ibdata* exist |
| 27 |
# Section I: Test options |
| 28 |
# 1. Read SDI with long option |
| 29 |
["ibd2sdi" |
| 30 |
, |
| 31 |
{ |
| 32 |
"type": 0, |
| 33 |
"id": 0, |
| 34 |
"object": |
| 35 |
Test00 |
| 36 |
} |
| 37 |
, |
| 38 |
{ |
| 39 |
"type": 1, |
| 40 |
"id": 0, |
| 41 |
"object": |
| 42 |
Test10 |
| 43 |
} |
| 44 |
, |
| 45 |
{ |
| 46 |
"type": 2, |
| 47 |
"id": 0, |
| 48 |
"object": |
| 49 |
Test20 |
| 50 |
} |
| 51 |
, |
| 52 |
{ |
| 53 |
"type": 3, |
| 54 |
"id": 0, |
| 55 |
"object": |
| 56 |
Test30 |
| 57 |
} |
| 58 |
, |
| 59 |
{ |
| 60 |
"type": 3, |
| 61 |
"id": 1, |
| 62 |
"object": |
| 63 |
Test31 |
| 64 |
} |
| 65 |
, |
| 66 |
{ |
| 67 |
"type": 3, |
| 68 |
"id": 2, |
| 69 |
"object": |
| 70 |
Test32 |
| 71 |
} |
| 72 |
, |
| 73 |
{ |
| 74 |
"type": 3, |
| 75 |
"id": 3, |
| 76 |
"object": |
| 77 |
Test33 |
| 78 |
} |
| 79 |
, |
| 80 |
{ |
| 81 |
"type": 3, |
| 82 |
"id": 4, |
| 83 |
"object": |
| 84 |
Test34 |
| 85 |
} |
| 86 |
, |
| 87 |
{ |
| 88 |
"type": 3, |
| 89 |
"id": 5, |
| 90 |
"object": |
| 91 |
Test35 |
| 92 |
} |
| 93 |
, |
| 94 |
{ |
| 95 |
"type": 4, |
| 96 |
"id": 4, |
| 97 |
"object": |
| 98 |
Test44 |
| 99 |
} |
| 100 |
, |
| 101 |
{ |
| 102 |
"type": 5, |
| 103 |
"id": 0, |
| 104 |
"object": |
| 105 |
Test50 |
| 106 |
} |
| 107 |
] |
| 108 |
# 3. Read with specific id & type (long option) |
| 109 |
["ibd2sdi" |
| 110 |
, |
| 111 |
{ |
| 112 |
"type": 3, |
| 113 |
"id": 3, |
| 114 |
"object": |
| 115 |
Test33 |
| 116 |
} |
| 117 |
] |
| 118 |
# 4. Read with specific id & type (short option) |
| 119 |
["ibd2sdi" |
| 120 |
, |
| 121 |
{ |
| 122 |
"type": 4, |
| 123 |
"id": 4, |
| 124 |
"object": |
| 125 |
Test44 |
| 126 |
} |
| 127 |
] |
| 128 |
# 5. Read with skip data |
| 129 |
["ibd2sdi" |
| 130 |
, |
| 131 |
{ |
| 132 |
"type": 0, |
| 133 |
"id": 0 |
| 134 |
} |
| 135 |
, |
| 136 |
{ |
| 137 |
"type": 1, |
| 138 |
"id": 0 |
| 139 |
} |
| 140 |
, |
| 141 |
{ |
| 142 |
"type": 2, |
| 143 |
"id": 0 |
| 144 |
} |
| 145 |
, |
| 146 |
{ |
| 147 |
"type": 3, |
| 148 |
"id": 0 |
| 149 |
} |
| 150 |
, |
| 151 |
{ |
| 152 |
"type": 3, |
| 153 |
"id": 1 |
| 154 |
} |
| 155 |
, |
| 156 |
{ |
| 157 |
"type": 3, |
| 158 |
"id": 2 |
| 159 |
} |
| 160 |
, |
| 161 |
{ |
| 162 |
"type": 3, |
| 163 |
"id": 3 |
| 164 |
} |
| 165 |
, |
| 166 |
{ |
| 167 |
"type": 3, |
| 168 |
"id": 4 |
| 169 |
} |
| 170 |
, |
| 171 |
{ |
| 172 |
"type": 3, |
| 173 |
"id": 5 |
| 174 |
} |
| 175 |
, |
| 176 |
{ |
| 177 |
"type": 4, |
| 178 |
"id": 4 |
| 179 |
} |
| 180 |
, |
| 181 |
{ |
| 182 |
"type": 5, |
| 183 |
"id": 0 |
| 184 |
} |
| 185 |
] |
| 186 |
["ibd2sdi" |
| 187 |
, |
| 188 |
{ |
| 189 |
"type": 0, |
| 190 |
"id": 0 |
| 191 |
} |
| 192 |
, |
| 193 |
{ |
| 194 |
"type": 1, |
| 195 |
"id": 0 |
| 196 |
} |
| 197 |
, |
| 198 |
{ |
| 199 |
"type": 2, |
| 200 |
"id": 0 |
| 201 |
} |
| 202 |
, |
| 203 |
{ |
| 204 |
"type": 3, |
| 205 |
"id": 0 |
| 206 |
} |
| 207 |
, |
| 208 |
{ |
| 209 |
"type": 3, |
| 210 |
"id": 1 |
| 211 |
} |
| 212 |
, |
| 213 |
{ |
| 214 |
"type": 3, |
| 215 |
"id": 2 |
| 216 |
} |
| 217 |
, |
| 218 |
{ |
| 219 |
"type": 3, |
| 220 |
"id": 3 |
| 221 |
} |
| 222 |
, |
| 223 |
{ |
| 224 |
"type": 3, |
| 225 |
"id": 4 |
| 226 |
} |
| 227 |
, |
| 228 |
{ |
| 229 |
"type": 3, |
| 230 |
"id": 5 |
| 231 |
} |
| 232 |
, |
| 233 |
{ |
| 234 |
"type": 4, |
| 235 |
"id": 4 |
| 236 |
} |
| 237 |
, |
| 238 |
{ |
| 239 |
"type": 5, |
| 240 |
"id": 0 |
| 241 |
} |
| 242 |
] |
| 243 |
# 6. Read SDI and dump into FILE |
| 244 |
["ibd2sdi" |
| 245 |
, |
| 246 |
{ |
| 247 |
"type": 0, |
| 248 |
"id": 0, |
| 249 |
"object": |
| 250 |
Test00 |
| 251 |
} |
| 252 |
, |
| 253 |
{ |
| 254 |
"type": 1, |
| 255 |
"id": 0, |
| 256 |
"object": |
| 257 |
Test10 |
| 258 |
} |
| 259 |
, |
| 260 |
{ |
| 261 |
"type": 2, |
| 262 |
"id": 0, |
| 263 |
"object": |
| 264 |
Test20 |
| 265 |
} |
| 266 |
, |
| 267 |
{ |
| 268 |
"type": 3, |
| 269 |
"id": 0, |
| 270 |
"object": |
| 271 |
Test30 |
| 272 |
} |
| 273 |
, |
| 274 |
{ |
| 275 |
"type": 3, |
| 276 |
"id": 1, |
| 277 |
"object": |
| 278 |
Test31 |
| 279 |
} |
| 280 |
, |
| 281 |
{ |
| 282 |
"type": 3, |
| 283 |
"id": 2, |
| 284 |
"object": |
| 285 |
Test32 |
| 286 |
} |
| 287 |
, |
| 288 |
{ |
| 289 |
"type": 3, |
| 290 |
"id": 3, |
| 291 |
"object": |
| 292 |
Test33 |
| 293 |
} |
| 294 |
, |
| 295 |
{ |
| 296 |
"type": 3, |
| 297 |
"id": 4, |
| 298 |
"object": |
| 299 |
Test34 |
| 300 |
} |
| 301 |
, |
| 302 |
{ |
| 303 |
"type": 3, |
| 304 |
"id": 5, |
| 305 |
"object": |
| 306 |
Test35 |
| 307 |
} |
| 308 |
, |
| 309 |
{ |
| 310 |
"type": 4, |
| 311 |
"id": 4, |
| 312 |
"object": |
| 313 |
Test44 |
| 314 |
} |
| 315 |
, |
| 316 |
{ |
| 317 |
"type": 5, |
| 318 |
"id": 0, |
| 319 |
"object": |
| 320 |
Test50 |
| 321 |
} |
| 322 |
] |
| 323 |
# 7. Read SDI and dump into FILE using short option |
| 324 |
["ibd2sdi" |
| 325 |
, |
| 326 |
{ |
| 327 |
"type": 0, |
| 328 |
"id": 0 |
| 329 |
} |
| 330 |
, |
| 331 |
{ |
| 332 |
"type": 1, |
| 333 |
"id": 0 |
| 334 |
} |
| 335 |
, |
| 336 |
{ |
| 337 |
"type": 2, |
| 338 |
"id": 0 |
| 339 |
} |
| 340 |
, |
| 341 |
{ |
| 342 |
"type": 3, |
| 343 |
"id": 0 |
| 344 |
} |
| 345 |
, |
| 346 |
{ |
| 347 |
"type": 3, |
| 348 |
"id": 1 |
| 349 |
} |
| 350 |
, |
| 351 |
{ |
| 352 |
"type": 3, |
| 353 |
"id": 2 |
| 354 |
} |
| 355 |
, |
| 356 |
{ |
| 357 |
"type": 3, |
| 358 |
"id": 3 |
| 359 |
} |
| 360 |
, |
| 361 |
{ |
| 362 |
"type": 3, |
| 363 |
"id": 4 |
| 364 |
} |
| 365 |
, |
| 366 |
{ |
| 367 |
"type": 3, |
| 368 |
"id": 5 |
| 369 |
} |
| 370 |
, |
| 371 |
{ |
| 372 |
"type": 4, |
| 373 |
"id": 4 |
| 374 |
} |
| 375 |
, |
| 376 |
{ |
| 377 |
"type": 5, |
| 378 |
"id": 0 |
| 379 |
} |
| 380 |
] |
| 381 |
# 8. Print all records matching type (short option) |
| 382 |
["ibd2sdi" |
| 383 |
, |
| 384 |
{ |
| 385 |
"type": 0, |
| 386 |
"id": 0, |
| 387 |
"object": |
| 388 |
Test00 |
| 389 |
} |
| 390 |
] |
| 391 |
# 9. Print all records matching id (long option) |
| 392 |
["ibd2sdi" |
| 393 |
, |
| 394 |
{ |
| 395 |
"type": 3, |
| 396 |
"id": 3, |
| 397 |
"object": |
| 398 |
Test33 |
| 399 |
} |
| 400 |
] |
| 401 |
# 10. Print version |
| 402 |
IBD2SDI Ver #.#.# |
| 403 |
# 11. Print help |
| 404 |
IBD2SDI Ver #.#.# |
| 405 |
Copyright (c) YEAR, YEAR, Oracle and/or its affiliates. |
| 406 |
|
| 407 |
Oracle is a registered trademark of Oracle Corporation and/or its |
| 408 |
affiliates. Other names may be trademarks of their respective |
| 409 |
owners. |
| 410 |
|
| 411 |
IBD2SDI [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames] |
| 412 |
See http://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html for usage hints. |
| 413 |
-h, --help Display this help and exit. |
| 414 |
-v, --version Display version information and exit. |
| 415 |
-d, --dump-file=name |
| 416 |
Dump the tablespace SDI into the file passed by user. |
| 417 |
Without the filename, it will default to stdout |
| 418 |
-s, --skip-data Skip retrieving data from SDI records. Retrieve only id |
| 419 |
and type. |
| 420 |
-i, --id=# Retrieve the SDI record matching the id passed by user. |
| 421 |
-t, --type=# Retrieve the SDI records matching the type passed by |
| 422 |
user. |
| 423 |
-c, --strict-check=name |
| 424 |
Specify the strict checksum algorithm by the user. |
| 425 |
Allowed values are innodb, crc32, none. |
| 426 |
-n, --no-check Ignore the checksum verification. |
| 427 |
-p, --pretty Pretty format the SDI output.If false, SDI would be not |
| 428 |
human readable but it will be of less size |
| 429 |
(Defaults to on; use --skip-pretty to disable.) |
| 430 |
|
| 431 |
Variables (--variable-name=value) |
| 432 |
and boolean options {FALSE|TRUE} Value (after reading options) |
| 433 |
--------------------------------- ---------------------------------------- |
| 434 |
dump-file (No default value) |
| 435 |
skip-data FALSE |
| 436 |
id 0 |
| 437 |
type 0 |
| 438 |
strict-check crc32 |
| 439 |
no-check FALSE |
| 440 |
pretty TRUE |
| 441 |
# 12. Print all records |
| 442 |
["ibd2sdi" |
| 443 |
, |
| 444 |
{ |
| 445 |
"type": 0, |
| 446 |
"id": 0, |
| 447 |
"object": |
| 448 |
Test00 |
| 449 |
} |
| 450 |
, |
| 451 |
{ |
| 452 |
"type": 1, |
| 453 |
"id": 0, |
| 454 |
"object": |
| 455 |
Test10 |
| 456 |
} |
| 457 |
, |
| 458 |
{ |
| 459 |
"type": 2, |
| 460 |
"id": 0, |
| 461 |
"object": |
| 462 |
Test20 |
| 463 |
} |
| 464 |
, |
| 465 |
{ |
| 466 |
"type": 3, |
| 467 |
"id": 0, |
| 468 |
"object": |
| 469 |
Test30 |
| 470 |
} |
| 471 |
, |
| 472 |
{ |
| 473 |
"type": 3, |
| 474 |
"id": 1, |
| 475 |
"object": |
| 476 |
Test31 |
| 477 |
} |
| 478 |
, |
| 479 |
{ |
| 480 |
"type": 3, |
| 481 |
"id": 2, |
| 482 |
"object": |
| 483 |
Test32 |
| 484 |
} |
| 485 |
, |
| 486 |
{ |
| 487 |
"type": 3, |
| 488 |
"id": 3, |
| 489 |
"object": |
| 490 |
Test33 |
| 491 |
} |
| 492 |
, |
| 493 |
{ |
| 494 |
"type": 3, |
| 495 |
"id": 4, |
| 496 |
"object": |
| 497 |
Test34 |
| 498 |
} |
| 499 |
, |
| 500 |
{ |
| 501 |
"type": 3, |
| 502 |
"id": 5, |
| 503 |
"object": |
| 504 |
Test35 |
| 505 |
} |
| 506 |
, |
| 507 |
{ |
| 508 |
"type": 4, |
| 509 |
"id": 4, |
| 510 |
"object": |
| 511 |
Test44 |
| 512 |
} |
| 513 |
, |
| 514 |
{ |
| 515 |
"type": 5, |
| 516 |
"id": 0, |
| 517 |
"object": |
| 518 |
Test50 |
| 519 |
} |
| 520 |
] |
| 521 |
# 13. Retrieve explicit id & type |
| 522 |
["ibd2sdi" |
| 523 |
, |
| 524 |
{ |
| 525 |
"type": 3, |
| 526 |
"id": 3, |
| 527 |
"object": |
| 528 |
Test33 |
| 529 |
} |
| 530 |
] |
| 531 |
# 14. Skip data and retrieve |
| 532 |
["ibd2sdi" |
| 533 |
, |
| 534 |
{ |
| 535 |
"type": 0, |
| 536 |
"id": 0 |
| 537 |
} |
| 538 |
, |
| 539 |
{ |
| 540 |
"type": 1, |
| 541 |
"id": 0 |
| 542 |
} |
| 543 |
, |
| 544 |
{ |
| 545 |
"type": 2, |
| 546 |
"id": 0 |
| 547 |
} |
| 548 |
, |
| 549 |
{ |
| 550 |
"type": 3, |
| 551 |
"id": 0 |
| 552 |
} |
| 553 |
, |
| 554 |
{ |
| 555 |
"type": 3, |
| 556 |
"id": 1 |
| 557 |
} |
| 558 |
, |
| 559 |
{ |
| 560 |
"type": 3, |
| 561 |
"id": 2 |
| 562 |
} |
| 563 |
, |
| 564 |
{ |
| 565 |
"type": 3, |
| 566 |
"id": 3 |
| 567 |
} |
| 568 |
, |
| 569 |
{ |
| 570 |
"type": 3, |
| 571 |
"id": 4 |
| 572 |
} |
| 573 |
, |
| 574 |
{ |
| 575 |
"type": 3, |
| 576 |
"id": 5 |
| 577 |
} |
| 578 |
, |
| 579 |
{ |
| 580 |
"type": 4, |
| 581 |
"id": 4 |
| 582 |
} |
| 583 |
, |
| 584 |
{ |
| 585 |
"type": 5, |
| 586 |
"id": 0 |
| 587 |
} |
| 588 |
] |
| 589 |
# 15. Dump all records into outfile |
| 590 |
["ibd2sdi" |
| 591 |
, |
| 592 |
{ |
| 593 |
"type": 0, |
| 594 |
"id": 0, |
| 595 |
"object": |
| 596 |
Test00 |
| 597 |
} |
| 598 |
, |
| 599 |
{ |
| 600 |
"type": 1, |
| 601 |
"id": 0, |
| 602 |
"object": |
| 603 |
Test10 |
| 604 |
} |
| 605 |
, |
| 606 |
{ |
| 607 |
"type": 2, |
| 608 |
"id": 0, |
| 609 |
"object": |
| 610 |
Test20 |
| 611 |
} |
| 612 |
, |
| 613 |
{ |
| 614 |
"type": 3, |
| 615 |
"id": 0, |
| 616 |
"object": |
| 617 |
Test30 |
| 618 |
} |
| 619 |
, |
| 620 |
{ |
| 621 |
"type": 3, |
| 622 |
"id": 1, |
| 623 |
"object": |
| 624 |
Test31 |
| 625 |
} |
| 626 |
, |
| 627 |
{ |
| 628 |
"type": 3, |
| 629 |
"id": 2, |
| 630 |
"object": |
| 631 |
Test32 |
| 632 |
} |
| 633 |
, |
| 634 |
{ |
| 635 |
"type": 3, |
| 636 |
"id": 3, |
| 637 |
"object": |
| 638 |
Test33 |
| 639 |
} |
| 640 |
, |
| 641 |
{ |
| 642 |
"type": 3, |
| 643 |
"id": 4, |
| 644 |
"object": |
| 645 |
Test34 |
| 646 |
} |
| 647 |
, |
| 648 |
{ |
| 649 |
"type": 3, |
| 650 |
"id": 5, |
| 651 |
"object": |
| 652 |
Test35 |
| 653 |
} |
| 654 |
, |
| 655 |
{ |
| 656 |
"type": 4, |
| 657 |
"id": 4, |
| 658 |
"object": |
| 659 |
Test44 |
| 660 |
} |
| 661 |
, |
| 662 |
{ |
| 663 |
"type": 5, |
| 664 |
"id": 0, |
| 665 |
"object": |
| 666 |
Test50 |
| 667 |
} |
| 668 |
] |
| 669 |
# 16. Print all records matching type (short option) |
| 670 |
["ibd2sdi" |
| 671 |
, |
| 672 |
{ |
| 673 |
"type": 0, |
| 674 |
"id": 0, |
| 675 |
"object": |
| 676 |
Test00 |
| 677 |
} |
| 678 |
] |
| 679 |
# 17. Print all records matching id (long option) |
| 680 |
["ibd2sdi" |
| 681 |
, |
| 682 |
{ |
| 683 |
"type": 3, |
| 684 |
"id": 3, |
| 685 |
"object": |
| 686 |
Test33 |
| 687 |
} |
| 688 |
] |
| 689 |
# 18. Pass --no-check & --strict-check together |
| 690 |
[ERROR] ibd2sdi: Invalid combination of options. Cannot use --no-check & --strict-check together. |
| 691 |
ibd2sdi: [ERROR] Unknown suffix '@' used for variable 'type' (value '@'). |
| 692 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '@' to 'type'. |
| 693 |
ibd2sdi: [ERROR] IBD2SDI: option '-t' requires an argument. |
| 694 |
ibd2sdi: [ERROR] Unknown suffix '=' used for variable 'type' (value '='). |
| 695 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '=' to 'type'. |
| 696 |
# 22. Test --type option with |
| 697 |
# 22.1 non numeric/Alphanumeric |
| 698 |
ibd2sdi: [ERROR] Unknown suffix 'a' used for variable 'type' (value 'a'). |
| 699 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'a' to 'type'. |
| 700 |
ibd2sdi: [ERROR] Unknown suffix 'b' used for variable 'type' (value 'b'). |
| 701 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'b' to 'type'. |
| 702 |
# 22.2 numbers with +/- |
| 703 |
["ibd2sdi" |
| 704 |
, |
| 705 |
{ |
| 706 |
"type": 0, |
| 707 |
"id": 0, |
| 708 |
"object": |
| 709 |
Test00 |
| 710 |
} |
| 711 |
] |
| 712 |
ibd2sdi: [Warning] option 'type': value -0 adjusted to 0. |
| 713 |
["ibd2sdi" |
| 714 |
, |
| 715 |
{ |
| 716 |
"type": 0, |
| 717 |
"id": 0, |
| 718 |
"object": |
| 719 |
Test00 |
| 720 |
} |
| 721 |
] |
| 722 |
["ibd2sdi" |
| 723 |
, |
| 724 |
{ |
| 725 |
"type": 1, |
| 726 |
"id": 0, |
| 727 |
"object": |
| 728 |
Test10 |
| 729 |
} |
| 730 |
] |
| 731 |
ibd2sdi: [Warning] option 'type': value -1 adjusted to 0. |
| 732 |
["ibd2sdi" |
| 733 |
, |
| 734 |
{ |
| 735 |
"type": 0, |
| 736 |
"id": 0, |
| 737 |
"object": |
| 738 |
Test00 |
| 739 |
} |
| 740 |
] |
| 741 |
ibd2sdi: [Warning] option 'type': value -15 adjusted to 0. |
| 742 |
["ibd2sdi" |
| 743 |
, |
| 744 |
{ |
| 745 |
"type": 0, |
| 746 |
"id": 0, |
| 747 |
"object": |
| 748 |
Test00 |
| 749 |
} |
| 750 |
] |
| 751 |
["ibd2sdi" |
| 752 |
] |
| 753 |
# 22.4 with no permitted values |
| 754 |
["ibd2sdi" |
| 755 |
] |
| 756 |
ibd2sdi: [Warning] option 'type': value -14 adjusted to 0. |
| 757 |
["ibd2sdi" |
| 758 |
, |
| 759 |
{ |
| 760 |
"type": 0, |
| 761 |
"id": 0, |
| 762 |
"object": |
| 763 |
Test00 |
| 764 |
} |
| 765 |
] |
| 766 |
# 22.5 with very long value |
| 767 |
ibd2sdi: [ERROR] Incorrect unsigned integer value: '14324932470234893204293032'. |
| 768 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '14324932470234893204293032' to 'type'. |
| 769 |
# 22.6 with blank value |
| 770 |
ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified. |
| 771 |
# 22.7 value with spaces |
| 772 |
ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified. |
| 773 |
# 23. Test for reading form more than type example (invalid): -t 0,1 |
| 774 |
ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '0,1'). |
| 775 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '0,1' to 'type'. |
| 776 |
ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '2,3'). |
| 777 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '2,3' to 'type'. |
| 778 |
# 24. With misspelled --type |
| 779 |
ibd2sdi: [ERROR] unknown variable 'tpe=0'. |
| 780 |
# 25. With Invalid file types |
| 781 |
# 25.1 With non IBD file |
| 782 |
[ERROR] ibd2sdi: Unable to read the page header of 1024 bytes. |
| 783 |
[ERROR] ibd2sdi: Bytes read was 5. |
| 784 |
# 25.2 with non existant file |
| 785 |
[ERROR] ibd2sdi: Unable to get file stats non_existant_file.txt. |
| 786 |
[ERROR] ibd2sdi: File doesn't exist. |
| 787 |
# 25.3 with empty file |
| 788 |
[ERROR] ibd2sdi: Unable to read the page header of 1024 bytes. |
| 789 |
[ERROR] ibd2sdi: Bytes read was 0. |
| 790 |
[ERROR] ibd2sdi: The first page num 0 of this datafile MYSQLD_DATADIR1/ibdata1 is not equal to last page num 1023 + 1 of previous data file. Skipping this tablespace. |
| 791 |
[ERROR] ibd2sdi: Multiple tablespaces passed. Please specify only one tablespace. |
| 792 |
# restart: --datadir=MYSQLD_DATADIR1 --innodb_data_file_path=ibdata1:16M;ibdata2:20M:autoextend --innodb_redo_log_capacity=30M |
| 793 |
DROP TABLE t2; |
| 794 |
SET GLOBAL innodb_limit_optimistic_insert_debug = default; |
| 795 |
# ---------------------------------------------- |
| 796 |
# Case 2: Insert large SDI in uncompressed table |
| 797 |
# ---------------------------------------------- |
| 798 |
# Section I: Test options |
| 799 |
# 1. Read SDI with long option |
| 800 |
# 3. Read with specific id & type (long option) |
| 801 |
["ibd2sdi" |
| 802 |
, |
| 803 |
{ |
| 804 |
"type": 3, |
| 805 |
"id": 3, |
| 806 |
"object": |
| 807 |
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz |
| 808 |
} |
| 809 |
] |
| 810 |
# 4. Read with specific id & type (short option) |
| 811 |
# 5. Read with skip data |
| 812 |
# 6. Read SDI and dump into FILE |
| 813 |
# 7. Read SDI and dump into FILE using short option |
| 814 |
# 8. Print all records matching type (short option) |
| 815 |
# 9. Print all records matching id (long option) |
| 816 |
# 10. Print version |
| 817 |
IBD2SDI Ver #.#.# |
| 818 |
# 11. Print help |
| 819 |
IBD2SDI Ver #.#.# |
| 820 |
Copyright (c) YEAR, YEAR, Oracle and/or its affiliates. |
| 821 |
|
| 822 |
Oracle is a registered trademark of Oracle Corporation and/or its |
| 823 |
affiliates. Other names may be trademarks of their respective |
| 824 |
owners. |
| 825 |
|
| 826 |
IBD2SDI [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames] |
| 827 |
See http://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html for usage hints. |
| 828 |
-h, --help Display this help and exit. |
| 829 |
-v, --version Display version information and exit. |
| 830 |
-d, --dump-file=name |
| 831 |
Dump the tablespace SDI into the file passed by user. |
| 832 |
Without the filename, it will default to stdout |
| 833 |
-s, --skip-data Skip retrieving data from SDI records. Retrieve only id |
| 834 |
and type. |
| 835 |
-i, --id=# Retrieve the SDI record matching the id passed by user. |
| 836 |
-t, --type=# Retrieve the SDI records matching the type passed by |
| 837 |
user. |
| 838 |
-c, --strict-check=name |
| 839 |
Specify the strict checksum algorithm by the user. |
| 840 |
Allowed values are innodb, crc32, none. |
| 841 |
-n, --no-check Ignore the checksum verification. |
| 842 |
-p, --pretty Pretty format the SDI output.If false, SDI would be not |
| 843 |
human readable but it will be of less size |
| 844 |
(Defaults to on; use --skip-pretty to disable.) |
| 845 |
|
| 846 |
Variables (--variable-name=value) |
| 847 |
and boolean options {FALSE|TRUE} Value (after reading options) |
| 848 |
--------------------------------- ---------------------------------------- |
| 849 |
dump-file (No default value) |
| 850 |
skip-data FALSE |
| 851 |
id 0 |
| 852 |
type 0 |
| 853 |
strict-check crc32 |
| 854 |
no-check FALSE |
| 855 |
pretty TRUE |
| 856 |
# 12. Print all records |
| 857 |
# 13. Retrieve explicit id & type |
| 858 |
["ibd2sdi" |
| 859 |
, |
| 860 |
{ |
| 861 |
"type": 3, |
| 862 |
"id": 3, |
| 863 |
"object": |
| 864 |
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz |
| 865 |
} |
| 866 |
] |
| 867 |
# 14. Skip data and retrieve |
| 868 |
# 15. Dump all records into outfile |
| 869 |
# 16. Print all records matching type (short option) |
| 870 |
["ibd2sdi" |
| 871 |
, |
| 872 |
{ |
| 873 |
"type": 0, |
| 874 |
"id": 0, |
| 875 |
"object": |
| 876 |
abcdefghijklmnopqrstuvwxyz |
| 877 |
} |
| 878 |
] |
| 879 |
# 17. Print all records matching id (long option) |
| 880 |
["ibd2sdi" |
| 881 |
, |
| 882 |
{ |
| 883 |
"type": 3, |
| 884 |
"id": 3, |
| 885 |
"object": |
| 886 |
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz |
| 887 |
} |
| 888 |
] |
| 889 |
# 18. Pass --no-check & --strict-check together |
| 890 |
[ERROR] ibd2sdi: Invalid combination of options. Cannot use --no-check & --strict-check together. |
| 891 |
ibd2sdi: [ERROR] Unknown suffix '@' used for variable 'type' (value '@'). |
| 892 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '@' to 'type'. |
| 893 |
ibd2sdi: [ERROR] IBD2SDI: option '-t' requires an argument. |
| 894 |
ibd2sdi: [ERROR] Unknown suffix '=' used for variable 'type' (value '='). |
| 895 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '=' to 'type'. |
| 896 |
# 22. Test --type option with |
| 897 |
# 22.1 non numeric/Alphanumeric |
| 898 |
ibd2sdi: [ERROR] Unknown suffix 'a' used for variable 'type' (value 'a'). |
| 899 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'a' to 'type'. |
| 900 |
ibd2sdi: [ERROR] Unknown suffix 'b' used for variable 'type' (value 'b'). |
| 901 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'b' to 'type'. |
| 902 |
# 22.2 numbers with +/- |
| 903 |
# 22.4 with no permitted values |
| 904 |
# 22.5 with very long value |
| 905 |
ibd2sdi: [ERROR] Incorrect unsigned integer value: '14324932470234893204293032'. |
| 906 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '14324932470234893204293032' to 'type'. |
| 907 |
# 22.6 with blank value |
| 908 |
ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified. |
| 909 |
# 22.7 value with spaces |
| 910 |
ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified. |
| 911 |
# 23. Test for reading form more than type example (invalid): -t 0,1 |
| 912 |
ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '0,1'). |
| 913 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '0,1' to 'type'. |
| 914 |
ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '2,3'). |
| 915 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '2,3' to 'type'. |
| 916 |
# 24. With misspelled --type |
| 917 |
ibd2sdi: [ERROR] unknown variable 'tpe=0'. |
| 918 |
# 25. With Invalid file types |
| 919 |
# 25.1 With non IBD file |
| 920 |
[ERROR] ibd2sdi: Unable to read the page header of 1024 bytes. |
| 921 |
[ERROR] ibd2sdi: Bytes read was 5. |
| 922 |
# 25.2 with non existant file |
| 923 |
[ERROR] ibd2sdi: Unable to get file stats non_existant_file.txt. |
| 924 |
[ERROR] ibd2sdi: File doesn't exist. |
| 925 |
# 25.3 with empty file |
| 926 |
[ERROR] ibd2sdi: Unable to read the page header of 1024 bytes. |
| 927 |
[ERROR] ibd2sdi: Bytes read was 0. |
| 928 |
# |
| 929 |
# Bug#23036141 - IBD2SDI DOESN'T WORK IF ANY DATAFILE IS SMALLER THAN PREVIOUS DATAFILE |
| 930 |
# |
| 931 |
# restart: --datadir=MYSQLD_DATADIR1 --innodb_data_file_path=ibdata1:16M;ibdata2:2M:autoextend --innodb_redo_log_capacity=30M |
| 932 |
INSERT INTO cache_policies VALUES('cache_policy', 'innodb_only', |
| 933 |
'innodb_only', 'innodb_only', 'innodb_only'); |
| 934 |
INSERT INTO config_options VALUES('separator', '|'); |
| 935 |
INSERT INTO containers VALUES ('desc_t1', 'test', 't1', |
| 936 |
'c1', 'c2', '0', '0', '0', 'PRIMARY'); |
| 937 |
SET GLOBAL innodb_file_per_table=OFF; |
| 938 |
USE test; |
| 939 |
CREATE TABLE t1(c1 VARCHAR(32), |
| 940 |
c2 TEXT, |
| 941 |
primary key(c1)) |
| 942 |
ENGINE = INNODB; |
| 943 |
INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; |
| 944 |
Warnings: |
| 945 |
Warning 1681 'InnoDB Memcached Plugin' is deprecated and will be removed in a future release. |
| 946 |
# Section I: Test options |
| 947 |
# 1. Read SDI with long option |
| 948 |
# 3. Read with specific id & type (long option) |
| 949 |
["ibd2sdi" |
| 950 |
, |
| 951 |
{ |
| 952 |
"type": 3, |
| 953 |
"id": 3, |
| 954 |
"object": |
| 955 |
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz |
| 956 |
} |
| 957 |
] |
| 958 |
# 4. Read with specific id & type (short option) |
| 959 |
# 5. Read with skip data |
| 960 |
# 6. Read SDI and dump into FILE |
| 961 |
# 7. Read SDI and dump into FILE using short option |
| 962 |
# 8. Print all records matching type (short option) |
| 963 |
# 9. Print all records matching id (long option) |
| 964 |
# 10. Print version |
| 965 |
IBD2SDI Ver #.#.# |
| 966 |
# 11. Print help |
| 967 |
IBD2SDI Ver #.#.# |
| 968 |
Copyright (c) YEAR, YEAR, Oracle and/or its affiliates. |
| 969 |
|
| 970 |
Oracle is a registered trademark of Oracle Corporation and/or its |
| 971 |
affiliates. Other names may be trademarks of their respective |
| 972 |
owners. |
| 973 |
|
| 974 |
IBD2SDI [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames] |
| 975 |
See http://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html for usage hints. |
| 976 |
-h, --help Display this help and exit. |
| 977 |
-v, --version Display version information and exit. |
| 978 |
-d, --dump-file=name |
| 979 |
Dump the tablespace SDI into the file passed by user. |
| 980 |
Without the filename, it will default to stdout |
| 981 |
-s, --skip-data Skip retrieving data from SDI records. Retrieve only id |
| 982 |
and type. |
| 983 |
-i, --id=# Retrieve the SDI record matching the id passed by user. |
| 984 |
-t, --type=# Retrieve the SDI records matching the type passed by |
| 985 |
user. |
| 986 |
-c, --strict-check=name |
| 987 |
Specify the strict checksum algorithm by the user. |
| 988 |
Allowed values are innodb, crc32, none. |
| 989 |
-n, --no-check Ignore the checksum verification. |
| 990 |
-p, --pretty Pretty format the SDI output.If false, SDI would be not |
| 991 |
human readable but it will be of less size |
| 992 |
(Defaults to on; use --skip-pretty to disable.) |
| 993 |
|
| 994 |
Variables (--variable-name=value) |
| 995 |
and boolean options {FALSE|TRUE} Value (after reading options) |
| 996 |
--------------------------------- ---------------------------------------- |
| 997 |
dump-file (No default value) |
| 998 |
skip-data FALSE |
| 999 |
id 0 |
| 1000 |
type 0 |
| 1001 |
strict-check crc32 |
| 1002 |
no-check FALSE |
| 1003 |
pretty TRUE |
| 1004 |
# 12. Print all records |
| 1005 |
# 13. Retrieve explicit id & type |
| 1006 |
["ibd2sdi" |
| 1007 |
, |
| 1008 |
{ |
| 1009 |
"type": 3, |
| 1010 |
"id": 3, |
| 1011 |
"object": |
| 1012 |
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz |
| 1013 |
} |
| 1014 |
] |
| 1015 |
# 14. Skip data and retrieve |
| 1016 |
# 15. Dump all records into outfile |
| 1017 |
# 16. Print all records matching type (short option) |
| 1018 |
["ibd2sdi" |
| 1019 |
, |
| 1020 |
{ |
| 1021 |
"type": 0, |
| 1022 |
"id": 0, |
| 1023 |
"object": |
| 1024 |
abcdefghijklmnopqrstuvwxyz |
| 1025 |
} |
| 1026 |
] |
| 1027 |
# 17. Print all records matching id (long option) |
| 1028 |
["ibd2sdi" |
| 1029 |
, |
| 1030 |
{ |
| 1031 |
"type": 3, |
| 1032 |
"id": 3, |
| 1033 |
"object": |
| 1034 |
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz |
| 1035 |
} |
| 1036 |
] |
| 1037 |
# 18. Pass --no-check & --strict-check together |
| 1038 |
[ERROR] ibd2sdi: Invalid combination of options. Cannot use --no-check & --strict-check together. |
| 1039 |
ibd2sdi: [ERROR] Unknown suffix '@' used for variable 'type' (value '@'). |
| 1040 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '@' to 'type'. |
| 1041 |
ibd2sdi: [ERROR] IBD2SDI: option '-t' requires an argument. |
| 1042 |
ibd2sdi: [ERROR] Unknown suffix '=' used for variable 'type' (value '='). |
| 1043 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '=' to 'type'. |
| 1044 |
# 22. Test --type option with |
| 1045 |
# 22.1 non numeric/Alphanumeric |
| 1046 |
ibd2sdi: [ERROR] Unknown suffix 'a' used for variable 'type' (value 'a'). |
| 1047 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'a' to 'type'. |
| 1048 |
ibd2sdi: [ERROR] Unknown suffix 'b' used for variable 'type' (value 'b'). |
| 1049 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'b' to 'type'. |
| 1050 |
# 22.2 numbers with +/- |
| 1051 |
# 22.4 with no permitted values |
| 1052 |
# 22.5 with very long value |
| 1053 |
ibd2sdi: [ERROR] Incorrect unsigned integer value: '14324932470234893204293032'. |
| 1054 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '14324932470234893204293032' to 'type'. |
| 1055 |
# 22.6 with blank value |
| 1056 |
ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified. |
| 1057 |
# 22.7 value with spaces |
| 1058 |
ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified. |
| 1059 |
# 23. Test for reading form more than type example (invalid): -t 0,1 |
| 1060 |
ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '0,1'). |
| 1061 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '0,1' to 'type'. |
| 1062 |
ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '2,3'). |
| 1063 |
ibd2sdi: [ERROR] IBD2SDI: Error while setting value '2,3' to 'type'. |
| 1064 |
# 24. With misspelled --type |
| 1065 |
ibd2sdi: [ERROR] unknown variable 'tpe=0'. |
| 1066 |
# 25. With Invalid file types |
| 1067 |
# 25.1 With non IBD file |
| 1068 |
[ERROR] ibd2sdi: Unable to read the page header of 1024 bytes. |
| 1069 |
[ERROR] ibd2sdi: Bytes read was 5. |
| 1070 |
# 25.2 with non existant file |
| 1071 |
[ERROR] ibd2sdi: Unable to get file stats non_existant_file.txt. |
| 1072 |
[ERROR] ibd2sdi: File doesn't exist. |
| 1073 |
# 25.3 with empty file |
| 1074 |
[ERROR] ibd2sdi: Unable to read the page header of 1024 bytes. |
| 1075 |
[ERROR] ibd2sdi: Bytes read was 0. |
| 1076 |
# restart |