diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-02-03 08:32:58 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-02-06 10:45:18 +0200 |
commit | 5a21094a4319ba65f7568937ff57fa8b00c2483b (patch) | |
tree | 107a6f049e55743b9c7d7dc85d2bd9fcf594ed66 | |
parent | abf7582112645ef8decc549eb662a07072b5cd32 (diff) | |
download | mariadb-git-5a21094a4319ba65f7568937ff57fa8b00c2483b.tar.gz |
Simplify innodb.innochecksum test.
There already are ROW_FORMAT=COMPRESSED tests in innodb_zip.innochecksum_2.
Use shutdown_mysqld.inc and start_mysqld.inc.
-rw-r--r-- | mysql-test/suite/innodb/r/innochecksum.result | 19 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innochecksum.test | 58 |
2 files changed, 9 insertions, 68 deletions
diff --git a/mysql-test/suite/innodb/r/innochecksum.result b/mysql-test/suite/innodb/r/innochecksum.result index 6fc613f3d1f..2d8a2652309 100644 --- a/mysql-test/suite/innodb/r/innochecksum.result +++ b/mysql-test/suite/innodb/r/innochecksum.result @@ -1,22 +1,5 @@ -# Create and populate a table CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB; INSERT INTO t1 (b) VALUES ('corrupt me'); INSERT INTO t1 (b) VALUES ('corrupt me'); -CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) -ROW_FORMAT=COMPRESSED ENGINE=InnoDB ; -INSERT INTO t2(b) SELECT b from t1; -CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) -ROW_FORMAT=COMPRESSED ENGINE=InnoDB KEY_BLOCK_SIZE=16; -INSERT INTO t3(b) SELECT b from t1; -# Write file to make mysql-test-run.pl expect the "crash", but don't -# start it until it's told to -# We give 30 seconds to do a clean shutdown because we do not want -# to redo apply the pages of t1.ibd at the time of recovery. -# We want SQL to initiate the first access to t1.ibd. -# Wait until disconnected. # Run innochecksum on t1 -# Run innochecksum on t2 -# Run innochecksum on t3 -# Write file to make mysql-test-run.pl start up the server again -# Cleanup -DROP TABLE t1, t2, t3; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/innochecksum.test b/mysql-test/suite/innodb/t/innochecksum.test index 11720ce926d..79896ed1e3f 100644 --- a/mysql-test/suite/innodb/t/innochecksum.test +++ b/mysql-test/suite/innodb/t/innochecksum.test @@ -2,17 +2,10 @@ # Test innochecksum # -# Don't test under embedded -source include/not_embedded.inc; -# Require InnoDB -source include/have_innodb.inc; +--source include/have_innodb.inc +# Embedded server test does not support restarting +--source include/not_embedded.inc -if (!$INNOCHECKSUM) { - --echo Need innochecksum binary - --die Need innochecksum binary -} - ---echo # Create and populate a table CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB; INSERT INTO t1 (b) VALUES ('corrupt me'); --disable_query_log @@ -25,50 +18,15 @@ while ($i) --enable_query_log INSERT INTO t1 (b) VALUES ('corrupt me'); -CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) -ROW_FORMAT=COMPRESSED ENGINE=InnoDB ; - -INSERT INTO t2(b) SELECT b from t1; - -CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) -ROW_FORMAT=COMPRESSED ENGINE=InnoDB KEY_BLOCK_SIZE=16; - -INSERT INTO t3(b) SELECT b from t1; - let $MYSQLD_DATADIR=`select @@datadir`; -let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd; -let t2_IBD = $MYSQLD_DATADIR/test/t2.ibd; -let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd; ---echo # Write file to make mysql-test-run.pl expect the "crash", but don't ---echo # start it until it's told to ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - ---echo # We give 30 seconds to do a clean shutdown because we do not want ---echo # to redo apply the pages of t1.ibd at the time of recovery. ---echo # We want SQL to initiate the first access to t1.ibd. -shutdown_server 30; - ---echo # Wait until disconnected. ---source include/wait_until_disconnected.inc +--source include/shutdown_mysqld.inc --echo # Run innochecksum on t1 --- disable_result_log ---exec $INNOCHECKSUM $t1_IBD - ---echo # Run innochecksum on t2 - ---exec $INNOCHECKSUM $t2_IBD - ---echo # Run innochecksum on t3 - ---exec $INNOCHECKSUM $t3_IBD +--disable_result_log +--exec $INNOCHECKSUM $MYSQLD_DATADIR/test/t1.ibd --enable_result_log ---echo # Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---enable_reconnect ---source include/wait_until_connected_again.inc +--source include/start_mysqld.inc ---echo # Cleanup -DROP TABLE t1, t2, t3; +DROP TABLE t1; |