Merge lp:~laurynas-biveinis/percona-server/bug1382336-5.5 into lp:percona-server/5.5

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 710
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1382336-5.5
Merge into: lp:percona-server/5.5
Diff against target: 64 lines (+38/-1)
4 files modified
mysql-test/suite/innodb/r/percona_changed_page_bmp_requests_debug.result (+9/-0)
mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug-master.opt (+1/-0)
mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug.test (+27/-0)
storage/innobase/log/log0online.c (+1/-1)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1382336-5.5
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+238657@code.launchpad.net

Description of the change

Fix bug 1382336 (Purging bitmaps exactly up to the last tracked LSN
aborts change tracking).

If PURGE request is issued up to exactly the current tracked LSN, the
current bitmap file will be closed but a new one will not be opened
afterwards due to a mismatch in conditions in
log_online_purge_changed_page_bitmaps. This will cause a bitmap write
error on the next tracking attempt.

Fix by aligning the close and reopen conditions. Add a testcase to
percona_changed_page_bmp_requests_debug.

    http://jenkins.percona.com/job/percona-server-5.5-param/1058/#showFailuresLink

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'mysql-test/suite/innodb/r/percona_changed_page_bmp_requests_debug.result'
--- mysql-test/suite/innodb/r/percona_changed_page_bmp_requests_debug.result 1970-01-01 00:00:00 +0000
+++ mysql-test/suite/innodb/r/percona_changed_page_bmp_requests_debug.result 2014-10-17 06:10:41 +0000
@@ -0,0 +1,9 @@
1CREATE TABLE t1(a INT) ENGINE=InnoDB;
2INSERT INTO t1 VALUES (10);
3SET @@GLOBAL.innodb_log_checkpoint_now=TRUE;
4SET @@GLOBAL.innodb_track_redo_log_now=TRUE;
5PURGE CHANGED_PAGE_BITMAPS BEFORE CURRENT_LSN;
6INSERT INTO t1 VALUES (20);
7SET @@GLOBAL.innodb_log_checkpoint_now=TRUE;
8SET @@GLOBAL.innodb_track_redo_log_now=TRUE;
9DROP TABLE t1;
010
=== added file 'mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug-master.opt'
--- mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug-master.opt 1970-01-01 00:00:00 +0000
+++ mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug-master.opt 2014-10-17 06:10:41 +0000
@@ -0,0 +1,1 @@
1--innodb_track_changed_pages=TRUE
02
=== added file 'mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug.test'
--- mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug.test 1970-01-01 00:00:00 +0000
+++ mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug.test 2014-10-17 06:10:41 +0000
@@ -0,0 +1,27 @@
1#
2# Tests for changed page tracking user requests that need a debug build
3#
4--source include/have_innodb.inc
5--source include/have_debug.inc
6
7#
8# Bug 1382336: Purging bitmaps exactly up to the last tracked LSN aborts change tracking
9#
10CREATE TABLE t1(a INT) ENGINE=InnoDB;
11
12INSERT INTO t1 VALUES (10);
13
14SET @@GLOBAL.innodb_log_checkpoint_now=TRUE;
15SET @@GLOBAL.innodb_track_redo_log_now=TRUE;
16
17let $current_lsn = query_get_value(SHOW STATUS LIKE 'innodb_lsn_current', Value, 1);
18
19--replace_regex /[0-9]+/CURRENT_LSN/
20eval PURGE CHANGED_PAGE_BITMAPS BEFORE $current_lsn;
21
22INSERT INTO t1 VALUES (20);
23
24SET @@GLOBAL.innodb_log_checkpoint_now=TRUE;
25SET @@GLOBAL.innodb_track_redo_log_now=TRUE;
26
27DROP TABLE t1;
028
=== modified file 'storage/innobase/log/log0online.c'
--- storage/innobase/log/log0online.c 2014-07-18 13:54:05 +0000
+++ storage/innobase/log/log0online.c 2014-10-17 06:10:41 +0000
@@ -1817,7 +1817,7 @@
1817 return TRUE;1817 return TRUE;
1818 }1818 }
18191819
1820 if (srv_track_changed_pages && lsn >= log_bmp_sys->end_lsn) {1820 if (srv_track_changed_pages && lsn > log_bmp_sys->end_lsn) {
1821 /* If we have to delete the current output file, close it1821 /* If we have to delete the current output file, close it
1822 first. */1822 first. */
1823 os_file_close(log_bmp_sys->out.file);1823 os_file_close(log_bmp_sys->out.file);

Subscribers

People subscribed via source and target branches