Commit a9f1c9f3 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 3db404c3
...@@ -2981,6 +2981,9 @@ btr_estimate_number_of_different_key_vals( ...@@ -2981,6 +2981,9 @@ btr_estimate_number_of_different_key_vals(
while (!page_rec_is_supremum(rec)) { while (!page_rec_is_supremum(rec)) {
rec_t* next_rec = page_rec_get_next(rec); rec_t* next_rec = page_rec_get_next(rec);
if (page_rec_is_supremum(next_rec)) { if (page_rec_is_supremum(next_rec)) {
total_external_size +=
btr_rec_get_externally_stored_len(
rec, offsets_rec);
break; break;
} }
...@@ -2988,7 +2991,8 @@ btr_estimate_number_of_different_key_vals( ...@@ -2988,7 +2991,8 @@ btr_estimate_number_of_different_key_vals(
matched_bytes = 0; matched_bytes = 0;
offsets_next_rec = rec_get_offsets(next_rec, index, offsets_next_rec = rec_get_offsets(next_rec, index,
offsets_next_rec, offsets_next_rec,
n_cols, &heap); ULINT_UNDEFINED,
&heap);
cmp_rec_rec_with_match(rec, next_rec, cmp_rec_rec_with_match(rec, next_rec,
offsets_rec, offsets_next_rec, offsets_rec, offsets_next_rec,
...@@ -3043,10 +3047,6 @@ btr_estimate_number_of_different_key_vals( ...@@ -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); 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 2011-01-27 The InnoDB Team
* include/trx0trx.h, trx/trx0trx.c: * include/trx0trx.h, trx/trx0trx.c:
...@@ -29,6 +35,7 @@ ...@@ -29,6 +35,7 @@
Fix Bug#59707 Unused compression-related parameters Fix Bug#59707 Unused compression-related parameters
in buffer pool functions in buffer pool functions
>>>>>>> MERGE-SOURCE
2011-01-18 The InnoDB Team 2011-01-18 The InnoDB Team
* include/sync0rw.h, sync/sync0arr.c, sync/sync0rw.c: * include/sync0rw.h, sync/sync0arr.c, sync/sync0rw.c:
......
...@@ -3365,6 +3365,9 @@ btr_estimate_number_of_different_key_vals( ...@@ -3365,6 +3365,9 @@ btr_estimate_number_of_different_key_vals(
while (!page_rec_is_supremum(rec)) { while (!page_rec_is_supremum(rec)) {
rec_t* next_rec = page_rec_get_next(rec); rec_t* next_rec = page_rec_get_next(rec);
if (page_rec_is_supremum(next_rec)) { if (page_rec_is_supremum(next_rec)) {
total_external_size +=
btr_rec_get_externally_stored_len(
rec, offsets_rec);
break; break;
} }
...@@ -3372,7 +3375,8 @@ btr_estimate_number_of_different_key_vals( ...@@ -3372,7 +3375,8 @@ btr_estimate_number_of_different_key_vals(
matched_bytes = 0; matched_bytes = 0;
offsets_next_rec = rec_get_offsets(next_rec, index, offsets_next_rec = rec_get_offsets(next_rec, index,
offsets_next_rec, offsets_next_rec,
n_cols, &heap); ULINT_UNDEFINED,
&heap);
cmp_rec_rec_with_match(rec, next_rec, cmp_rec_rec_with_match(rec, next_rec,
offsets_rec, offsets_next_rec, offsets_rec, offsets_next_rec,
...@@ -3427,10 +3431,6 @@ btr_estimate_number_of_different_key_vals( ...@@ -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); 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