Debian Codegraph @

mysql-test/suite/innodb_zip/t/innochecksum.test

raw
1 #************************************************************
2 # WL6045:Improve Innochecksum
3 #************************************************************
4 --source include/have_innodb.inc
5 --source include/no_valgrind_without_big.inc
6 --source include/not_embedded.inc
7
8 let $MYSQLD_DATADIR= `SELECT @@datadir`;
9 let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
10
11 call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
12 call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
13
14 CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB;
15 CREATE INDEX idx1 ON tab1(c2(10));
16 INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1');
17
18 --echo # Shutdown the Server
19 --source include/shutdown_mysqld.inc
20 --echo # Server Default checksum = innodb
21
22 #
23 # Not repeatable with --parallel= >1
24 #
25 #--echo [1a]: check the innochecksum when file doesn't exists
26 #--error 1
27 #--exec $INNOCHECKSUM $MYSQLD_DATADIR/test/aa.ibd 2> $SEARCH_FILE
28 #let SEARCH_PATTERN= Error: $MYSQLD_DATADIR/test/aa.ibd cannot be found;
29 #--source include/search_pattern_in_file.inc
30
31 --echo [1b]: check the innochecksum without --strict-check
32 --exec $INNOCHECKSUM $MYSQLD_DATADIR/test/tab1.ibd
33
34 --echo [4]: check the innochecksum with --no-check ignores algorithm check, warning is expected
35 --error 1
36 --exec $INNOCHECKSUM --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
37 let SEARCH_PATTERN= Error: --no-check must be associated with --write option.;
38 --source include/search_pattern_in_file.inc
39
40 --echo [5]: check the innochecksum with short form --no-check ignores algorithm check, warning is expected
41 --error 1
42 --exec $INNOCHECKSUM -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
43 let SEARCH_PATTERN= Error: --no-check must be associated with --write option.;
44 --source include/search_pattern_in_file.inc
45
46 --echo [6]: check the innochecksum with full form strict-check & no-check , an error is expected
47 --error 1
48 --exec $INNOCHECKSUM --strict-check=innodb --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
49 let SEARCH_PATTERN= unknown variable 'strict-check=innodb';
50 --source include/search_pattern_in_file.inc
51
52 --echo [7]: check the innochecksum with short form strict-check & no-check , an error is expected
53 --error 1
54 --exec $INNOCHECKSUM -C innodb -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
55 let SEARCH_PATTERN= unknown option '-C';
56 --source include/search_pattern_in_file.inc
57
58 --error 1
59 --exec $INNOCHECKSUM --no-check --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
60 --let SEARCH_PATTERN= ignoring option '--write' due to invalid value 'crc32'
61 --source include/search_pattern_in_file.inc
62
63 --error 1
64 --exec $INNOCHECKSUM --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
65 --let SEARCH_PATTERN= Error: --no-check must be associated with --write option
66 --source include/search_pattern_in_file.inc
67
68 --exec $INNOCHECKSUM --no-check --write $MYSQLD_DATADIR/test/tab1.ibd
69 --source include/start_mysqld.inc
70
71 SELECT * FROM tab1;
72 DROP TABLE tab1;