diff options
Diffstat (limited to 'mysql-test/suite/innodb/t/innodb-wl5522-debug.test')
-rw-r--r-- | mysql-test/suite/innodb/t/innodb-wl5522-debug.test | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test index 7bc71d87a03..76c7346b521 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test @@ -20,7 +20,6 @@ let $restart_noprint=2; call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation."); call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified."); -call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them."); call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*"); call mtr.add_suppression("InnoDB: Ignoring tablespace .* because it could not be opened."); call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); @@ -29,6 +28,9 @@ call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file"); call mtr.add_suppression("InnoDB: Page for tablespace "); call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS="); call mtr.add_suppression("InnoDB: Unknown index id .* on page"); +call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing"); +call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*ibdata1' page"); +call mtr.add_suppression("InnoDB: File '.*ibdata1' is corrupted"); FLUSH TABLES; let MYSQLD_DATADIR =`SELECT @@datadir`; @@ -1015,6 +1017,7 @@ do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; ib_restore_tablespaces("test", "t1"); EOF +ALTER TABLE t1 IMPORT TABLESPACE; DROP TABLE t1; # @@ -1172,20 +1175,29 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM t1; # Restore files +let INNODB_PAGE_SIZE=`select @@innodb_page_size`; + perl; do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; ib_restore_tablespaces("test", "t1"); +my $page; +my $ps = $ENV{INNODB_PAGE_SIZE}; +my $file = "$ENV{MYSQLD_DATADIR}/test/t1.ibd"; +open(FILE, "+<$file") || die "Unable to open $file"; +binmode FILE; +sysseek(FILE, 3*$ps, 0) || die "Unable to seek $file\n"; +die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps; +substr($page,24,2)='42'; +sysseek(FILE, 3*$ps, 0) || die "Unable to rewind $file\n"; +syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n"; +close(FILE) || die "Unable to close $file"; EOF -SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; - --replace_regex /'.*t1.cfg'/'t1.cfg'/ ---error ER_INTERNAL_ERROR +--error ER_NOT_KEYFILE ALTER TABLE t1 IMPORT TABLESPACE; -SET SESSION debug_dbug=@saved_debug_dbug; - DROP TABLE t1; perl; |