Commit 44a9e3f7 authored by Jan Lindström's avatar Jan Lindström

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.
parent 919f40e4
......@@ -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;
}
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment