From 47cd984a3ac4c4a5800879df77a89e1af575714f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 20 Sep 2017 22:34:20 +0300 Subject: Fix ut_ad(!leaf) failure in rec_get_offsets_func() with spatial index This fixes a regression that only affects debug builds, caused by commit 48192f963a3a85a5127da5cc5cf485f07d72bc9d which is necessary preparation for MDEV-11369 instant ADD COLUMN. (Although that is a 10.3 task, to ease merges between 10.2 and 10.3, this change that improves debug checks was pushed to 10.2 already.) Unlike btr_pcur_restore_position(), rtr_cur_restore_position() can create a search tuple out of a non-leaf page record. So, we must pass 'bool leaf' parameter to dict_index_build_data_tuple(). dict_index_build_data_tuple(): Add a debug-only parameter 'bool leaf'. rec_copy_prefix_to_dtuple(): Make the parameter debug-only. row_sel_get_clust_rec_for_mysql(): In the debug code for spatial index, remove an unnecessary call to buf_page_get_gen(), and use the already latched block directly. --- storage/innobase/rem/rem0rec.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'storage/innobase/rem/rem0rec.cc') diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc index 0e029b34821..d4d1a2bab14 100644 --- a/storage/innobase/rem/rem0rec.cc +++ b/storage/innobase/rem/rem0rec.cc @@ -1556,11 +1556,13 @@ The fields are copied into the memory heap. @param[in] n_fields number of fields to copy @param[in,out] heap memory heap */ void -rec_copy_prefix_to_dtuple( +rec_copy_prefix_to_dtuple_func( dtuple_t* tuple, const rec_t* rec, const dict_index_t* index, +#ifdef UNIV_DEBUG bool is_leaf, +#endif /* UNIV_DEBUG */ ulint n_fields, mem_heap_t* heap) { -- cgit v1.2.1