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
commite0a4b8387c0a0eb3d5d92b3d8bbd3db891a567fc (patch)
tree2021a4b16d7dd8402d35c567685bc77fcdd32115 /sql/opt_range.h
parent3f3714a34c4b82b3fed3e86b664a535fcee7abd9 (diff)
downloadmariadb-git-e0a4b8387c0a0eb3d5d92b3d8bbd3db891a567fc.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. */