Skip to content

Commit

Permalink
Correct debug assertions
Browse files Browse the repository at this point in the history
Node pointer recors contain dict_index_get_n_unique_in_tree_nonleaf(index)+1
instead of index->n_uniq+1 fields.

rec_get_offsets_func(): Remove the incorrect assertion. Later in
the function there are assertion for checking the exact field count.
  • Loading branch information
dr-m committed Sep 21, 2017
1 parent 02de238 commit 05da63f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions storage/innobase/rem/rem0rec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,6 @@ rec_get_offsets_func(
infimum and supremum record based on the heap number. */
ut_d(const bool is_user_rec = rec_get_heap_no_old(rec)
>= PAGE_HEAP_NO_USER_LOW);
ut_ad(n <= ulint(index->n_fields + !leaf) || index->is_dummy
|| dict_index_is_ibuf(index));
/* The infimum and supremum records carry 1 field. */
ut_ad(is_user_rec || n == 1);
ut_ad(!is_user_rec || leaf || index->is_dummy
Expand Down Expand Up @@ -1569,7 +1567,8 @@ rec_copy_prefix_to_dtuple_func(
ulint* offsets = offsets_;
rec_offs_init(offsets_);

ut_ad(is_leaf || n_fields <= unsigned(index->n_uniq + 1));
ut_ad(is_leaf || n_fields
<= dict_index_get_n_unique_in_tree_nonleaf(index) + 1);

offsets = rec_get_offsets(rec, index, offsets, is_leaf,
n_fields, &heap);
Expand Down

0 comments on commit 05da63f

Please sign in to comment.