Skip to content

Commit

Permalink
MDEV-7139: Sporadic failure in innodb.innodb_corrupt_bit on P8
Browse files Browse the repository at this point in the history
The testcase fails randomly due to ibuf merge happening in the background.
Fix not to do any merges with ibuf_debug enabled.
  • Loading branch information
Jan Lindström committed Feb 9, 2015
1 parent 919f40e commit 44a9e3f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
10 changes: 3 additions & 7 deletions mysql-test/suite/innodb/t/innodb_corrupt_bit.test
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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;
}

Expand Down
8 changes: 8 additions & 0 deletions storage/innobase/ibuf/ibuf0ibuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 6 additions & 0 deletions storage/xtradb/ibuf/ibuf0ibuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 44a9e3f

Please sign in to comment.