Commit 959ff093 authored by Marko Mäkelä's avatar Marko Mäkelä

rec_init_offsets_comp_ordinary(): Fix a bug

parent 8b5a84b4
......@@ -280,6 +280,7 @@ page_cur_tuple_insert(
*offsets = rec_get_offsets(rec, index, *offsets,
page_is_leaf(cursor->block->frame),
ULINT_UNDEFINED, heap);
ut_ad(size == rec_offs_size(*offsets));
if (buf_block_get_page_zip(cursor->block)) {
rec = page_cur_insert_rec_zip(
......
......@@ -348,9 +348,7 @@ rec_init_offsets_comp_ordinary(
ut_ad(index->is_instant());
/* fall through */
case REC_LEAF_TEMP_INSTANT:
n_fields = n_core + rec_get_n_add_field(nulls)
+ (!index->table->instant
|| rec_is_metadata(rec, index));
n_fields = n_core + rec_get_n_add_field(nulls) + 1;
ut_ad(n_fields <= index->n_fields);
const ulint n_nullable = index->get_n_nullable(n_fields);
const ulint n_null_bytes = UT_BITS_IN_BYTES(n_nullable);
......
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