From 44a9e3f7b4c908dc4ccc36a5ae48a281cd6dba88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Mon, 9 Feb 2015 16:14:27 +0200 Subject: [PATCH] MDEV-7139: Sporadic failure in innodb.innodb_corrupt_bit on P8 The testcase fails randomly due to ibuf merge happening in the background. Fix not to do any merges with ibuf_debug enabled. --- mysql-test/suite/innodb/t/innodb_corrupt_bit.test | 10 +++------- storage/innobase/ibuf/ibuf0ibuf.c | 8 ++++++++ storage/xtradb/ibuf/ibuf0ibuf.c | 6 ++++++ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test index 753f2e29ef2..88da919bfaa 100644 --- a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test +++ b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test @@ -3,11 +3,6 @@ # -- source include/have_innodb.inc -if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`) -{ - --skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier -} - # Issues with innodb_change_buffering_debug on Windows, so the test scenario # cannot be created on windows --source include/not_windows.inc @@ -16,6 +11,7 @@ if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema --source include/have_debug.inc -- disable_query_log +call mtr.add_suppression("Flagged corruption of idx.*in CHECK TABLE"); # This test setup is extracted from bug56680.test: # The flag innodb_change_buffering_debug is only available in debug builds. # It instructs InnoDB to try to evict pages from the buffer pool when @@ -28,10 +24,10 @@ SET GLOBAL innodb_change_buffering_debug = 1; SET UNIQUE_CHECKS=0; CREATE DATABASE pad; -let $i=345; +let $i=338; while ($i) { - --eval CREATE TABLE pad.t$i (a INT PRIMARY KEY) ENGINE=InnoDB; +--eval CREATE TABLE pad.t$i(a INT PRIMARY KEY)ENGINE=InnoDB; dec $i; } diff --git a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c index d22fc8b9962..eee5402daa7 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.c +++ b/storage/innobase/ibuf/ibuf0ibuf.c @@ -2731,6 +2731,14 @@ ibuf_contract_for_n_pages( ulint n_bytes; ulint n_pag2; +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + if (ibuf_debug) { + return(0); + } +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + + + while (sum_pages < n_pages) { n_bytes = ibuf_contract_ext(&n_pag2, sync); diff --git a/storage/xtradb/ibuf/ibuf0ibuf.c b/storage/xtradb/ibuf/ibuf0ibuf.c index e04b6ac3ba6..7811b6ba19e 100644 --- a/storage/xtradb/ibuf/ibuf0ibuf.c +++ b/storage/xtradb/ibuf/ibuf0ibuf.c @@ -2775,6 +2775,12 @@ ibuf_contract_for_n_pages( ulint n_bytes; ulint n_pag2; +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + if (ibuf_debug) { + return(0); + } +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + while (sum_pages < n_pages) { n_bytes = ibuf_contract_ext(&n_pag2, sync);