Merge lp:~stewart/percona-server/5.6-corrupt-table-action into lp:percona-server/5.6

Proposed by Stewart Smith
Status: Work in progress
Proposed branch: lp:~stewart/percona-server/5.6-corrupt-table-action
Merge into: lp:percona-server/5.6
Diff against target: 32 lines (+11/-0)
2 files modified
Percona-Server/storage/innobase/dict/dict0stats.cc (+8/-0)
Percona-Server/storage/innobase/include/btr0btr.ic (+3/-0)
To merge this branch: bzr merge lp:~stewart/percona-server/5.6-corrupt-table-action
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Needs Fixing
George Ormond Lorch III (community) g2 Approve
Review via email: mp+153285@code.launchpad.net

Description of the change

This is just a post-review bug fix, based on one comment by George.

To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) :
review: Approve (g2)
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Any new 5.6 srv_pass_corrupt_table checks must follow the 5.5 bug 1125248 idiom.

review: Needs Fixing

Unmerged revisions

312. By Stewart Smith

post-review fix for corrupt_table_action: btr_height_get call chain could end up in an error condition that wasn't handled. Let's handle it somewhat properly so we don't die in an assert/segv.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/storage/innobase/dict/dict0stats.cc'
2--- Percona-Server/storage/innobase/dict/dict0stats.cc 2013-01-18 04:53:12 +0000
3+++ Percona-Server/storage/innobase/dict/dict0stats.cc 2013-03-14 05:45:26 +0000
4@@ -1808,6 +1808,14 @@
5
6 root_level = btr_height_get(index, &mtr);
7
8+ if (root_level == -1 && srv_pass_corrupt_table) {
9+ fprintf(stderr, " InnoDB: Index %s likely corrupted (found in "
10+ "%s)\n",
11+ index->name, __func__);
12+ mtr_commit(&mtr);
13+ return;
14+ }
15+
16 n_uniq = dict_index_get_n_unique(index);
17
18 /* If the tree has just one level (and one page) or if the user
19
20=== modified file 'Percona-Server/storage/innobase/include/btr0btr.ic'
21--- Percona-Server/storage/innobase/include/btr0btr.ic 2013-03-05 12:46:43 +0000
22+++ Percona-Server/storage/innobase/include/btr0btr.ic 2013-03-14 05:45:26 +0000
23@@ -120,6 +120,9 @@
24
25 ut_ad(page);
26
27+ if (srv_pass_corrupt_table && page == NULL)
28+ return(-1);
29+
30 level = mach_read_from_2(page + PAGE_HEADER + PAGE_LEVEL);
31
32 ut_ad(level <= BTR_MAX_NODE_LEVEL);

Subscribers

People subscribed via source and target branches