From b8b3716ae029f2c550e1ec0b1e50ac01aabf5dc5 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 26 Nov 2010 17:18:51 +0200 Subject: Patch from Sergey Petrunya: Fix post-merge failure in 5.1-merge - Let QUICK_RANGE_INTERSECT_SELECT not make assumption that HA_EXTRA_KEYREAD scans do not touch parts of table->record[0] that refer to fields that are not covered by the used index. This assumption is not true for XtraDB (e.g. grep row/row0sel.c for "init null bytes with default values as they might be"). --- sql/opt_range.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sql/opt_range.h') diff --git a/sql/opt_range.h b/sql/opt_range.h index f2a1cce29b5..1e3008d78aa 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -585,13 +585,21 @@ public: void dbug_dump(int indent, bool verbose); #endif int init_ror_merged_scan(bool reuse_handler); - bool push_quick_back(QUICK_RANGE_SELECT *quick_sel_range); + bool push_quick_back(MEM_ROOT *alloc, QUICK_RANGE_SELECT *quick_sel_range); + + class QUICK_SELECT_WITH_RECORD : public Sql_alloc + { + public: + QUICK_RANGE_SELECT *quick; + uchar *key_tuple; + ~QUICK_SELECT_WITH_RECORD() { delete quick; } + }; /* Range quick selects this intersection consists of, not including cpk_quick. */ - List quick_selects; + List quick_selects; /* Merged quick select that uses Clustered PK, if there is one. This quick -- cgit v1.2.1