Commit 05da63f0 authored by Marko Mäkelä's avatar Marko Mäkelä

Correct debug assertions

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.
parent 02de2385
......@@ -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
......@@ -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);
......
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