Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions mysql-test/mariadb-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4458,14 +4458,12 @@ ($$)
(
@global_suppressions,
qr/error .*connecting to master/,
qr/InnoDB: Error: in ALTER TABLE `test`.`t[12]`/,
qr/InnoDB: Error: table `test`.`t[12]` .*does not exist in the InnoDB internal/,
qr/InnoDB: Warning: a long semaphore wait:/,
qr/InnoDB: Dumping buffer pool.*/,
qr/InnoDB: Buffer pool.*/,
qr/InnoDB: Could not free any blocks in the buffer pool!/,
qr/InnoDB: Warning: Writer thread is waiting this semaphore:/,
qr/InnoDB: innodb_open_files .* should not be greater than/,
qr/InnoDB: Trying to delete tablespace.*but there are.*pending/,
qr/InnoDB: Tablespace 1[0-9]* was not found at .*, and innodb_force_recovery was set/,
qr/Slave: Unknown table 't1' .* 1051/,
qr/Slave SQL:.*(Internal MariaDB error code: [[:digit:]]+|Query:.*)/,
qr/slave SQL thread aborted/,
Expand Down
18 changes: 7 additions & 11 deletions mysql-test/suite/innodb/r/doublewrite.result
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ insert into t1 values(5, repeat('.',12));
commit work;
SET GLOBAL innodb_fast_shutdown = 0;
# restart
SET GLOBAL innodb_max_dirty_pages_pct_lwm=0,innodb_max_dirty_pages_pct=0;
SET GLOBAL innodb_max_dirty_pages_pct=99;
connect dml,localhost,root,,;
XA START 'x';
insert into t1 values (6, repeat('%', @@innodb_page_size/2));
insert into t1 values(6, repeat('%', @@innodb_page_size/2));
XA END 'x';
XA PREPARE 'x';
disconnect dml;
Expand All @@ -23,7 +25,6 @@ flush table t1 for export;
# restart
FOUND 1 /InnoDB: Recovered page \[page id: space=[1-9][0-9]*, page number=0\]/ in mysqld.1.err
# restart
XA ROLLBACK 'x';
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
Expand All @@ -34,18 +35,13 @@ f1 f2
3 ////////////
4 ------------
5 ............
connect dml,localhost,root,,;
XA START 'x';
insert into t1 values (6, repeat('%', @@innodb_page_size/2));
XA END 'x';
XA PREPARE 'x';
disconnect dml;
connection default;
flush table t1 for export;
SET GLOBAL innodb_max_dirty_pages_pct_lwm=0,innodb_max_dirty_pages_pct=0;
SET GLOBAL innodb_max_dirty_pages_pct=99;
XA ROLLBACK 'x';
FLUSH TABLE t1 FOR EXPORT;
# Kill the server
# restart
FOUND 4 /InnoDB: Recovered page \[page id: space=[1-9][0-9]*, page number=[03]\]/ in mysqld.1.err
XA ROLLBACK 'x';
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/innodb/t/doublewrite.combinations
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[strict_crc32]
--innodb-checksum-algorithm=strict_crc32
--innodb-use-atomic-writes=0
--innodb-undo-tablespaces=0

[strict_full_crc32]
--innodb-checksum-algorithm=strict_full_crc32
--innodb-use-atomic-writes=0
--innodb-undo-tablespaces=0
46 changes: 29 additions & 17 deletions mysql-test/suite/innodb/t/doublewrite.test
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,30 @@ commit work;
SET GLOBAL innodb_fast_shutdown = 0;
let $shutdown_timeout=;
--source include/restart_mysqld.inc
# Ensure that buf_flush_page_cleaner() has woken up from its
# first my_cond_timedwait() and gone idle.
sleep 1;
SET GLOBAL innodb_max_dirty_pages_pct_lwm=0,innodb_max_dirty_pages_pct=0;
let $wait_condition =
SELECT variable_value = 0
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY';
--source include/wait_condition.inc
SET GLOBAL innodb_max_dirty_pages_pct=99;
--source ../include/no_checkpoint_start.inc
connect (dml,localhost,root,,);
XA START 'x';
insert into t1 values (6, repeat('%', @@innodb_page_size/2));
insert into t1 values(6, repeat('%', @@innodb_page_size/2));
XA END 'x';
XA PREPARE 'x';
disconnect dml;
connection default;

flush table t1 for export;

let $restart_parameters=;
--let CLEANUP_IF_CHECKPOINT=drop table t1, unexpected_checkpoint;
--source ../include/no_checkpoint_end.inc

--copy_file $MYSQLD_DATADIR/ibdata1 $MYSQLD_DATADIR/ibdata1.bak
--copy_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile0.bak

perl;
use IO::Handle;
do "$ENV{MTR_SUITE_DIR}/include/crc32.pl";
Expand Down Expand Up @@ -148,6 +154,12 @@ let $shutdown_timeout=0;
--source include/shutdown_mysqld.inc
let $shutdown_timeout=;
# Corrupt the file in a better way.

--remove_file $MYSQLD_DATADIR/ibdata1
--remove_file $MYSQLD_DATADIR/ib_logfile0
--move_file $MYSQLD_DATADIR/ibdata1.bak $MYSQLD_DATADIR/ibdata1
--move_file $MYSQLD_DATADIR/ib_logfile0.bak $MYSQLD_DATADIR/ib_logfile0

perl;
use IO::Handle;
my $fname= "$ENV{'MYSQLD_DATADIR'}test/t1.ibd";
Expand All @@ -160,22 +172,23 @@ syswrite(FILE, chr(0) x ($page_size/2));
close FILE;
EOF
--source include/start_mysqld.inc
XA ROLLBACK 'x';
check table t1;
select f1, f2 from t1;

SET GLOBAL innodb_max_dirty_pages_pct_lwm=0,innodb_max_dirty_pages_pct=0;
let $wait_condition =
SELECT variable_value = 0
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY';
--source include/wait_condition.inc
SET GLOBAL innodb_max_dirty_pages_pct=99;
--source ../include/no_checkpoint_start.inc
connect (dml,localhost,root,,);
XA START 'x';
insert into t1 values (6, repeat('%', @@innodb_page_size/2));
XA END 'x';
XA PREPARE 'x';
disconnect dml;
connection default;

flush table t1 for export;
XA ROLLBACK 'x';
FLUSH TABLE t1 FOR EXPORT;

let $restart_parameters=;
# If we are skipping the test at this point due to an unexpected
# checkpoint, we will already have tested a part of this functionality.
--let CLEANUP_IF_CHECKPOINT=drop table t1;
--source ../include/no_checkpoint_end.inc

# Zero out the first page in file and try to recover from dblwr
Expand All @@ -189,7 +202,6 @@ EOF
--source include/start_mysqld.inc
let SEARCH_PATTERN=InnoDB: Recovered page \\[page id: space=[1-9][0-9]*, page number=[03]\\];
--source include/search_pattern_in_file.inc
XA ROLLBACK 'x';
check table t1;
select f1, f2 from t1;
drop table t1;
Expand Down
10 changes: 5 additions & 5 deletions mysql-test/suite/perfschema/r/threads_innodb.result
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
SELECT name, type, processlist_user, processlist_host, processlist_db,
processlist_command, processlist_time, processlist_state, processlist_info,
processlist_command, processlist_time, processlist_info,
parent_thread_id, role, instrumented
FROM performance_schema.threads
WHERE name LIKE 'thread/innodb/%'
GROUP BY name;
name type processlist_user processlist_host processlist_db processlist_command processlist_time processlist_state processlist_info parent_thread_id role instrumented
thread/innodb/page_cleaner_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/page_encrypt_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/thread_pool_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
name type processlist_user processlist_host processlist_db processlist_command processlist_time processlist_info parent_thread_id role instrumented
thread/innodb/page_cleaner_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/page_encrypt_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/thread_pool_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL YES
2 changes: 1 addition & 1 deletion mysql-test/suite/perfschema/t/threads_innodb.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# We suppress here duplicates rows with the goal to avoid that the test fails
# in case some defaults are changed.
SELECT name, type, processlist_user, processlist_host, processlist_db,
processlist_command, processlist_time, processlist_state, processlist_info,
processlist_command, processlist_time, processlist_info,
parent_thread_id, role, instrumented
FROM performance_schema.threads
WHERE name LIKE 'thread/innodb/%'
Expand Down