From 48192f963a3a85a5127da5cc5cf485f07d72bc9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 19 Sep 2017 19:20:11 +0300 Subject: Add the parameter bool leaf to rec_get_offsets() This should affect debug builds only. Debug builds will check that the status bits of ROW_FORMAT!=REDUNDANT records match the is_leaf parameter. The only observable change to non-debug should be the addition of the is_leaf parameter to the function rec_copy_prefix_to_dtuple(), and the removal of some calls to update the adaptive hash index (it is only built for the leaf pages). This change should have been made in MySQL 5.0.3, instead of introducing the status flags in the ROW_FORMAT=COMPACT record header. --- storage/innobase/include/page0cur.ic | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'storage/innobase/include/page0cur.ic') diff --git a/storage/innobase/include/page0cur.ic b/storage/innobase/include/page0cur.ic index 5eb1bc0cbc5..3e6d40cba4a 100644 --- a/storage/innobase/include/page0cur.ic +++ b/storage/innobase/include/page0cur.ic @@ -280,7 +280,9 @@ page_cur_tuple_insert( rec = rec_convert_dtuple_to_rec((byte*) mem_heap_alloc(*heap, size), index, tuple, n_ext); - *offsets = rec_get_offsets(rec, index, *offsets, ULINT_UNDEFINED, heap); + *offsets = rec_get_offsets(rec, index, *offsets, + page_is_leaf(cursor->block->frame), + ULINT_UNDEFINED, heap); if (buf_block_get_page_zip(cursor->block)) { rec = page_cur_insert_rec_zip( -- cgit v1.2.1