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
=== modified file 'Percona-Server/storage/innobase/dict/dict0stats.cc'
--- Percona-Server/storage/innobase/dict/dict0stats.cc 2013-01-18 04:53:12 +0000
+++ Percona-Server/storage/innobase/dict/dict0stats.cc 2013-03-14 05:45:26 +0000
@@ -1808,6 +1808,14 @@
18081808
1809 root_level = btr_height_get(index, &mtr);1809 root_level = btr_height_get(index, &mtr);
18101810
1811 if (root_level == -1 && srv_pass_corrupt_table) {
1812 fprintf(stderr, " InnoDB: Index %s likely corrupted (found in "
1813 "%s)\n",
1814 index->name, __func__);
1815 mtr_commit(&mtr);
1816 return;
1817 }
1818
1811 n_uniq = dict_index_get_n_unique(index);1819 n_uniq = dict_index_get_n_unique(index);
18121820
1813 /* If the tree has just one level (and one page) or if the user1821 /* If the tree has just one level (and one page) or if the user
18141822
=== modified file 'Percona-Server/storage/innobase/include/btr0btr.ic'
--- Percona-Server/storage/innobase/include/btr0btr.ic 2013-03-05 12:46:43 +0000
+++ Percona-Server/storage/innobase/include/btr0btr.ic 2013-03-14 05:45:26 +0000
@@ -120,6 +120,9 @@
120120
121 ut_ad(page);121 ut_ad(page);
122122
123 if (srv_pass_corrupt_table && page == NULL)
124 return(-1);
125
123 level = mach_read_from_2(page + PAGE_HEADER + PAGE_LEVEL);126 level = mach_read_from_2(page + PAGE_HEADER + PAGE_LEVEL);
124127
125 ut_ad(level <= BTR_MAX_NODE_LEVEL);128 ut_ad(level <= BTR_MAX_NODE_LEVEL);

Subscribers

People subscribed via source and target branches