Merge lp:~laurynas-biveinis/percona-server/bug1032606 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: 461
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1032606
Merge into: lp:percona-server/5.1
Diff against target: 29 lines (+6/-3)
1 file modified
Percona-Server/storage/innodb_plugin/log/log0online.c (+6/-3)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1032606
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+118084@code.launchpad.net

Description of the change

Fix bug 1032606 (wrong MODIFIED_PAGE_1ST_PAGE_ID value for page ids >
32448):

The MODIFIED_PAGE_1ST_PAGE_ID field is initialized in log_online_set_page_bit() by

 block_start_page = page_no / (8 * MODIFIED_PAGE_BLOCK_BITMAP_LEN)
  * MODIFIED_PAGE_BLOCK_BITMAP_LEN;

which incorrectly multiplies by MODIFIED_PAGE_BLOCK_BITMAP_LEN instead of MODIFIED_PAGE_BLOCK_BITMAP_LEN * 8.

This breaks bitmap-based inc backups for high page ids.

Fixed by introducing new enum constant MODIFIED_PAGE_BLOCK_ID_COUNT
for bitmap data length in ids and using it here.

Issue #16274

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

Jenkins run will be at http://jenkins.percona.com/job/percona-server-5.1-param/361/

Since this code path is only used in a single MTR test, I tested it locally.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
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
1=== modified file 'Percona-Server/storage/innodb_plugin/log/log0online.c'
2--- Percona-Server/storage/innodb_plugin/log/log0online.c 2012-06-14 09:16:03 +0000
3+++ Percona-Server/storage/innodb_plugin/log/log0online.c 2012-08-03 13:03:20 +0000
4@@ -113,10 +113,13 @@
5 /* The checksum of the current block */
6 };
7
8-/** Length of the bitmap data in a block */
9+/** Length of the bitmap data in a block in bytes */
10 enum { MODIFIED_PAGE_BLOCK_BITMAP_LEN
11 = MODIFIED_PAGE_BLOCK_UNUSED_2 - MODIFIED_PAGE_BLOCK_BITMAP };
12
13+/** Length of the bitmap data in a block in page ids */
14+enum { MODIFIED_PAGE_BLOCK_ID_COUNT = MODIFIED_PAGE_BLOCK_BITMAP_LEN * 8 };
15+
16 /****************************************************************//**
17 Provide a comparisson function for the RB-tree tree (space,
18 block_start_page) pairs. Actual implementation does not matter as
19@@ -166,8 +169,8 @@
20 ut_a(space != ULINT_UNDEFINED);
21 ut_a(page_no != ULINT_UNDEFINED);
22
23- block_start_page = page_no / (8 * MODIFIED_PAGE_BLOCK_BITMAP_LEN)
24- * MODIFIED_PAGE_BLOCK_BITMAP_LEN;
25+ block_start_page = page_no / MODIFIED_PAGE_BLOCK_ID_COUNT
26+ * MODIFIED_PAGE_BLOCK_ID_COUNT;
27 block_pos = block_start_page ? (page_no % block_start_page / 8)
28 : (page_no / 8);
29 bit_pos = page_no % 8;

Subscribers

People subscribed via source and target branches