summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/innochecksum.test
blob: 79896ed1e3f62093789e76fb18962605fd9f4dca (plain)
1
2
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
#
# 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;