summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r--mysql-test/suite/innodb/disabled.def13
-rw-r--r--mysql-test/suite/innodb/r/create-index-debug.result23
-rw-r--r--mysql-test/suite/innodb/r/import_corrupted.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug.result6
-rw-r--r--mysql-test/suite/innodb/r/page_id_innochecksum.result3
-rw-r--r--mysql-test/suite/innodb/t/corrupted_during_recovery.test4
-rw-r--r--mysql-test/suite/innodb/t/create-index-debug.test34
-rw-r--r--mysql-test/suite/innodb/t/import_corrupted.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test21
-rw-r--r--mysql-test/suite/innodb/t/innodb_buffer_pool_resize.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_buffer_pool_resize_temporary.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug14147491.test7
-rw-r--r--mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test2
-rw-r--r--mysql-test/suite/innodb/t/page_id_innochecksum.test6
-rw-r--r--mysql-test/suite/innodb/t/restart.test2
16 files changed, 39 insertions, 90 deletions
diff --git a/mysql-test/suite/innodb/disabled.def b/mysql-test/suite/innodb/disabled.def
deleted file mode 100644
index 35c941f8af7..00000000000
--- a/mysql-test/suite/innodb/disabled.def
+++ /dev/null
@@ -1,13 +0,0 @@
-##############################################################################
-#
-# List the test cases that are to be disabled temporarily.
-#
-# Separate the test case name and the comment with ':'.
-#
-# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
-#
-# Do not use any TAB characters for whitespace.
-#
-##############################################################################
-
-create-index-debug : MDEV-13680 InnoDB may crash when btr_page_alloc() fails
diff --git a/mysql-test/suite/innodb/r/create-index-debug.result b/mysql-test/suite/innodb/r/create-index-debug.result
deleted file mode 100644
index 9d266c68af3..00000000000
--- a/mysql-test/suite/innodb/r/create-index-debug.result
+++ /dev/null
@@ -1,23 +0,0 @@
-SET @saved_debug_dbug = @@SESSION.debug_dbug;
-#
-#BUG#21326304 INNODB ONLINE ALTER TABLE ENDS IN CRASH ON DISK FULL
-#
-CREATE TABLE t1(f1 CHAR(255) NOT NULL, f2 CHAR(255) NOT NULL, f3
-CHAR(255) NOT NULL, f4 CHAR(255) NOT NULL, f5 CHAR(255) NOT NULL,f6
-CHAR(255) NOT NULL, f7 CHAR(255) NOT NULL, f8 CHAR(255) NOT NULL,f9
-CHAR(255) NOT NULL, f10 CHAR(255) NOT NULL, f11 CHAR(255) NOT NULL,f12
-CHAR(255) NOT NULL, f13 CHAR(255) NOT NULL, f14 CHAR(255) NOT NULL,f15
-CHAR(255) NOT NULL, f16 CHAR(255) NOT NULL, f17 CHAR(255) NOT NULL,f18
-CHAR(255) NOT NULL)
-ENGINE=INNODB ROW_FORMAT=DYNAMIC;
-INSERT INTO t1
-VALUES('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r');
-INSERT INTO t1 SELECT * FROM t1;
-INSERT INTO t1 SELECT * FROM t1;
-INSERT INTO t1 SELECT * FROM t1;
-INSERT INTO t1 SELECT * FROM t1;
-SET debug_dbug = '+d,disk_is_full';
-ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
-ERROR HY000: The table 't1' is full
-SET debug_dbug= @saved_debug_dbug;
-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/import_corrupted.result b/mysql-test/suite/innodb/r/import_corrupted.result
index 149a48dccfe..bc24a28f22f 100644
--- a/mysql-test/suite/innodb/r/import_corrupted.result
+++ b/mysql-test/suite/innodb/r/import_corrupted.result
@@ -1,6 +1,7 @@
call mtr.add_suppression("Table `test`.`t2` should have 2 indexes but the tablespace has 1 indexes");
call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it");
call mtr.add_suppression("Trying to read .* bytes at .* outside the bounds of the file: \\..test.t2\\.ibd");
+call mtr.add_suppression("InnoDB: File '.*test/t2\\.ibd' is corrupted");
CREATE TABLE t1 (
id INT AUTO_INCREMENT PRIMARY KEY,
not_id INT,
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
index 4c1b35ac1e4..8a6c49c79c9 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
@@ -9,6 +9,8 @@ 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;
SET GLOBAL innodb_file_per_table = 1;
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB;
@@ -862,10 +864,8 @@ ALTER TABLE t1 DISCARD TABLESPACE;
SELECT COUNT(*) FROM t1;
ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure";
ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption
-SET SESSION debug_dbug=@saved_debug_dbug;
+ERROR HY000: Index for table 't1' is corrupt; try to repair it
DROP TABLE t1;
unlink: t1.ibd
unlink: t1.cfg
diff --git a/mysql-test/suite/innodb/r/page_id_innochecksum.result b/mysql-test/suite/innodb/r/page_id_innochecksum.result
index e2c13442fe6..7a5f44b21e6 100644
--- a/mysql-test/suite/innodb/r/page_id_innochecksum.result
+++ b/mysql-test/suite/innodb/r/page_id_innochecksum.result
@@ -3,4 +3,7 @@ create table t1(f1 int not null)engine=innodb;
insert into t1 values(1), (2), (3);
# Change the page offset
FOUND 1 /page id mismatch/ in result.log
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+InnoDB 0 transactions not purged
drop table t1;
+call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd': Page read from tablespace is corrupted\\.");
diff --git a/mysql-test/suite/innodb/t/corrupted_during_recovery.test b/mysql-test/suite/innodb/t/corrupted_during_recovery.test
index 4893a638dda..a7858dd1e26 100644
--- a/mysql-test/suite/innodb/t/corrupted_during_recovery.test
+++ b/mysql-test/suite/innodb/t/corrupted_during_recovery.test
@@ -6,8 +6,8 @@ call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted.");
-call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=3\\]");
-call mtr.add_suppression("Table .*t1.* is corrupted. Please drop the table and recreate.");
+call mtr.add_suppression("Table test/t1 is corrupted. Please drop the table and recreate\\.");
+call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
--enable_query_log
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
diff --git a/mysql-test/suite/innodb/t/create-index-debug.test b/mysql-test/suite/innodb/t/create-index-debug.test
deleted file mode 100644
index 9ea416fbe1e..00000000000
--- a/mysql-test/suite/innodb/t/create-index-debug.test
+++ /dev/null
@@ -1,34 +0,0 @@
---source include/have_innodb.inc
---source include/have_innodb_16k.inc
---source include/have_debug.inc
-
-SET @saved_debug_dbug = @@SESSION.debug_dbug;
-
---echo #
---echo #BUG#21326304 INNODB ONLINE ALTER TABLE ENDS IN CRASH ON DISK FULL
---echo #
-CREATE TABLE t1(f1 CHAR(255) NOT NULL, f2 CHAR(255) NOT NULL, f3
-CHAR(255) NOT NULL, f4 CHAR(255) NOT NULL, f5 CHAR(255) NOT NULL,f6
-CHAR(255) NOT NULL, f7 CHAR(255) NOT NULL, f8 CHAR(255) NOT NULL,f9
-CHAR(255) NOT NULL, f10 CHAR(255) NOT NULL, f11 CHAR(255) NOT NULL,f12
-CHAR(255) NOT NULL, f13 CHAR(255) NOT NULL, f14 CHAR(255) NOT NULL,f15
-CHAR(255) NOT NULL, f16 CHAR(255) NOT NULL, f17 CHAR(255) NOT NULL,f18
-CHAR(255) NOT NULL)
-ENGINE=INNODB ROW_FORMAT=DYNAMIC;
-
-INSERT INTO t1
-VALUES('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r');
-
-INSERT INTO t1 SELECT * FROM t1;
-INSERT INTO t1 SELECT * FROM t1;
-INSERT INTO t1 SELECT * FROM t1;
-INSERT INTO t1 SELECT * FROM t1;
-
-SET debug_dbug = '+d,disk_is_full';
-
---error ER_RECORD_FILE_FULL
-ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
-
-SET debug_dbug= @saved_debug_dbug;
-
-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/import_corrupted.test b/mysql-test/suite/innodb/t/import_corrupted.test
index 3a9b9a40493..57c8c6dd9be 100644
--- a/mysql-test/suite/innodb/t/import_corrupted.test
+++ b/mysql-test/suite/innodb/t/import_corrupted.test
@@ -3,6 +3,7 @@
call mtr.add_suppression("Table `test`.`t2` should have 2 indexes but the tablespace has 1 indexes");
call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it");
call mtr.add_suppression("Trying to read .* bytes at .* outside the bounds of the file: \\..test.t2\\.ibd");
+call mtr.add_suppression("InnoDB: File '.*test/t2\\.ibd' is corrupted");
let MYSQLD_DATADIR = `SELECT @@datadir`;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index e7a39f23e11..efa2b1ea403 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -29,6 +29,8 @@ 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`;
@@ -1173,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;
diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize.test b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize.test
index 06760e09998..051f38a572e 100644
--- a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize.test
+++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize.test
@@ -7,7 +7,7 @@
let $wait_timeout = 180;
let $wait_condition =
- SELECT SUBSTR(variable_value, 1, 31) = 'Completed resizing buffer pool.'
+ SELECT SUBSTR(variable_value, 1, 30) = 'Completed resizing buffer pool'
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_resize_status';
diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_temporary.test b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_temporary.test
index 8ada5bdb183..c49ae451638 100644
--- a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_temporary.test
+++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_temporary.test
@@ -15,7 +15,7 @@ SET GLOBAL innodb_buffer_pool_size=8388608;
let $wait_timeout = 60;
let $wait_condition =
- SELECT SUBSTR(variable_value, 1, 31) = 'Completed resizing buffer pool.'
+ SELECT SUBSTR(variable_value, 1, 30) = 'Completed resizing buffer pool'
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
--source include/wait_condition.inc
diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.test b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.test
index 10ce14d4af7..78db6bf0d5a 100644
--- a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.test
+++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.test
@@ -8,7 +8,7 @@
let $wait_timeout = 180;
let $wait_condition =
- SELECT SUBSTR(variable_value, 1, 31) = 'Completed resizing buffer pool.'
+ SELECT SUBSTR(variable_value, 1, 30) = 'Completed resizing buffer pool'
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_resize_status';
diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491.test b/mysql-test/suite/innodb/t/innodb_bug14147491.test
index c6e4f01a642..3c37f1b7cce 100644
--- a/mysql-test/suite/innodb/t/innodb_bug14147491.test
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491.test
@@ -12,6 +12,7 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted\\. Please dro
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
call mtr.add_suppression("InnoDB: We detected index corruption in an InnoDB type table");
call mtr.add_suppression("Index for table 't1' is corrupt; try to repair it");
+call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
--enable_query_log
--echo # Ensure that purge will not crash on the table after we corrupt it.
@@ -70,13 +71,13 @@ EOF
--echo # Now t1 is corrupted but we should not crash
---error 1030,1712,1932
+--error ER_GET_ERRNO,ER_NOT_KEYFILE,ER_INDEX_CORRUPT,ER_NO_SUCH_TABLE_IN_ENGINE
SELECT * FROM t1;
---error 126,1030,1034,1712,1932
+--error 126,ER_GET_ERRNO,ER_NOT_KEYFILE,ER_INDEX_CORRUPT,ER_NO_SUCH_TABLE_IN_ENGINE
INSERT INTO t1(b) VALUES('abcdef');
---error 1030,1712,1932
+--error ER_GET_ERRNO,ER_NOT_KEYFILE,ER_INDEX_CORRUPT,ER_NO_SUCH_TABLE_IN_ENGINE
UPDATE t1 set b = 'deadbeef' where a = 1;
--echo # Cleanup, this must be possible
diff --git a/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test
index ac5f14ba9ad..d4391f89ec1 100644
--- a/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test
+++ b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test
@@ -3,13 +3,13 @@
--disable_query_log
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
-call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=19\\]");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to read page 19 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted\\.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Plugin initialization aborted at srv0start\\.cc.* with error Data structure corruption");
call mtr.add_suppression("\\[ERROR\\] Plugin 'InnoDB' (init function|registration)");
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption");
call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't1' is corrupt; try to repair it");
call mtr.add_suppression("InnoDB: btr_pcur_open_low level: 0 table: `test`\\.`t1` index: `PRIMARY`");
+call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
--enable_query_log
CREATE TABLE t1 (pk INT PRIMARY KEY, c CHAR(255))ENGINE=InnoDB STATS_PERSISTENT=0;
diff --git a/mysql-test/suite/innodb/t/page_id_innochecksum.test b/mysql-test/suite/innodb/t/page_id_innochecksum.test
index f5166018dd1..2a2c14844fa 100644
--- a/mysql-test/suite/innodb/t/page_id_innochecksum.test
+++ b/mysql-test/suite/innodb/t/page_id_innochecksum.test
@@ -61,9 +61,11 @@ let SEARCH_PATTERN=page id mismatch;
--source include/search_pattern_in_file.inc
--remove_file $resultlog
-# prevent purge from crashing on page ID mismatch
-let $restart_parameters=--innodb-force-recovery=2;
+let $restart_parameters=--innodb-force-recovery=1;
--source include/start_mysqld.inc
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+--source include/wait_all_purged.inc
drop table t1;
+call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd': Page read from tablespace is corrupted\\.");
let $restart_parameters=;
--source include/restart_mysqld.inc
diff --git a/mysql-test/suite/innodb/t/restart.test b/mysql-test/suite/innodb/t/restart.test
index 6e80a684b68..bb3d08a8779 100644
--- a/mysql-test/suite/innodb/t/restart.test
+++ b/mysql-test/suite/innodb/t/restart.test
@@ -93,7 +93,7 @@ DROP TABLE tr,tc,td;
let $wait_timeout = 180;
let $wait_condition =
- SELECT SUBSTR(variable_value, 1, 31) = 'Completed resizing buffer pool.'
+ SELECT SUBSTR(variable_value, 1, 30) = 'Completed resizing buffer pool'
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_resize_status';