Merge lp:~laurynas-biveinis/percona-server/bug1036530 into lp:percona-server/5.1

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 472
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1036530
Merge into: lp:percona-server/5.1
Diff against target: 66 lines (+27/-0)
2 files modified
Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result (+3/-0)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test (+24/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1036530
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+119504@code.launchpad.net

Description of the change

Fix bug 1036530 (Sporadic innodb_plugin.percona_changed_page_bmp
failures in Jenkins).

The problem was flawed and unfinished crash injection testing in the
test case: the last server restart set up a crash injection before the
bitmap write but failed to actually trigger it in the test case. Then
the crash used to get triggered during the server shutdown bitmap
write and thus silently ignored by MTR. But sometimes the bitmap
write would happen while the server processes DROP TABLE command,
appearing as an unexpected server crash to MTR.

Fixed by triggering the crash site in the test case, waiting for the
server to come back again before starting the testsuite cleanups.

Additionally put extra workload on the server before this test case
part to have some good data pages in the bitmap file. Also added
comments to the test cace points where the LSN tracking range
contuinity will have to be tested once the necessary info is exposed
through INFORMATION_SCHEMA.

Re-recorded the testcase.

Jenkins: http://jenkins.percona.com/job/percona-server-5.1-param/368/
Issue #16274

To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result'
--- Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result 2012-06-14 09:16:03 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result 2012-08-14 10:37:21 +0000
@@ -17,5 +17,8 @@
17INSERT INTO t2 VALUES (1),(2),(3),(4),(5);17INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
18INSERT INTO t1 SELECT x FROM t1;18INSERT INTO t1 SELECT x FROM t1;
19SET GLOBAL INNODB_FAST_SHUTDOWN=2;19SET GLOBAL INNODB_FAST_SHUTDOWN=2;
20INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
20call mtr.add_suppression("InnoDB: Warning: truncated block detected.*");21call mtr.add_suppression("InnoDB: Warning: truncated block detected.*");
22INSERT INTO t1 SELECT x FROM t1;
23ERROR HY000: Lost connection to MySQL server during query
21DROP TABLE t1, t2;24DROP TABLE t1, t2;
2225
=== modified file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test'
--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test 2012-06-14 09:16:03 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test 2012-08-14 10:37:21 +0000
@@ -33,6 +33,9 @@
33--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect33--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
34--source include/wait_until_connected_again.inc34--source include/wait_until_connected_again.inc
3535
36# TODO: check the tracked LSN range continuity once this info is exposed through
37# INFORMATION_SCHEMA.
38
36# Create more log data, larger amount than the log group capacity. At the same time test second space id.39# Create more log data, larger amount than the log group capacity. At the same time test second space id.
37INSERT INTO t1 SELECT x FROM t1;40INSERT INTO t1 SELECT x FROM t1;
38INSERT INTO t1 SELECT x FROM t1;41INSERT INTO t1 SELECT x FROM t1;
@@ -67,6 +70,9 @@
6770
68--source include/restart_mysqld.inc71--source include/restart_mysqld.inc
6972
73# TODO: check the tracked LSN range continuity once this info is exposed through
74# INFORMATION_SCHEMA.
75
70file_exists $BITMAP_FILE;76file_exists $BITMAP_FILE;
7177
72# Test that an empty existing bitmap file is handled properly when it's impossible to re-read the full missing range.78# Test that an empty existing bitmap file is handled properly when it's impossible to re-read the full missing range.
@@ -82,6 +88,8 @@
82--source include/wait_until_connected_again.inc88--source include/wait_until_connected_again.inc
8389
84file_exists $BITMAP_FILE;90file_exists $BITMAP_FILE;
91# Create at least one more bitmap page on shutdown
92INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
8593
86# Test that the bitmap file is read in block size multiples with junk at the end discarded94# Test that the bitmap file is read in block size multiples with junk at the end discarded
87--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect95--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
@@ -97,4 +105,20 @@
97105
98file_exists $BITMAP_FILE;106file_exists $BITMAP_FILE;
99107
108# TODO: check the tracked LSN range continuity once this info is exposed through
109# INFORMATION_SCHEMA.
110
111# Test crashing before writing of new bitmap data
112
113--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
114--error 2013
115INSERT INTO t1 SELECT x FROM t1;
116--enable_reconnect
117--source include/wait_until_connected_again.inc
118
119file_exists $BITMAP_FILE;
120
121# TODO: check the tracked LSN range continuity once this info is exposed through
122# INFORMATION_SCHEMA.
123
100DROP TABLE t1, t2;124DROP TABLE t1, t2;

Subscribers

People subscribed via source and target branches