Commit 71e8043b authored by Jimmy Yang's avatar Jimmy Yang

Fix Bug #59465 btr_estimate_number_of_different_key_vals use incorrect offset

for external_size
      
rb://581 approved by Marko
parent 786ac62c
......@@ -2981,6 +2981,9 @@ btr_estimate_number_of_different_key_vals(
while (!page_rec_is_supremum(rec)) {
rec_t* next_rec = page_rec_get_next(rec);
if (page_rec_is_supremum(next_rec)) {
total_external_size +=
btr_rec_get_externally_stored_len(
rec, offsets_rec);
break;
}
......@@ -2988,7 +2991,8 @@ btr_estimate_number_of_different_key_vals(
matched_bytes = 0;
offsets_next_rec = rec_get_offsets(next_rec, index,
offsets_next_rec,
n_cols, &heap);
ULINT_UNDEFINED,
&heap);
cmp_rec_rec_with_match(rec, next_rec,
offsets_rec, offsets_next_rec,
......@@ -3043,10 +3047,6 @@ btr_estimate_number_of_different_key_vals(
}
}
offsets_rec = rec_get_offsets(rec, index, offsets_rec,
ULINT_UNDEFINED, &heap);
total_external_size += btr_rec_get_externally_stored_len(
rec, offsets_rec);
mtr_commit(&mtr);
}
......
2011-01-27 The InnoDB Team
* btr/btr0cur.c:
Bug#59465 btr_estimate_number_of_different_key_vals use
incorrect offset for external_size
2011-01-27 The InnoDB Team
* include/trx0trx.h, trx/trx0trx.c:
......@@ -29,6 +35,7 @@
Fix Bug#59707 Unused compression-related parameters
in buffer pool functions
>>>>>>> MERGE-SOURCE
2011-01-18 The InnoDB Team
* include/sync0rw.h, sync/sync0arr.c, sync/sync0rw.c:
......
......@@ -3365,6 +3365,9 @@ btr_estimate_number_of_different_key_vals(
while (!page_rec_is_supremum(rec)) {
rec_t* next_rec = page_rec_get_next(rec);
if (page_rec_is_supremum(next_rec)) {
total_external_size +=
btr_rec_get_externally_stored_len(
rec, offsets_rec);
break;
}
......@@ -3372,7 +3375,8 @@ btr_estimate_number_of_different_key_vals(
matched_bytes = 0;
offsets_next_rec = rec_get_offsets(next_rec, index,
offsets_next_rec,
n_cols, &heap);
ULINT_UNDEFINED,
&heap);
cmp_rec_rec_with_match(rec, next_rec,
offsets_rec, offsets_next_rec,
......@@ -3427,10 +3431,6 @@ btr_estimate_number_of_different_key_vals(
}
}
offsets_rec = rec_get_offsets(rec, index, offsets_rec,
ULINT_UNDEFINED, &heap);
total_external_size += btr_rec_get_externally_stored_len(
rec, offsets_rec);
mtr_commit(&mtr);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment