summaryrefslogtreecommitdiff
path: root/storage/innobase/rem/rem0rec.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-09-20 22:34:20 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-09-20 22:38:37 +0300
commit47cd984a3ac4c4a5800879df77a89e1af575714f (patch)
tree11e5ba21e523cd8acffe7debbd51d0ce37ff87a9 /storage/innobase/rem/rem0rec.cc
parenta1e47974b7139c508c113821fb8dda13a3df062d (diff)
downloadmariadb-git-47cd984a3ac4c4a5800879df77a89e1af575714f.tar.gz
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.
Diffstat (limited to 'storage/innobase/rem/rem0rec.cc')
-rw-r--r--storage/innobase/rem/rem0rec.cc4
1 files changed, 3 insertions, 1 deletions
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)
{