Debian Codegraph @

mysql-test/suite/memcached/r/memc293_ibd2sdi.result

raw
1 #
2 # Test for IBD2SDI tool
3 #
4 set global innodb_limit_optimistic_insert_debug = 2;
5 INSERT INTO cache_policies VALUES('cache_policy', 'innodb_only',
6 'innodb_only', 'innodb_only', 'innodb_only');
7 INSERT INTO config_options VALUES('separator', '|');
8 INSERT INTO containers VALUES ('desc_t1', 'test', 't1',
9 'c1', 'c2', '0', '0', '0', 'PRIMARY');
10 USE test;
11 # Case 1. Test with small SDI data
12 SET DEBUG = '+d, skip_sdi';
13 CREATE TABLE t1(c1 VARCHAR(32),
14 c2 TEXT,
15 primary key(c1))
16 ENGINE = INNODB;
17 SET DEBUG = '-d, skip_sdi';
18 INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so';
19 Warnings:
20 Warning 1681 'InnoDB Memcached Plugin' is deprecated and will be removed in a future release.
21 SET GLOBAL innodb_buf_flush_list_now = ON;
22 [INFO] ibd2sdi: SDI is empty.
23 # 1. Read SDI with long option
24 ["ibd2sdi"
25 ,
26 {
27 "type": 0,
28 "id": 0,
29 "object":
30 Test00
31 }
32 ,
33 {
34 "type": 1,
35 "id": 0,
36 "object":
37 Test10
38 }
39 ,
40 {
41 "type": 2,
42 "id": 0,
43 "object":
44 Test20
45 }
46 ,
47 {
48 "type": 3,
49 "id": 0,
50 "object":
51 Test30
52 }
53 ,
54 {
55 "type": 3,
56 "id": 1,
57 "object":
58 Test31
59 }
60 ,
61 {
62 "type": 3,
63 "id": 2,
64 "object":
65 Test32
66 }
67 ,
68 {
69 "type": 3,
70 "id": 3,
71 "object":
72 Test33
73 }
74 ,
75 {
76 "type": 3,
77 "id": 4,
78 "object":
79 Test34
80 }
81 ,
82 {
83 "type": 3,
84 "id": 5,
85 "object":
86 Test35
87 }
88 ,
89 {
90 "type": 4,
91 "id": 4,
92 "object":
93 Test44
94 }
95 ,
96 {
97 "type": 5,
98 "id": 0,
99 "object":
100 Test50
101 }
102 ]
103 # 3. Read with specific id & type (long option)
104 ["ibd2sdi"
105 ,
106 {
107 "type": 3,
108 "id": 3,
109 "object":
110 Test33
111 }
112 ]
113 # 4. Read with specific id & type (short option)
114 ["ibd2sdi"
115 ,
116 {
117 "type": 4,
118 "id": 4,
119 "object":
120 Test44
121 }
122 ]
123 # 5. Read with skip data
124 ["ibd2sdi"
125 ,
126 {
127 "type": 0,
128 "id": 0
129 }
130 ,
131 {
132 "type": 1,
133 "id": 0
134 }
135 ,
136 {
137 "type": 2,
138 "id": 0
139 }
140 ,
141 {
142 "type": 3,
143 "id": 0
144 }
145 ,
146 {
147 "type": 3,
148 "id": 1
149 }
150 ,
151 {
152 "type": 3,
153 "id": 2
154 }
155 ,
156 {
157 "type": 3,
158 "id": 3
159 }
160 ,
161 {
162 "type": 3,
163 "id": 4
164 }
165 ,
166 {
167 "type": 3,
168 "id": 5
169 }
170 ,
171 {
172 "type": 4,
173 "id": 4
174 }
175 ,
176 {
177 "type": 5,
178 "id": 0
179 }
180 ]
181 ["ibd2sdi"
182 ,
183 {
184 "type": 0,
185 "id": 0
186 }
187 ,
188 {
189 "type": 1,
190 "id": 0
191 }
192 ,
193 {
194 "type": 2,
195 "id": 0
196 }
197 ,
198 {
199 "type": 3,
200 "id": 0
201 }
202 ,
203 {
204 "type": 3,
205 "id": 1
206 }
207 ,
208 {
209 "type": 3,
210 "id": 2
211 }
212 ,
213 {
214 "type": 3,
215 "id": 3
216 }
217 ,
218 {
219 "type": 3,
220 "id": 4
221 }
222 ,
223 {
224 "type": 3,
225 "id": 5
226 }
227 ,
228 {
229 "type": 4,
230 "id": 4
231 }
232 ,
233 {
234 "type": 5,
235 "id": 0
236 }
237 ]
238 # 6. Read SDI and dump into FILE
239 ["ibd2sdi"
240 ,
241 {
242 "type": 0,
243 "id": 0,
244 "object":
245 Test00
246 }
247 ,
248 {
249 "type": 1,
250 "id": 0,
251 "object":
252 Test10
253 }
254 ,
255 {
256 "type": 2,
257 "id": 0,
258 "object":
259 Test20
260 }
261 ,
262 {
263 "type": 3,
264 "id": 0,
265 "object":
266 Test30
267 }
268 ,
269 {
270 "type": 3,
271 "id": 1,
272 "object":
273 Test31
274 }
275 ,
276 {
277 "type": 3,
278 "id": 2,
279 "object":
280 Test32
281 }
282 ,
283 {
284 "type": 3,
285 "id": 3,
286 "object":
287 Test33
288 }
289 ,
290 {
291 "type": 3,
292 "id": 4,
293 "object":
294 Test34
295 }
296 ,
297 {
298 "type": 3,
299 "id": 5,
300 "object":
301 Test35
302 }
303 ,
304 {
305 "type": 4,
306 "id": 4,
307 "object":
308 Test44
309 }
310 ,
311 {
312 "type": 5,
313 "id": 0,
314 "object":
315 Test50
316 }
317 ]
318 # 7. Read SDI and dump into FILE using short option
319 ["ibd2sdi"
320 ,
321 {
322 "type": 0,
323 "id": 0
324 }
325 ,
326 {
327 "type": 1,
328 "id": 0
329 }
330 ,
331 {
332 "type": 2,
333 "id": 0
334 }
335 ,
336 {
337 "type": 3,
338 "id": 0
339 }
340 ,
341 {
342 "type": 3,
343 "id": 1
344 }
345 ,
346 {
347 "type": 3,
348 "id": 2
349 }
350 ,
351 {
352 "type": 3,
353 "id": 3
354 }
355 ,
356 {
357 "type": 3,
358 "id": 4
359 }
360 ,
361 {
362 "type": 3,
363 "id": 5
364 }
365 ,
366 {
367 "type": 4,
368 "id": 4
369 }
370 ,
371 {
372 "type": 5,
373 "id": 0
374 }
375 ]
376 # 8. Print all records matching type (short option)
377 ["ibd2sdi"
378 ,
379 {
380 "type": 0,
381 "id": 0,
382 "object":
383 Test00
384 }
385 ]
386 # 9. Print all records matching id (long option)
387 ["ibd2sdi"
388 ,
389 {
390 "type": 3,
391 "id": 3,
392 "object":
393 Test33
394 }
395 ]
396 # 10. Print version
397 IBD2SDI Ver #.#.#
398 # 11. Print help
399 IBD2SDI Ver #.#.#
400 Copyright (c) YEAR, YEAR, Oracle and/or its affiliates.
401
402 Oracle is a registered trademark of Oracle Corporation and/or its
403 affiliates. Other names may be trademarks of their respective
404 owners.
405
406 IBD2SDI [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames]
407 See http://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html for usage hints.
408 -h, --help Display this help and exit.
409 -v, --version Display version information and exit.
410 -d, --dump-file=name
411 Dump the tablespace SDI into the file passed by user.
412 Without the filename, it will default to stdout
413 -s, --skip-data Skip retrieving data from SDI records. Retrieve only id
414 and type.
415 -i, --id=# Retrieve the SDI record matching the id passed by user.
416 -t, --type=# Retrieve the SDI records matching the type passed by
417 user.
418 -c, --strict-check=name
419 Specify the strict checksum algorithm by the user.
420 Allowed values are innodb, crc32, none.
421 -n, --no-check Ignore the checksum verification.
422 -p, --pretty Pretty format the SDI output.If false, SDI would be not
423 human readable but it will be of less size
424 (Defaults to on; use --skip-pretty to disable.)
425
426 Variables (--variable-name=value)
427 and boolean options {FALSE|TRUE} Value (after reading options)
428 --------------------------------- ----------------------------------------
429 dump-file (No default value)
430 skip-data FALSE
431 id 0
432 type 0
433 strict-check crc32
434 no-check FALSE
435 pretty TRUE
436 # 12. Print all records
437 ["ibd2sdi"
438 ,
439 {
440 "type": 0,
441 "id": 0,
442 "object":
443 Test00
444 }
445 ,
446 {
447 "type": 1,
448 "id": 0,
449 "object":
450 Test10
451 }
452 ,
453 {
454 "type": 2,
455 "id": 0,
456 "object":
457 Test20
458 }
459 ,
460 {
461 "type": 3,
462 "id": 0,
463 "object":
464 Test30
465 }
466 ,
467 {
468 "type": 3,
469 "id": 1,
470 "object":
471 Test31
472 }
473 ,
474 {
475 "type": 3,
476 "id": 2,
477 "object":
478 Test32
479 }
480 ,
481 {
482 "type": 3,
483 "id": 3,
484 "object":
485 Test33
486 }
487 ,
488 {
489 "type": 3,
490 "id": 4,
491 "object":
492 Test34
493 }
494 ,
495 {
496 "type": 3,
497 "id": 5,
498 "object":
499 Test35
500 }
501 ,
502 {
503 "type": 4,
504 "id": 4,
505 "object":
506 Test44
507 }
508 ,
509 {
510 "type": 5,
511 "id": 0,
512 "object":
513 Test50
514 }
515 ]
516 # 13. Retrieve explicit id & type
517 ["ibd2sdi"
518 ,
519 {
520 "type": 3,
521 "id": 3,
522 "object":
523 Test33
524 }
525 ]
526 # 14. Skip data and retrieve
527 ["ibd2sdi"
528 ,
529 {
530 "type": 0,
531 "id": 0
532 }
533 ,
534 {
535 "type": 1,
536 "id": 0
537 }
538 ,
539 {
540 "type": 2,
541 "id": 0
542 }
543 ,
544 {
545 "type": 3,
546 "id": 0
547 }
548 ,
549 {
550 "type": 3,
551 "id": 1
552 }
553 ,
554 {
555 "type": 3,
556 "id": 2
557 }
558 ,
559 {
560 "type": 3,
561 "id": 3
562 }
563 ,
564 {
565 "type": 3,
566 "id": 4
567 }
568 ,
569 {
570 "type": 3,
571 "id": 5
572 }
573 ,
574 {
575 "type": 4,
576 "id": 4
577 }
578 ,
579 {
580 "type": 5,
581 "id": 0
582 }
583 ]
584 # 15. Dump all records into outfile
585 ["ibd2sdi"
586 ,
587 {
588 "type": 0,
589 "id": 0,
590 "object":
591 Test00
592 }
593 ,
594 {
595 "type": 1,
596 "id": 0,
597 "object":
598 Test10
599 }
600 ,
601 {
602 "type": 2,
603 "id": 0,
604 "object":
605 Test20
606 }
607 ,
608 {
609 "type": 3,
610 "id": 0,
611 "object":
612 Test30
613 }
614 ,
615 {
616 "type": 3,
617 "id": 1,
618 "object":
619 Test31
620 }
621 ,
622 {
623 "type": 3,
624 "id": 2,
625 "object":
626 Test32
627 }
628 ,
629 {
630 "type": 3,
631 "id": 3,
632 "object":
633 Test33
634 }
635 ,
636 {
637 "type": 3,
638 "id": 4,
639 "object":
640 Test34
641 }
642 ,
643 {
644 "type": 3,
645 "id": 5,
646 "object":
647 Test35
648 }
649 ,
650 {
651 "type": 4,
652 "id": 4,
653 "object":
654 Test44
655 }
656 ,
657 {
658 "type": 5,
659 "id": 0,
660 "object":
661 Test50
662 }
663 ]
664 # 16. Print all records matching type (short option)
665 ["ibd2sdi"
666 ,
667 {
668 "type": 0,
669 "id": 0,
670 "object":
671 Test00
672 }
673 ]
674 # 17. Print all records matching id (long option)
675 ["ibd2sdi"
676 ,
677 {
678 "type": 3,
679 "id": 3,
680 "object":
681 Test33
682 }
683 ]
684 # 18. Pass --no-check & --strict-check together
685 [ERROR] ibd2sdi: Invalid combination of options. Cannot use --no-check & --strict-check together.
686 ibd2sdi: [ERROR] Unknown suffix '@' used for variable 'type' (value '@').
687 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '@' to 'type'.
688 ibd2sdi: [ERROR] IBD2SDI: option '-t' requires an argument.
689 ibd2sdi: [ERROR] Unknown suffix '=' used for variable 'type' (value '=').
690 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '=' to 'type'.
691 # 22. Test --type option with
692 # 22.1 non numeric/Alphanumeric
693 ibd2sdi: [ERROR] Unknown suffix 'a' used for variable 'type' (value 'a').
694 ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'a' to 'type'.
695 ibd2sdi: [ERROR] Unknown suffix 'b' used for variable 'type' (value 'b').
696 ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'b' to 'type'.
697 # 22.2 numbers with +/-
698 ["ibd2sdi"
699 ,
700 {
701 "type": 0,
702 "id": 0,
703 "object":
704 Test00
705 }
706 ]
707 ibd2sdi: [Warning] option 'type': value -0 adjusted to 0.
708 ["ibd2sdi"
709 ,
710 {
711 "type": 0,
712 "id": 0,
713 "object":
714 Test00
715 }
716 ]
717 ["ibd2sdi"
718 ,
719 {
720 "type": 1,
721 "id": 0,
722 "object":
723 Test10
724 }
725 ]
726 ibd2sdi: [Warning] option 'type': value -1 adjusted to 0.
727 ["ibd2sdi"
728 ,
729 {
730 "type": 0,
731 "id": 0,
732 "object":
733 Test00
734 }
735 ]
736 ibd2sdi: [Warning] option 'type': value -15 adjusted to 0.
737 ["ibd2sdi"
738 ,
739 {
740 "type": 0,
741 "id": 0,
742 "object":
743 Test00
744 }
745 ]
746 ["ibd2sdi"
747 ]
748 # 22.4 with no permitted values
749 ["ibd2sdi"
750 ]
751 ibd2sdi: [Warning] option 'type': value -14 adjusted to 0.
752 ["ibd2sdi"
753 ,
754 {
755 "type": 0,
756 "id": 0,
757 "object":
758 Test00
759 }
760 ]
761 # 22.5 with very long value
762 ibd2sdi: [ERROR] Incorrect unsigned integer value: '14324932470234893204293032'.
763 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '14324932470234893204293032' to 'type'.
764 # 22.6 with blank value
765 ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified.
766 # 22.7 value with spaces
767 ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified.
768 # 23. Test for reading form more than type example (invalid): -t 0,1
769 ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '0,1').
770 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '0,1' to 'type'.
771 ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '2,3').
772 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '2,3' to 'type'.
773 # 24. With misspelled --type
774 ibd2sdi: [ERROR] unknown variable 'tpe=0'.
775 # 25. With Invalid file types
776 # 25.1 With non IBD file
777 [ERROR] ibd2sdi: Unable to read the page header of 1024 bytes.
778 [ERROR] ibd2sdi: Bytes read was 5.
779 # 25.2 with non existant file
780 [ERROR] ibd2sdi: Unable to get file stats non_existant_file.txt.
781 [ERROR] ibd2sdi: File doesn't exist.
782 # 25.3 with empty file
783 [ERROR] ibd2sdi: Unable to read the page header of 1024 bytes.
784 [ERROR] ibd2sdi: Bytes read was 0.
785 # restart: --innodb_checksum_algorithm=innodb
786 INSERT INTO innodb_memcache.containers VALUES ('desc_t2', 'test', 't2',
787 'c1', 'c2', '0', '0', '0', 'PRIMARY');
788 # test with innodb checksum
789 SET DEBUG = '+d, skip_sdi';
790 CREATE TABLE t2(c1 VARCHAR(32),
791 c2 TEXT,
792 primary key(c1)) ENGINE=INNODB;
793 SET DEBUG = '-d, skip_sdi';
794 ["ibd2sdi"
795 ,
796 {
797 "type": 0,
798 "id": 0,
799 "object":
800 Test00
801 }
802 ,
803 {
804 "type": 1,
805 "id": 0,
806 "object":
807 Test10
808 }
809 ,
810 {
811 "type": 2,
812 "id": 0,
813 "object":
814 Test20
815 }
816 ,
817 {
818 "type": 3,
819 "id": 0,
820 "object":
821 Test30
822 }
823 ,
824 {
825 "type": 3,
826 "id": 1,
827 "object":
828 Test31
829 }
830 ,
831 {
832 "type": 3,
833 "id": 2,
834 "object":
835 Test32
836 }
837 ,
838 {
839 "type": 3,
840 "id": 3,
841 "object":
842 Test33
843 }
844 ,
845 {
846 "type": 3,
847 "id": 4,
848 "object":
849 Test34
850 }
851 ,
852 {
853 "type": 3,
854 "id": 5,
855 "object":
856 Test35
857 }
858 ,
859 {
860 "type": 4,
861 "id": 4,
862 "object":
863 Test44
864 }
865 ,
866 {
867 "type": 5,
868 "id": 0,
869 "object":
870 Test50
871 }
872 ]
873 # restart: --innodb_checksum_algorithm=none
874 SET DEBUG = '+d, skip_sdi';
875 DROP TABLE t2;
876 SET DEBUG = '-d, skip_sdi';
877 INSERT INTO innodb_memcache.containers VALUES ('desc_t3', 'test', 't3',
878 'c1', 'c2', '0', '0', '0', 'PRIMARY');
879 # test with none checksum
880 SET DEBUG = '+d, skip_sdi';
881 CREATE TABLE t3(c1 VARCHAR(32),
882 c2 TEXT,
883 primary key(c1)) ENGINE=INNODB;
884 SET DEBUG = '-d, skip_sdi';
885 ["ibd2sdi"
886 ,
887 {
888 "type": 0,
889 "id": 0,
890 "object":
891 Test00
892 }
893 ,
894 {
895 "type": 1,
896 "id": 0,
897 "object":
898 Test10
899 }
900 ,
901 {
902 "type": 2,
903 "id": 0,
904 "object":
905 Test20
906 }
907 ,
908 {
909 "type": 3,
910 "id": 0,
911 "object":
912 Test30
913 }
914 ,
915 {
916 "type": 3,
917 "id": 1,
918 "object":
919 Test31
920 }
921 ,
922 {
923 "type": 3,
924 "id": 2,
925 "object":
926 Test32
927 }
928 ,
929 {
930 "type": 3,
931 "id": 3,
932 "object":
933 Test33
934 }
935 ,
936 {
937 "type": 3,
938 "id": 4,
939 "object":
940 Test34
941 }
942 ,
943 {
944 "type": 3,
945 "id": 5,
946 "object":
947 Test35
948 }
949 ,
950 {
951 "type": 4,
952 "id": 4,
953 "object":
954 Test44
955 }
956 ,
957 {
958 "type": 5,
959 "id": 0,
960 "object":
961 Test50
962 }
963 ]
964 [ERROR] ibd2sdi: Unable to create temporary file. err: Permission denied.
965 [ERROR] ibd2sdi: Invalid Dumpfile passed.
966 IBD2SDI Copyright (c) YEAR, YEAR, Oracle and/or its affiliates.
967
968 Oracle is a registered trademark of Oracle Corporation and/or its
969 affiliates. Other names may be trademarks of their respective
970 owners.
971
972 Usage: IBD2SDI [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames]
973 See http://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html for usage hints.
974 -h, --help Display this help and exit.
975 -v, --version Display version information and exit.
976 -#, --debug[=name] Output debug log. See
977 http://dev.mysql.com/doc/refman/8.0/en/dbug-package.html
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 debug (No default value)
998 dump-file (No default value)
999 skip-data FALSE
1000 id 0
1001 type 0
1002 strict-check crc32
1003 no-check FALSE
1004 pretty TRUE
1005 [ERROR] ibd2sdi: Error: Unable to seek to necessary offset for file with descriptor X and error msg is: Invalid argument.
1006 [ERROR] ibd2sdi: SDI doesn't exist for this tablespace or the SDI root page numbers couldn't be determined.
1007 [ERROR] ibd2sdi: Read requested on invalid page number 21. The maximum valid page number in the tablespace is 20.
1008 [ERROR] ibd2sdi: SDI doesn't exist for this tablespace or the SDI root page numbers couldn't be determined.
1009 [ERROR] ibd2sdi: Unable to open file junk_file.
1010 [WARNING] ibd2sdi: There is a partial page at the end, of size 1. This partial page is ignored.
1011 ["ibd2sdi"
1012 ,
1013 {
1014 "type": 0,
1015 "id": 0,
1016 "object":
1017 Test00
1018 }
1019 ,
1020 {
1021 "type": 1,
1022 "id": 0,
1023 "object":
1024 Test10
1025 }
1026 ,
1027 {
1028 "type": 2,
1029 "id": 0,
1030 "object":
1031 Test20
1032 }
1033 ,
1034 {
1035 "type": 3,
1036 "id": 0,
1037 "object":
1038 Test30
1039 }
1040 ,
1041 {
1042 "type": 3,
1043 "id": 1,
1044 "object":
1045 Test31
1046 }
1047 ,
1048 {
1049 "type": 3,
1050 "id": 2,
1051 "object":
1052 Test32
1053 }
1054 ,
1055 {
1056 "type": 3,
1057 "id": 3,
1058 "object":
1059 Test33
1060 }
1061 ,
1062 {
1063 "type": 3,
1064 "id": 4,
1065 "object":
1066 Test34
1067 }
1068 ,
1069 {
1070 "type": 3,
1071 "id": 5,
1072 "object":
1073 Test35
1074 }
1075 ,
1076 {
1077 "type": 4,
1078 "id": 4,
1079 "object":
1080 Test44
1081 }
1082 ,
1083 {
1084 "type": 5,
1085 "id": 0,
1086 "object":
1087 Test50
1088 }
1089 ]
1090 [ERROR] ibd2sdi: Couldn't find valid root page number.
1091 [ERROR] ibd2sdi: SDI doesn't exist for this tablespace or the SDI root page numbers couldn't be determined.
1092 ["ibd2sdi"
1093 ]
1094 # 18. Corrupt Root page numbers in Page 1
1095 # We should still see data because of the good
1096 # page numbers in Page 2
1097 ["ibd2sdi"
1098 ,
1099 {
1100 "type": 0,
1101 "id": 0,
1102 "object":
1103 Test00
1104 }
1105 ,
1106 {
1107 "type": 1,
1108 "id": 0,
1109 "object":
1110 Test10
1111 }
1112 ,
1113 {
1114 "type": 2,
1115 "id": 0,
1116 "object":
1117 Test20
1118 }
1119 ,
1120 {
1121 "type": 3,
1122 "id": 0,
1123 "object":
1124 Test30
1125 }
1126 ,
1127 {
1128 "type": 3,
1129 "id": 1,
1130 "object":
1131 Test31
1132 }
1133 ,
1134 {
1135 "type": 3,
1136 "id": 2,
1137 "object":
1138 Test32
1139 }
1140 ,
1141 {
1142 "type": 3,
1143 "id": 3,
1144 "object":
1145 Test33
1146 }
1147 ,
1148 {
1149 "type": 3,
1150 "id": 4,
1151 "object":
1152 Test34
1153 }
1154 ,
1155 {
1156 "type": 3,
1157 "id": 5,
1158 "object":
1159 Test35
1160 }
1161 ,
1162 {
1163 "type": 4,
1164 "id": 4,
1165 "object":
1166 Test44
1167 }
1168 ,
1169 {
1170 "type": 5,
1171 "id": 0,
1172 "object":
1173 Test50
1174 }
1175 ]
1176 # 19. Test with broken node-page link. The child page_no
1177 # will be zero. Use --no-checksum as the page is corrupted.
1178 [ERROR] ibd2sdi: Invalid child page number: 0 found.
1179 # 20. Test with broken leaf-page link. The child page_no
1180 # will be zero. Use --no-checksum as the page is corrupted
1181 ["ibd2sdi"
1182 ,
1183 {
1184 "type": 0,
1185 "id": 0,
1186 "object":
1187 Test00
1188 }
1189 ,
1190 {
1191 "type": 1,
1192 "id": 0,
1193 "object":
1194 Test10
1195 }
1196 ,
1197 {
1198 "type": 2,
1199 "id": 0,
1200 "object":
1201 Test20
1202 }
1203 ,
1204 {
1205 "type": 3,
1206 "id": 0,
1207 "object":
1208 Test30
1209 }
1210 ,
1211 {
1212 "type": 3,
1213 "id": 1,
1214 "object":
1215 Test31
1216 }
1217 ,
1218 {
1219 "type": 3,
1220 "id": 2,
1221 "object":
1222 Test32
1223 }
1224 ,
1225 {
1226 "type": 3,
1227 "id": 3,
1228 "object":
1229 Test33
1230 }
1231 [ERROR] ibd2sdi: Unexpected page type: 8. Expected page type: 17853.
1232 ]
1233 # Retrieve from .ibd file
1234 ["ibd2sdi"
1235 ,
1236 {
1237 "type": 0,
1238 "id": 0,
1239 "object":
1240 Test00
1241 }
1242 ,
1243 {
1244 "type": 1,
1245 "id": 0,
1246 "object":
1247 Test10
1248 }
1249 ,
1250 {
1251 "type": 2,
1252 "id": 0,
1253 "object":
1254 Test20
1255 }
1256 ,
1257 {
1258 "type": 3,
1259 "id": 0,
1260 "object":
1261 Test30
1262 }
1263 ,
1264 {
1265 "type": 3,
1266 "id": 1,
1267 "object":
1268 Test31
1269 }
1270 [ERROR] ibd2sdi: Page [page id: space=X, page number=10] is corrupted. Checksum verification failed.
1271 [ERROR] ibd2sdi: Couldn't read next page 10.
1272 ]
1273 # 21. Test with Leaf Page full of Zeros
1274 # Checksum will be valid. Skip checksum is not necessary
1275 ["ibd2sdi"
1276 ,
1277 {
1278 "type": 0,
1279 "id": 0,
1280 "object":
1281 Test00
1282 }
1283 ,
1284 {
1285 "type": 1,
1286 "id": 0,
1287 "object":
1288 Test10
1289 }
1290 ,
1291 {
1292 "type": 2,
1293 "id": 0,
1294 "object":
1295 Test20
1296 }
1297 ,
1298 {
1299 "type": 3,
1300 "id": 0,
1301 "object":
1302 Test30
1303 }
1304 ,
1305 {
1306 "type": 3,
1307 "id": 1,
1308 "object":
1309 Test31
1310 }
1311 [ERROR] ibd2sdi: Unexpected page type: 0. Expected page type: 17853.
1312 ]
1313 # 22. Test with Record corruption. User record pointing to
1314 # INFIMUM Causing INFINITE loops.
1315 [ERROR] ibd2sdi: Record Corruption detected. Too many records or infinite loop detected. Aborting.
1316 [ERROR] ibd2sdi: The current iteration num is 529. Maximum number of records expected on the page 10 is 528.
1317 ["ibd2sdi"
1318 ,
1319 {
1320 "type": 0,
1321 "id": 0,
1322 "object":
1323 Test00
1324 }
1325 ,
1326 {
1327 "type": 1,
1328 "id": 0,
1329 "object":
1330 Test10
1331 }
1332 ,
1333 {
1334 "type": 2,
1335 "id": 0,
1336 "object":
1337 Test20
1338 }
1339 ,
1340 {
1341 "type": 3,
1342 "id": 0,
1343 "object":
1344 Test30
1345 }
1346 ,
1347 {
1348 "type": 3,
1349 "id": 1,
1350 "object":
1351 Test31
1352 }
1353 ,
1354 {
1355 "type": 3,
1356 "id": 2,
1357 "object":
1358 Test32
1359 }
1360 ,
1361 {
1362 "type": 3,
1363 "id": 3,
1364 "object":
1365 Test33
1366 }
1367 ,
1368 {
1369 "type": 3,
1370 "id": 4,
1371 "object":
1372 Test34
1373 }
1374 ,
1375 {
1376 "type": 3,
1377 "id": 5,
1378 "object":
1379 Test35
1380 }
1381 ,
1382 {
1383 "type": 4,
1384 "id": 4,
1385 "object":
1386 Test44
1387 }
1388 ,
1389 {
1390 "type": 5,
1391 "id": 0,
1392 "object":
1393 Test50
1394 }
1395 ]
1396 # 23. Test with INFIMUM payload corruption. We should just
1397 # see a msg in error log but data retrieval should be OK
1398 [WARNING] ibd2sdi: Infimum payload on page 10 is corrupted.
1399 ["ibd2sdi"
1400 ,
1401 {
1402 "type": 0,
1403 "id": 0,
1404 "object":
1405 Test00
1406 }
1407 ,
1408 {
1409 "type": 1,
1410 "id": 0,
1411 "object":
1412 Test10
1413 }
1414 ,
1415 {
1416 "type": 2,
1417 "id": 0,
1418 "object":
1419 Test20
1420 }
1421 ,
1422 {
1423 "type": 3,
1424 "id": 0,
1425 "object":
1426 Test30
1427 }
1428 ,
1429 {
1430 "type": 3,
1431 "id": 1,
1432 "object":
1433 Test31
1434 }
1435 ,
1436 {
1437 "type": 3,
1438 "id": 2,
1439 "object":
1440 Test32
1441 }
1442 ,
1443 {
1444 "type": 3,
1445 "id": 3,
1446 "object":
1447 Test33
1448 }
1449 ,
1450 {
1451 "type": 3,
1452 "id": 4,
1453 "object":
1454 Test34
1455 }
1456 ,
1457 {
1458 "type": 3,
1459 "id": 5,
1460 "object":
1461 Test35
1462 }
1463 ,
1464 {
1465 "type": 4,
1466 "id": 4,
1467 "object":
1468 Test44
1469 }
1470 ,
1471 {
1472 "type": 5,
1473 "id": 0,
1474 "object":
1475 Test50
1476 }
1477 ]
1478 # 24. Test with SUPREMUM payload corruption. We should just
1479 # see a msg in error log but data retrieval should be OK
1480 [WARNING] ibd2sdi: supremum record payload on page 7 is corrupted.
1481 ["ibd2sdi"
1482 ,
1483 {
1484 "type": 0,
1485 "id": 0,
1486 "object":
1487 Test00
1488 }
1489 ,
1490 {
1491 "type": 1,
1492 "id": 0,
1493 "object":
1494 Test10
1495 }
1496 ,
1497 {
1498 "type": 2,
1499 "id": 0,
1500 "object":
1501 Test20
1502 }
1503 ,
1504 {
1505 "type": 3,
1506 "id": 0,
1507 "object":
1508 Test30
1509 }
1510 ,
1511 {
1512 "type": 3,
1513 "id": 1,
1514 "object":
1515 Test31
1516 }
1517 ,
1518 {
1519 "type": 3,
1520 "id": 2,
1521 "object":
1522 Test32
1523 }
1524 ,
1525 {
1526 "type": 3,
1527 "id": 3,
1528 "object":
1529 Test33
1530 }
1531 ,
1532 {
1533 "type": 3,
1534 "id": 4,
1535 "object":
1536 Test34
1537 }
1538 ,
1539 {
1540 "type": 3,
1541 "id": 5,
1542 "object":
1543 Test35
1544 }
1545 ,
1546 {
1547 "type": 4,
1548 "id": 4,
1549 "object":
1550 Test44
1551 }
1552 ,
1553 {
1554 "type": 5,
1555 "id": 0,
1556 "object":
1557 Test50
1558 }
1559 ]
1560 # 25. Test with SUPREMUM next-rec offset corruption. We should just
1561 # see a msg in error log but data retrieval should be OK
1562 [WARNING] ibd2sdi: Unexpected next-rec offset 20 of supremum record on page 6.
1563 ["ibd2sdi"
1564 ,
1565 {
1566 "type": 0,
1567 "id": 0,
1568 "object":
1569 Test00
1570 }
1571 ,
1572 {
1573 "type": 1,
1574 "id": 0,
1575 "object":
1576 Test10
1577 }
1578 ,
1579 {
1580 "type": 2,
1581 "id": 0,
1582 "object":
1583 Test20
1584 }
1585 ,
1586 {
1587 "type": 3,
1588 "id": 0,
1589 "object":
1590 Test30
1591 }
1592 ,
1593 {
1594 "type": 3,
1595 "id": 1,
1596 "object":
1597 Test31
1598 }
1599 ,
1600 {
1601 "type": 3,
1602 "id": 2,
1603 "object":
1604 Test32
1605 }
1606 ,
1607 {
1608 "type": 3,
1609 "id": 3,
1610 "object":
1611 Test33
1612 }
1613 ,
1614 {
1615 "type": 3,
1616 "id": 4,
1617 "object":
1618 Test34
1619 }
1620 ,
1621 {
1622 "type": 3,
1623 "id": 5,
1624 "object":
1625 Test35
1626 }
1627 ,
1628 {
1629 "type": 4,
1630 "id": 4,
1631 "object":
1632 Test44
1633 }
1634 ,
1635 {
1636 "type": 5,
1637 "id": 0,
1638 "object":
1639 Test50
1640 }
1641 ]
1642 # 26. Test with SPACE FLAGS Corruption
1643 [ERROR] ibd2sdi: Page 0 corruption detected. Page size is either zero or out of bound.
1644 [ERROR] ibd2sdi: Minimum valid page size is [page size: physical=1024, logical=4096, compressed=1].
1645 [ERROR] ibd2sdi: Maximum valid page size is [page size: physical=65536, logical=65536, compressed=0].
1646 [ERROR] ibd2sdi: Reading multiple pages to determine the page_size.
1647 [INFO] ibd2sdi: Page size determined is : [page size: physical=16384, logical=16384, compressed=0].
1648 [WARNING] ibd2sdi: Tablespace flags suggest SDI INDEX didn't exist but found valid SDI root page numbers at SDI offsets in Page 0.
1649 ["ibd2sdi"
1650 ,
1651 {
1652 "type": 0,
1653 "id": 0,
1654 "object":
1655 Test00
1656 }
1657 ,
1658 {
1659 "type": 1,
1660 "id": 0,
1661 "object":
1662 Test10
1663 }
1664 ,
1665 {
1666 "type": 2,
1667 "id": 0,
1668 "object":
1669 Test20
1670 }
1671 ,
1672 {
1673 "type": 3,
1674 "id": 0,
1675 "object":
1676 Test30
1677 }
1678 ,
1679 {
1680 "type": 3,
1681 "id": 1,
1682 "object":
1683 Test31
1684 }
1685 ,
1686 {
1687 "type": 3,
1688 "id": 2,
1689 "object":
1690 Test32
1691 }
1692 ,
1693 {
1694 "type": 3,
1695 "id": 3,
1696 "object":
1697 Test33
1698 }
1699 ,
1700 {
1701 "type": 3,
1702 "id": 4,
1703 "object":
1704 Test34
1705 }
1706 ,
1707 {
1708 "type": 3,
1709 "id": 5,
1710 "object":
1711 Test35
1712 }
1713 ,
1714 {
1715 "type": 4,
1716 "id": 4,
1717 "object":
1718 Test44
1719 }
1720 ,
1721 {
1722 "type": 5,
1723 "id": 0,
1724 "object":
1725 Test50
1726 }
1727 ]
1728 # restart
1729 SET DEBUG = '+d, skip_sdi';
1730 DROP TABLE t1;
1731 SET DEBUG = '-d, skip_sdi';
1732 SET GLOBAL innodb_limit_optimistic_insert_debug = default;
1733 # Case 2: Insert large SDI in uncompressed table
1734 SET DEBUG = '+d, skip_sdi';
1735 CREATE TABLE t1(c1 VARCHAR(32),
1736 c2 TEXT,
1737 primary key(c1))
1738 ENGINE = INNODB;
1739 SET DEBUG = '-d, skip_sdi';
1740 # Section I: Test options
1741 # 1. Read SDI with long option
1742 # 3. Read with specific id & type (long option)
1743 ["ibd2sdi"
1744 ,
1745 {
1746 "type": 3,
1747 "id": 3,
1748 "object":
1749 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
1750 }
1751 ]
1752 # 4. Read with specific id & type (short option)
1753 # 5. Read with skip data
1754 # 6. Read SDI and dump into FILE
1755 # 7. Read SDI and dump into FILE using short option
1756 # 8. Print all records matching type (short option)
1757 # 9. Print all records matching id (long option)
1758 # 10. Print version
1759 IBD2SDI Ver #.#.#
1760 # 11. Print help
1761 IBD2SDI Ver #.#.#
1762 Copyright (c) YEAR, YEAR, Oracle and/or its affiliates.
1763
1764 Oracle is a registered trademark of Oracle Corporation and/or its
1765 affiliates. Other names may be trademarks of their respective
1766 owners.
1767
1768 IBD2SDI [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames]
1769 See http://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html for usage hints.
1770 -h, --help Display this help and exit.
1771 -v, --version Display version information and exit.
1772 -d, --dump-file=name
1773 Dump the tablespace SDI into the file passed by user.
1774 Without the filename, it will default to stdout
1775 -s, --skip-data Skip retrieving data from SDI records. Retrieve only id
1776 and type.
1777 -i, --id=# Retrieve the SDI record matching the id passed by user.
1778 -t, --type=# Retrieve the SDI records matching the type passed by
1779 user.
1780 -c, --strict-check=name
1781 Specify the strict checksum algorithm by the user.
1782 Allowed values are innodb, crc32, none.
1783 -n, --no-check Ignore the checksum verification.
1784 -p, --pretty Pretty format the SDI output.If false, SDI would be not
1785 human readable but it will be of less size
1786 (Defaults to on; use --skip-pretty to disable.)
1787
1788 Variables (--variable-name=value)
1789 and boolean options {FALSE|TRUE} Value (after reading options)
1790 --------------------------------- ----------------------------------------
1791 dump-file (No default value)
1792 skip-data FALSE
1793 id 0
1794 type 0
1795 strict-check crc32
1796 no-check FALSE
1797 pretty TRUE
1798 # 12. Print all records
1799 # 13. Retrieve explicit id & type
1800 ["ibd2sdi"
1801 ,
1802 {
1803 "type": 3,
1804 "id": 3,
1805 "object":
1806 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
1807 }
1808 ]
1809 # 14. Skip data and retrieve
1810 # 15. Dump all records into outfile
1811 # 16. Print all records matching type (short option)
1812 ["ibd2sdi"
1813 ,
1814 {
1815 "type": 0,
1816 "id": 0,
1817 "object":
1818 abcdefghijklmnopqrstuvwxyz
1819 }
1820 ]
1821 # 17. Print all records matching id (long option)
1822 ["ibd2sdi"
1823 ,
1824 {
1825 "type": 3,
1826 "id": 3,
1827 "object":
1828 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
1829 }
1830 ]
1831 # 18. Pass --no-check & --strict-check together
1832 [ERROR] ibd2sdi: Invalid combination of options. Cannot use --no-check & --strict-check together.
1833 ibd2sdi: [ERROR] Unknown suffix '@' used for variable 'type' (value '@').
1834 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '@' to 'type'.
1835 ibd2sdi: [ERROR] IBD2SDI: option '-t' requires an argument.
1836 ibd2sdi: [ERROR] Unknown suffix '=' used for variable 'type' (value '=').
1837 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '=' to 'type'.
1838 # 22. Test --type option with
1839 # 22.1 non numeric/Alphanumeric
1840 ibd2sdi: [ERROR] Unknown suffix 'a' used for variable 'type' (value 'a').
1841 ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'a' to 'type'.
1842 ibd2sdi: [ERROR] Unknown suffix 'b' used for variable 'type' (value 'b').
1843 ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'b' to 'type'.
1844 # 22.2 numbers with +/-
1845 # 22.4 with no permitted values
1846 # 22.5 with very long value
1847 ibd2sdi: [ERROR] Incorrect unsigned integer value: '14324932470234893204293032'.
1848 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '14324932470234893204293032' to 'type'.
1849 # 22.6 with blank value
1850 ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified.
1851 # 22.7 value with spaces
1852 ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified.
1853 # 23. Test for reading form more than type example (invalid): -t 0,1
1854 ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '0,1').
1855 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '0,1' to 'type'.
1856 ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '2,3').
1857 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '2,3' to 'type'.
1858 # 24. With misspelled --type
1859 ibd2sdi: [ERROR] unknown variable 'tpe=0'.
1860 # 25. With Invalid file types
1861 # 25.1 With non IBD file
1862 [ERROR] ibd2sdi: Unable to read the page header of 1024 bytes.
1863 [ERROR] ibd2sdi: Bytes read was 5.
1864 # 25.2 with non existant file
1865 [ERROR] ibd2sdi: Unable to get file stats non_existant_file.txt.
1866 [ERROR] ibd2sdi: File doesn't exist.
1867 # 25.3 with empty file
1868 [ERROR] ibd2sdi: Unable to read the page header of 1024 bytes.
1869 [ERROR] ibd2sdi: Bytes read was 0.
1870 # restart
1871 SET DEBUG = '+d, skip_sdi';
1872 DROP TABLE t1;
1873 SET DEBUG = '-d, skip_sdi';
1874 # Case 3: Insert large SDI in compressed table
1875 SET DEBUG = '+d, skip_sdi';
1876 CREATE TABLE t1(c1 VARCHAR(32),
1877 c2 TEXT,
1878 primary key(c1))
1879 ENGINE = INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
1880 SET DEBUG = '-d, skip_sdi';
1881 # Section I: Test options
1882 # 1. Read SDI with long option
1883 # 3. Read with specific id & type (long option)
1884 ["ibd2sdi"
1885 ,
1886 {
1887 "type": 3,
1888 "id": 3,
1889 "object":
1890 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
1891 }
1892 ]
1893 # 4. Read with specific id & type (short option)
1894 # 5. Read with skip data
1895 # 6. Read SDI and dump into FILE
1896 # 7. Read SDI and dump into FILE using short option
1897 # 8. Print all records matching type (short option)
1898 # 9. Print all records matching id (long option)
1899 # 10. Print version
1900 IBD2SDI Ver #.#.#
1901 # 11. Print help
1902 IBD2SDI Ver #.#.#
1903 Copyright (c) YEAR, YEAR, Oracle and/or its affiliates.
1904
1905 Oracle is a registered trademark of Oracle Corporation and/or its
1906 affiliates. Other names may be trademarks of their respective
1907 owners.
1908
1909 IBD2SDI [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames]
1910 See http://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html for usage hints.
1911 -h, --help Display this help and exit.
1912 -v, --version Display version information and exit.
1913 -d, --dump-file=name
1914 Dump the tablespace SDI into the file passed by user.
1915 Without the filename, it will default to stdout
1916 -s, --skip-data Skip retrieving data from SDI records. Retrieve only id
1917 and type.
1918 -i, --id=# Retrieve the SDI record matching the id passed by user.
1919 -t, --type=# Retrieve the SDI records matching the type passed by
1920 user.
1921 -c, --strict-check=name
1922 Specify the strict checksum algorithm by the user.
1923 Allowed values are innodb, crc32, none.
1924 -n, --no-check Ignore the checksum verification.
1925 -p, --pretty Pretty format the SDI output.If false, SDI would be not
1926 human readable but it will be of less size
1927 (Defaults to on; use --skip-pretty to disable.)
1928
1929 Variables (--variable-name=value)
1930 and boolean options {FALSE|TRUE} Value (after reading options)
1931 --------------------------------- ----------------------------------------
1932 dump-file (No default value)
1933 skip-data FALSE
1934 id 0
1935 type 0
1936 strict-check crc32
1937 no-check FALSE
1938 pretty TRUE
1939 # 12. Print all records
1940 # 13. Retrieve explicit id & type
1941 ["ibd2sdi"
1942 ,
1943 {
1944 "type": 3,
1945 "id": 3,
1946 "object":
1947 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
1948 }
1949 ]
1950 # 14. Skip data and retrieve
1951 # 15. Dump all records into outfile
1952 # 16. Print all records matching type (short option)
1953 ["ibd2sdi"
1954 ,
1955 {
1956 "type": 0,
1957 "id": 0,
1958 "object":
1959 abcdefghijklmnopqrstuvwxyz
1960 }
1961 ]
1962 # 17. Print all records matching id (long option)
1963 ["ibd2sdi"
1964 ,
1965 {
1966 "type": 3,
1967 "id": 3,
1968 "object":
1969 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
1970 }
1971 ]
1972 # 18. Pass --no-check & --strict-check together
1973 [ERROR] ibd2sdi: Invalid combination of options. Cannot use --no-check & --strict-check together.
1974 ibd2sdi: [ERROR] Unknown suffix '@' used for variable 'type' (value '@').
1975 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '@' to 'type'.
1976 ibd2sdi: [ERROR] IBD2SDI: option '-t' requires an argument.
1977 ibd2sdi: [ERROR] Unknown suffix '=' used for variable 'type' (value '=').
1978 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '=' to 'type'.
1979 # 22. Test --type option with
1980 # 22.1 non numeric/Alphanumeric
1981 ibd2sdi: [ERROR] Unknown suffix 'a' used for variable 'type' (value 'a').
1982 ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'a' to 'type'.
1983 ibd2sdi: [ERROR] Unknown suffix 'b' used for variable 'type' (value 'b').
1984 ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'b' to 'type'.
1985 # 22.2 numbers with +/-
1986 # 22.4 with no permitted values
1987 # 22.5 with very long value
1988 ibd2sdi: [ERROR] Incorrect unsigned integer value: '14324932470234893204293032'.
1989 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '14324932470234893204293032' to 'type'.
1990 # 22.6 with blank value
1991 ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified.
1992 # 22.7 value with spaces
1993 ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified.
1994 # 23. Test for reading form more than type example (invalid): -t 0,1
1995 ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '0,1').
1996 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '0,1' to 'type'.
1997 ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '2,3').
1998 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '2,3' to 'type'.
1999 # 24. With misspelled --type
2000 ibd2sdi: [ERROR] unknown variable 'tpe=0'.
2001 # 25. With Invalid file types
2002 # 25.1 With non IBD file
2003 [ERROR] ibd2sdi: Unable to read the page header of 1024 bytes.
2004 [ERROR] ibd2sdi: Bytes read was 5.
2005 # 25.2 with non existant file
2006 [ERROR] ibd2sdi: Unable to get file stats non_existant_file.txt.
2007 [ERROR] ibd2sdi: File doesn't exist.
2008 # 25.3 with empty file
2009 [ERROR] ibd2sdi: Unable to read the page header of 1024 bytes.
2010 [ERROR] ibd2sdi: Bytes read was 0.
2011 # restart
2012 SET DEBUG = '+d, skip_sdi';
2013 DROP TABLE t1;
2014 SET DEBUG = '-d, skip_sdi';
2015 # Case 3: Insert large SDI in compressed table
2016 SET DEBUG = '+d, skip_sdi';
2017 CREATE TABLE t1(c1 VARCHAR(32),
2018 c2 TEXT,
2019 primary key(c1))
2020 ENGINE = INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
2021 SET DEBUG = '-d, skip_sdi';
2022 # Section I: Test options
2023 # 1. Read SDI with long option
2024 # 3. Read with specific id & type (long option)
2025 ["ibd2sdi"
2026 ,
2027 {
2028 "type": 3,
2029 "id": 3,
2030 "object":
2031 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
2032 }
2033 ]
2034 # 4. Read with specific id & type (short option)
2035 # 5. Read with skip data
2036 # 6. Read SDI and dump into FILE
2037 # 7. Read SDI and dump into FILE using short option
2038 # 8. Print all records matching type (short option)
2039 # 9. Print all records matching id (long option)
2040 # 10. Print version
2041 IBD2SDI Ver #.#.#
2042 # 11. Print help
2043 IBD2SDI Ver #.#.#
2044 Copyright (c) YEAR, YEAR, Oracle and/or its affiliates.
2045
2046 Oracle is a registered trademark of Oracle Corporation and/or its
2047 affiliates. Other names may be trademarks of their respective
2048 owners.
2049
2050 IBD2SDI [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames]
2051 See http://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html for usage hints.
2052 -h, --help Display this help and exit.
2053 -v, --version Display version information and exit.
2054 -d, --dump-file=name
2055 Dump the tablespace SDI into the file passed by user.
2056 Without the filename, it will default to stdout
2057 -s, --skip-data Skip retrieving data from SDI records. Retrieve only id
2058 and type.
2059 -i, --id=# Retrieve the SDI record matching the id passed by user.
2060 -t, --type=# Retrieve the SDI records matching the type passed by
2061 user.
2062 -c, --strict-check=name
2063 Specify the strict checksum algorithm by the user.
2064 Allowed values are innodb, crc32, none.
2065 -n, --no-check Ignore the checksum verification.
2066 -p, --pretty Pretty format the SDI output.If false, SDI would be not
2067 human readable but it will be of less size
2068 (Defaults to on; use --skip-pretty to disable.)
2069
2070 Variables (--variable-name=value)
2071 and boolean options {FALSE|TRUE} Value (after reading options)
2072 --------------------------------- ----------------------------------------
2073 dump-file (No default value)
2074 skip-data FALSE
2075 id 0
2076 type 0
2077 strict-check crc32
2078 no-check FALSE
2079 pretty TRUE
2080 # 12. Print all records
2081 # 13. Retrieve explicit id & type
2082 ["ibd2sdi"
2083 ,
2084 {
2085 "type": 3,
2086 "id": 3,
2087 "object":
2088 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
2089 }
2090 ]
2091 # 14. Skip data and retrieve
2092 # 15. Dump all records into outfile
2093 # 16. Print all records matching type (short option)
2094 ["ibd2sdi"
2095 ,
2096 {
2097 "type": 0,
2098 "id": 0,
2099 "object":
2100 abcdefghijklmnopqrstuvwxyz
2101 }
2102 ]
2103 # 17. Print all records matching id (long option)
2104 ["ibd2sdi"
2105 ,
2106 {
2107 "type": 3,
2108 "id": 3,
2109 "object":
2110 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
2111 }
2112 ]
2113 # 18. Pass --no-check & --strict-check together
2114 [ERROR] ibd2sdi: Invalid combination of options. Cannot use --no-check & --strict-check together.
2115 ibd2sdi: [ERROR] Unknown suffix '@' used for variable 'type' (value '@').
2116 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '@' to 'type'.
2117 ibd2sdi: [ERROR] IBD2SDI: option '-t' requires an argument.
2118 ibd2sdi: [ERROR] Unknown suffix '=' used for variable 'type' (value '=').
2119 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '=' to 'type'.
2120 # 22. Test --type option with
2121 # 22.1 non numeric/Alphanumeric
2122 ibd2sdi: [ERROR] Unknown suffix 'a' used for variable 'type' (value 'a').
2123 ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'a' to 'type'.
2124 ibd2sdi: [ERROR] Unknown suffix 'b' used for variable 'type' (value 'b').
2125 ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'b' to 'type'.
2126 # 22.2 numbers with +/-
2127 # 22.4 with no permitted values
2128 # 22.5 with very long value
2129 ibd2sdi: [ERROR] Incorrect unsigned integer value: '14324932470234893204293032'.
2130 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '14324932470234893204293032' to 'type'.
2131 # 22.6 with blank value
2132 ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified.
2133 # 22.7 value with spaces
2134 ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified.
2135 # 23. Test for reading form more than type example (invalid): -t 0,1
2136 ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '0,1').
2137 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '0,1' to 'type'.
2138 ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '2,3').
2139 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '2,3' to 'type'.
2140 # 24. With misspelled --type
2141 ibd2sdi: [ERROR] unknown variable 'tpe=0'.
2142 # 25. With Invalid file types
2143 # 25.1 With non IBD file
2144 [ERROR] ibd2sdi: Unable to read the page header of 1024 bytes.
2145 [ERROR] ibd2sdi: Bytes read was 5.
2146 # 25.2 with non existant file
2147 [ERROR] ibd2sdi: Unable to get file stats non_existant_file.txt.
2148 [ERROR] ibd2sdi: File doesn't exist.
2149 # 25.3 with empty file
2150 [ERROR] ibd2sdi: Unable to read the page header of 1024 bytes.
2151 [ERROR] ibd2sdi: Bytes read was 0.
2152 page_zip_decompress 1: 9998 1024
2153 [ERROR] ibd2sdi: Decompression failed for compressed page [page id: space=X, page number=3].
2154 [ERROR] ibd2sdi: Couldn't read page 3.
2155 [ERROR] ibd2sdi: Couldn't reach upto level zero.
2156 # restart
2157 SET DEBUG = '+d, skip_sdi';
2158 DROP TABLE t1;
2159 SET DEBUG = '-d, skip_sdi';
2160 # Case 4: Insert large SDI in General Tablespace
2161 SET DEBUG = '+d, skip_sdi';
2162 CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd';
2163 CREATE TABLE t1(c1 VARCHAR(32),
2164 c2 TEXT,
2165 primary key(c1))
2166 ENGINE = INNODB TABLESPACE=ts1;
2167 SET DEBUG = '-d, skip_sdi';
2168 # Section I: Test options
2169 # 1. Read SDI with long option
2170 # 3. Read with specific id & type (long option)
2171 ["ibd2sdi"
2172 ,
2173 {
2174 "type": 3,
2175 "id": 3,
2176 "object":
2177 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
2178 }
2179 ]
2180 # 4. Read with specific id & type (short option)
2181 # 5. Read with skip data
2182 # 6. Read SDI and dump into FILE
2183 # 7. Read SDI and dump into FILE using short option
2184 # 8. Print all records matching type (short option)
2185 # 9. Print all records matching id (long option)
2186 # 10. Print version
2187 IBD2SDI Ver #.#.#
2188 # 11. Print help
2189 IBD2SDI Ver #.#.#
2190 Copyright (c) YEAR, YEAR, Oracle and/or its affiliates.
2191
2192 Oracle is a registered trademark of Oracle Corporation and/or its
2193 affiliates. Other names may be trademarks of their respective
2194 owners.
2195
2196 IBD2SDI [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames]
2197 See http://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html for usage hints.
2198 -h, --help Display this help and exit.
2199 -v, --version Display version information and exit.
2200 -d, --dump-file=name
2201 Dump the tablespace SDI into the file passed by user.
2202 Without the filename, it will default to stdout
2203 -s, --skip-data Skip retrieving data from SDI records. Retrieve only id
2204 and type.
2205 -i, --id=# Retrieve the SDI record matching the id passed by user.
2206 -t, --type=# Retrieve the SDI records matching the type passed by
2207 user.
2208 -c, --strict-check=name
2209 Specify the strict checksum algorithm by the user.
2210 Allowed values are innodb, crc32, none.
2211 -n, --no-check Ignore the checksum verification.
2212 -p, --pretty Pretty format the SDI output.If false, SDI would be not
2213 human readable but it will be of less size
2214 (Defaults to on; use --skip-pretty to disable.)
2215
2216 Variables (--variable-name=value)
2217 and boolean options {FALSE|TRUE} Value (after reading options)
2218 --------------------------------- ----------------------------------------
2219 dump-file (No default value)
2220 skip-data FALSE
2221 id 0
2222 type 0
2223 strict-check crc32
2224 no-check FALSE
2225 pretty TRUE
2226 # 12. Print all records
2227 # 13. Retrieve explicit id & type
2228 ["ibd2sdi"
2229 ,
2230 {
2231 "type": 3,
2232 "id": 3,
2233 "object":
2234 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
2235 }
2236 ]
2237 # 14. Skip data and retrieve
2238 # 15. Dump all records into outfile
2239 # 16. Print all records matching type (short option)
2240 ["ibd2sdi"
2241 ,
2242 {
2243 "type": 0,
2244 "id": 0,
2245 "object":
2246 abcdefghijklmnopqrstuvwxyz
2247 }
2248 ]
2249 # 17. Print all records matching id (long option)
2250 ["ibd2sdi"
2251 ,
2252 {
2253 "type": 3,
2254 "id": 3,
2255 "object":
2256 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
2257 }
2258 ]
2259 # 18. Pass --no-check & --strict-check together
2260 [ERROR] ibd2sdi: Invalid combination of options. Cannot use --no-check & --strict-check together.
2261 ibd2sdi: [ERROR] Unknown suffix '@' used for variable 'type' (value '@').
2262 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '@' to 'type'.
2263 ibd2sdi: [ERROR] IBD2SDI: option '-t' requires an argument.
2264 ibd2sdi: [ERROR] Unknown suffix '=' used for variable 'type' (value '=').
2265 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '=' to 'type'.
2266 # 22. Test --type option with
2267 # 22.1 non numeric/Alphanumeric
2268 ibd2sdi: [ERROR] Unknown suffix 'a' used for variable 'type' (value 'a').
2269 ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'a' to 'type'.
2270 ibd2sdi: [ERROR] Unknown suffix 'b' used for variable 'type' (value 'b').
2271 ibd2sdi: [ERROR] IBD2SDI: Error while setting value 'b' to 'type'.
2272 # 22.2 numbers with +/-
2273 # 22.4 with no permitted values
2274 # 22.5 with very long value
2275 ibd2sdi: [ERROR] Incorrect unsigned integer value: '14324932470234893204293032'.
2276 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '14324932470234893204293032' to 'type'.
2277 # 22.6 with blank value
2278 ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified.
2279 # 22.7 value with spaces
2280 ibd2sdi: [ERROR] IBD2SDI: Empty value for 'type' specified.
2281 # 23. Test for reading form more than type example (invalid): -t 0,1
2282 ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '0,1').
2283 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '0,1' to 'type'.
2284 ibd2sdi: [ERROR] Unknown suffix ',' used for variable 'type' (value '2,3').
2285 ibd2sdi: [ERROR] IBD2SDI: Error while setting value '2,3' to 'type'.
2286 # 24. With misspelled --type
2287 ibd2sdi: [ERROR] unknown variable 'tpe=0'.
2288 # 25. With Invalid file types
2289 # 25.1 With non IBD file
2290 [ERROR] ibd2sdi: Unable to read the page header of 1024 bytes.
2291 [ERROR] ibd2sdi: Bytes read was 5.
2292 # 25.2 with non existant file
2293 [ERROR] ibd2sdi: Unable to get file stats non_existant_file.txt.
2294 [ERROR] ibd2sdi: File doesn't exist.
2295 # 25.3 with empty file
2296 [ERROR] ibd2sdi: Unable to read the page header of 1024 bytes.
2297 [ERROR] ibd2sdi: Bytes read was 0.
2298 # restart
2299 SET DEBUG = '+d, skip_sdi';
2300 DROP TABLE t1;
2301 DROP TABLESPACE ts1;
2302 SET DEBUG = '-d, skip_sdi';
2303 UNINSTALL PLUGIN daemon_memcached;
2304 DROP DATABASE innodb_memcache;
2305 SET GLOBAL transaction_isolation = default;
2306 SET DEBUG = '+d, skip_sdi';
2307 DROP TABLE t3;
2308 SET DEBUG = '-d, skip_sdi';