mariadb/mysql-test/suite/innodb/t/innochecksum.test
Marko Mäkelä 5a21094a43 Simplify innodb.innochecksum test.
There already are ROW_FORMAT=COMPRESSED tests in innodb_zip.innochecksum_2.

Use shutdown_mysqld.inc and start_mysqld.inc.
2017-02-06 10:45:18 +02:00

32 lines
708 B
Text

#
# Test innochecksum
#
--source include/have_innodb.inc
# Embedded server test does not support restarting
--source include/not_embedded.inc
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
--disable_query_log
--let $i = 1000
while ($i)
{
INSERT INTO t1 (b) VALUES (REPEAT('abcdefghijklmnopqrstuvwxyz', 100));
dec $i;
}
--enable_query_log
INSERT INTO t1 (b) VALUES ('corrupt me');
let $MYSQLD_DATADIR=`select @@datadir`;
--source include/shutdown_mysqld.inc
--echo # Run innochecksum on t1
--disable_result_log
--exec $INNOCHECKSUM $MYSQLD_DATADIR/test/t1.ibd
--enable_result_log
--source include/start_mysqld.inc
DROP TABLE t1;