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

Proposed by Laurynas Biveinis on 2014-10-17
Status: Merged
Approved by: Laurynas Biveinis on 2014-10-17
Approved revision: 699
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 on 2014-10-17
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.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'mysql-test/suite/innodb/r/percona_changed_page_bmp_requests_debug.result'
2--- mysql-test/suite/innodb/r/percona_changed_page_bmp_requests_debug.result 1970-01-01 00:00:00 +0000
3+++ mysql-test/suite/innodb/r/percona_changed_page_bmp_requests_debug.result 2014-10-17 06:10:41 +0000
4@@ -0,0 +1,9 @@
5+CREATE TABLE t1(a INT) ENGINE=InnoDB;
6+INSERT INTO t1 VALUES (10);
7+SET @@GLOBAL.innodb_log_checkpoint_now=TRUE;
8+SET @@GLOBAL.innodb_track_redo_log_now=TRUE;
9+PURGE CHANGED_PAGE_BITMAPS BEFORE CURRENT_LSN;
10+INSERT INTO t1 VALUES (20);
11+SET @@GLOBAL.innodb_log_checkpoint_now=TRUE;
12+SET @@GLOBAL.innodb_track_redo_log_now=TRUE;
13+DROP TABLE t1;
14
15=== added file 'mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug-master.opt'
16--- mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug-master.opt 1970-01-01 00:00:00 +0000
17+++ mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug-master.opt 2014-10-17 06:10:41 +0000
18@@ -0,0 +1,1 @@
19+--innodb_track_changed_pages=TRUE
20
21=== added file 'mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug.test'
22--- mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug.test 1970-01-01 00:00:00 +0000
23+++ mysql-test/suite/innodb/t/percona_changed_page_bmp_requests_debug.test 2014-10-17 06:10:41 +0000
24@@ -0,0 +1,27 @@
25+#
26+# Tests for changed page tracking user requests that need a debug build
27+#
28+--source include/have_innodb.inc
29+--source include/have_debug.inc
30+
31+#
32+# Bug 1382336: Purging bitmaps exactly up to the last tracked LSN aborts change tracking
33+#
34+CREATE TABLE t1(a INT) ENGINE=InnoDB;
35+
36+INSERT INTO t1 VALUES (10);
37+
38+SET @@GLOBAL.innodb_log_checkpoint_now=TRUE;
39+SET @@GLOBAL.innodb_track_redo_log_now=TRUE;
40+
41+let $current_lsn = query_get_value(SHOW STATUS LIKE 'innodb_lsn_current', Value, 1);
42+
43+--replace_regex /[0-9]+/CURRENT_LSN/
44+eval PURGE CHANGED_PAGE_BITMAPS BEFORE $current_lsn;
45+
46+INSERT INTO t1 VALUES (20);
47+
48+SET @@GLOBAL.innodb_log_checkpoint_now=TRUE;
49+SET @@GLOBAL.innodb_track_redo_log_now=TRUE;
50+
51+DROP TABLE t1;
52
53=== modified file 'storage/innobase/log/log0online.c'
54--- storage/innobase/log/log0online.c 2014-07-18 13:54:05 +0000
55+++ storage/innobase/log/log0online.c 2014-10-17 06:10:41 +0000
56@@ -1817,7 +1817,7 @@
57 return TRUE;
58 }
59
60- if (srv_track_changed_pages && lsn >= log_bmp_sys->end_lsn) {
61+ if (srv_track_changed_pages && lsn > log_bmp_sys->end_lsn) {
62 /* If we have to delete the current output file, close it
63 first. */
64 os_file_close(log_bmp_sys->out.file);

Subscribers

People subscribed via source and target branches