1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Martin Hansson
2010-06-24 15:21:23 +02:00
parent f4420a3b90
commit 2b734bbee9
5 changed files with 88 additions and 19 deletions

View File

@ -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. */