File: strict_checksum.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (73 lines) | stat: -rw-r--r-- 3,069 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
--echo #
--echo # Bug #20031570 INNODB_CHECKSUM_ALGORITHM VARIABLE LEADS TO CRASHING
--echo #

--source include/have_debug.inc

# Plugin 'InnoDB' has ref_count=1 after shutdown
call mtr.add_suppression("Plugin \'InnoDB\'");

set global innodb_checksum_algorithm=crc32;

# Table is created with crc32 checksum algorithm.
# First few pages have crc32 checksum algorithm

create table t1(f1 int not null primary key)engine=innodb;
SET GLOBAL innodb_buffer_pool_dump_at_shutdown=OFF;
# Restart the server to load the table t1 again.

let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err;
--echo # Restart the server with --log-error
--replace_result $SEARCH_FILE SEARCH_FILE
--let $restart_parameters = restart: --log-error=$SEARCH_FILE --no-console
--source include/restart_mysqld.inc

set global innodb_checksum_algorithm=strict_innodb;
set global innodb_limit_optimistic_insert_debug = 2;

select count(*) from t1;

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.;
--source include/search_pattern.inc

# Write the records in new pages with innodb checksum format.
insert into t1 values(4),(5),(6);
SET GLOBAL innodb_buffer_pool_dump_at_shutdown=OFF;

# Restart the server to load the table t1 again.
--echo # Restart the server with --log-error
--replace_result $SEARCH_FILE SEARCH_FILE
--source include/restart_mysqld.inc

set global innodb_checksum_algorithm=strict_none;
set global innodb_limit_optimistic_insert_debug = 2;

select count(*) from t1;

# Write the records in new pages with none checksum format.
insert into t1 values(7),(8),(9);

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.;

--source include/search_pattern.inc

SET GLOBAL innodb_buffer_pool_dump_at_shutdown=OFF;
# Restart the server to load the table t1 again.
--echo # Restart the server with --log-error
--replace_result $SEARCH_FILE SEARCH_FILE
--source include/restart_mysqld.inc

set global innodb_checksum_algorithm=strict_crc32;

# Load the table t1 content with crc32, innodb, none checksum pages.
select count(*) from t1;

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.;

--source include/search_pattern.inc

drop table t1;
--remove_file $SEARCH_FILE

--let $restart_parameters= restart:
--source include/restart_mysqld.inc