summaryrefslogtreecommitdiff
path: root/sql/opt_range.h
diff options
context:
space:
mode:
authorMartin Hansson <martin.hansson@sun.com>2010-06-24 15:21:23 +0200
committerMartin Hansson <martin.hansson@sun.com>2010-06-24 15:21:23 +0200
commit2b734bbee9aeb98a64a5b59808f56342819053a7 (patch)
tree2021a4b16d7dd8402d35c567685bc77fcdd32115 /sql/opt_range.h
parentf4420a3b90e57c68cc72606b4ecb240266260861 (diff)
downloadmariadb-git-2b734bbee9aeb98a64a5b59808f56342819053a7.tar.gz
Bug#41660: Sort-index_merge for non-first join table may
require O(#scans) memory When an index merge operation was restarted, it would re-allocate the Unique object controlling the duplicate row ID elimination. Fixed by making the Unique object a member of QUICK_INDEX_MERGE_SELECT and thus reusing it throughout the lifetime of this object.
Diffstat (limited to 'sql/opt_range.h')
-rw-r--r--sql/opt_range.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_range.h b/sql/opt_range.h
index e7d8297faf8..edae1e4114a 100644
--- a/sql/opt_range.h
+++ b/sql/opt_range.h
@@ -500,6 +500,7 @@ public:
class QUICK_INDEX_MERGE_SELECT : public QUICK_SELECT_I
{
+ Unique *unique;
public:
QUICK_INDEX_MERGE_SELECT(THD *thd, TABLE *table);
~QUICK_INDEX_MERGE_SELECT();
@@ -684,7 +685,7 @@ private:
class QUICK_GROUP_MIN_MAX_SELECT : public QUICK_SELECT_I
{
private:
- handler *file; /* The handler used to get data. */
+ handler * const file; /* The handler used to get data. */
JOIN *join; /* Descriptor of the current query */
KEY *index_info; /* The index chosen for data access */
uchar *record; /* Buffer where the next record is returned. */