3309 Vasil Dimov 2010-11-08
Fix a bug when counting total_pages
dict_stats_analyze_index_level():
If the last record on the page is delete-marked then the code would
continue; the loop without reaching the place where total_pages is
incremented. Fix this bug.
Introduced in: vasil.dimov@stripped
Reported by: Michael (inside rb://373)
modified:
storage/innobase/dict/dict0stats.c
3308 Vasil Dimov 2010-11-08 [merge]
Merge mysql-trunk-innodb -> mysql-next-mr-innodb (empty)
=== modified file 'storage/innobase/dict/dict0stats.c'
--- a/storage/innobase/dict/dict0stats.c revid:vasil.dimov@stripped
+++ b/storage/innobase/dict/dict0stats.c revid:vasil.dimov@stripped
@@ -464,6 +464,13 @@ dict_stats_analyze_index_level(
rec = btr_pcur_get_rec(&pcur);
+ /* increment the pages counter at the end of each page */
+ if (page_rec_is_supremum(page_rec_get_next(rec))) {
+
+ (*total_pages)++;
+ }
+
+ /* skip delete-marked records */
if (rec_get_deleted_flag(rec, page_is_comp(
btr_pcur_get_page(&pcur)))) {
@@ -535,10 +542,6 @@ dict_stats_analyze_index_level(
if (page_rec_is_supremum(page_rec_get_next(rec))) {
/* end of a page has been reached */
- /* increment the pages counter at the end of
- each page */
- (*total_pages)++;
-
/* we need to copy the record instead of assigning
like prev_rec = rec; because when we traverse the
records on this level at some point we will jump from
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-next-mr-innodb branch (vasil.dimov:3308 to 3309) | vasil.dimov | 8 Nov |