From e6a4784762b844be889eeb6694307a6417240ac1 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Sun, 19 Dec 2010 13:56:12 +0300 Subject: BUG#670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join buffer Switch from "Disable identical key handling optimization when IndexConditionPushdown is used" approach To an approach where we save/restore index tuple and so can use index condition pushdown. --- sql/multi_range_read.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sql/multi_range_read.h') diff --git a/sql/multi_range_read.h b/sql/multi_range_read.h index 1851dc4912f..df6fc73ab52 100644 --- a/sql/multi_range_read.h +++ b/sql/multi_range_read.h @@ -271,7 +271,8 @@ public: mrr_funcs.skip_index_tuple(mrr_iter, range_info)); } - void set_temp_space(uchar *space); + bool set_temp_space(uint rowid_length, uint key_len, + uchar **space_start, uchar *space_end); void interrupt_read(); void resume_read(); void position(); @@ -291,12 +292,6 @@ private: /* TRUE <=> need range association, buffers hold {rowid, range_id} pairs */ bool is_mrr_assoc; - /* - TRUE <=> Don't do optimizations for identical key value (see comment in - Mrr_ordered_index_reader::init for details) - */ - bool disallow_identical_key_handling; - /* Range sequence iteration members */ RANGE_SEQ_IF mrr_funcs; range_seq_t mrr_iter; @@ -315,6 +310,8 @@ private: /* TRUE <=> saved_rowid has the last saved rowid */ bool have_saved_rowid; + uchar *saved_key_tuple; + static int compare_keys(void* arg, uchar* key1, uchar* key2); static int compare_keys_reverse(void* arg, uchar* key1, uchar* key2); -- cgit v1.2.1