diff options
Diffstat (limited to 'mysql-test/suite/innodb_zip/t/innochecksum.test')
-rw-r--r-- | mysql-test/suite/innodb_zip/t/innochecksum.test | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.test b/mysql-test/suite/innodb_zip/t/innochecksum.test new file mode 100644 index 00000000..b78cd432 --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innochecksum.test @@ -0,0 +1,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; |