Debian Codegraph @

mysql-test/suite/innodb/t/strict_checksum.test

raw
1 --echo #
2 --echo # Bug #20031570 INNODB_CHECKSUM_ALGORITHM VARIABLE LEADS TO CRASHING
3 --echo #
4
5 --source include/have_debug.inc
6
7 # Plugin 'InnoDB' has ref_count=1 after shutdown
8 call mtr.add_suppression("Plugin \'InnoDB\'");
9
10 set global innodb_checksum_algorithm=crc32;
11
12 # Table is created with crc32 checksum algorithm.
13 # First few pages have crc32 checksum algorithm
14
15 create table t1(f1 int not null primary key)engine=innodb;
16 SET GLOBAL innodb_buffer_pool_dump_at_shutdown=OFF;
17 # Restart the server to load the table t1 again.
18
19 let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err;
20 --echo # Restart the server with --log-error
21 --replace_result $SEARCH_FILE SEARCH_FILE
22 --let $restart_parameters = restart: --log-error=$SEARCH_FILE --no-console
23 --source include/restart_mysqld.inc
24
25 set global innodb_checksum_algorithm=strict_innodb;
26 set global innodb_limit_optimistic_insert_debug = 2;
27
28 select count(*) from t1;
29
30 let SEARCH_PATTERN=\\[Warning\\] .*MY-\\d+.* innodb_checksum_algorithm is set to "strict_innodb" but the page \\[page id: space=\d+, page number=\d+\\] contains a valid checksum .*. Accepting the page as valid. Change innodb_checksum_algorithm to .* to silently accept such pages or rewrite all pages so that they contain .* checksum.;
31 --source include/search_pattern.inc
32
33 # Write the records in new pages with innodb checksum format.
34 insert into t1 values(4),(5),(6);
35 SET GLOBAL innodb_buffer_pool_dump_at_shutdown=OFF;
36
37 # Restart the server to load the table t1 again.
38 --echo # Restart the server with --log-error
39 --replace_result $SEARCH_FILE SEARCH_FILE
40 --source include/restart_mysqld.inc
41
42 set global innodb_checksum_algorithm=strict_none;
43 set global innodb_limit_optimistic_insert_debug = 2;
44
45 select count(*) from t1;
46
47 # Write the records in new pages with none checksum format.
48 insert into t1 values(7),(8),(9);
49
50 let SEARCH_PATTERN=\\[Warning\\] .*MY-\\d+.* innodb_checksum_algorithm is set to "strict_none" but the page \\[page id: space=\d+, page number=\d+\\] contains a valid checksum .*. Accepting the page as valid. Change innodb_checksum_algorithm to .* to silently accept such pages or rewrite all pages so that they contain .* checksum.;
51
52 --source include/search_pattern.inc
53
54 SET GLOBAL innodb_buffer_pool_dump_at_shutdown=OFF;
55 # Restart the server to load the table t1 again.
56 --echo # Restart the server with --log-error
57 --replace_result $SEARCH_FILE SEARCH_FILE
58 --source include/restart_mysqld.inc
59
60 set global innodb_checksum_algorithm=strict_crc32;
61
62 # Load the table t1 content with crc32, innodb, none checksum pages.
63 select count(*) from t1;
64
65 let SEARCH_PATTERN=\\[Warning\\] .*MY-\\d+.* innodb_checksum_algorithm is set to "strict_crc32" but the page \\[page id: space=\d+, page number=\d+\\] contains a valid checksum .*. Accepting the page as valid. Change innodb_checksum_algorithm to .* to silently accept such pages or rewrite all pages so that they contain .* checksum.;
66
67 --source include/search_pattern.inc
68
69 drop table t1;
70 --remove_file $SEARCH_FILE
71
72 --let $restart_parameters= restart:
73 --source include/restart_mysqld.inc