| 12
 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
 
 | #************************************************************
# WL6045:Improve Innochecksum
#************************************************************
--source include/have_innodb.inc
--source include/no_valgrind_without_big.inc
--source include/not_embedded.inc
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB;
CREATE INDEX idx1 ON tab1(c2(10));
INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1');
--echo # Shutdown the Server
--source include/shutdown_mysqld.inc
--echo # Server Default checksum = innodb
#
# Not repeatable with --parallel= >1
#
#--echo [1a]: check the innochecksum when file doesn't exists
#--error 1
#--exec $INNOCHECKSUM  $MYSQLD_DATADIR/test/aa.ibd 2> $SEARCH_FILE
#let SEARCH_PATTERN= Error: $MYSQLD_DATADIR/test/aa.ibd cannot be found;
#--source include/search_pattern_in_file.inc
--echo [1b]: check the innochecksum without --strict-check
--exec $INNOCHECKSUM  $MYSQLD_DATADIR/test/tab1.ibd
--echo [4]: check the innochecksum with --no-check ignores algorithm check, warning is expected
--error 1
--exec $INNOCHECKSUM --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
let SEARCH_PATTERN= Error: --no-check must be associated with --write option.;
--source include/search_pattern_in_file.inc
--echo [5]: check the innochecksum with short form --no-check ignores algorithm check, warning is expected
--error 1
--exec $INNOCHECKSUM  -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
let SEARCH_PATTERN= Error: --no-check must be associated with --write option.;
--source include/search_pattern_in_file.inc
--echo [6]: check the innochecksum with full form strict-check & no-check , an error is expected
--error 1
--exec $INNOCHECKSUM --strict-check=innodb  --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
let SEARCH_PATTERN= unknown variable 'strict-check=innodb';
--source include/search_pattern_in_file.inc
--echo [7]: check the innochecksum with short form strict-check & no-check , an error is expected
--error 1
--exec $INNOCHECKSUM -C innodb -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
let SEARCH_PATTERN= unknown option '-C';
--source include/search_pattern_in_file.inc
--error 1
--exec $INNOCHECKSUM --no-check --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
--let SEARCH_PATTERN= ignoring option '--write' due to invalid value 'crc32'
--source include/search_pattern_in_file.inc
--error 1
--exec $INNOCHECKSUM --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
--let SEARCH_PATTERN= Error: --no-check must be associated with --write option
--source include/search_pattern_in_file.inc
--exec $INNOCHECKSUM --no-check --write $MYSQLD_DATADIR/test/tab1.ibd
--source include/start_mysqld.inc
SELECT * FROM tab1;
DROP TABLE tab1;
 |