summaryrefslogtreecommitdiff
path: root/sql/opt_range.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-08-07 18:06:56 +0200
committerSergei Golubchik <sergii@pisem.net>2014-08-07 18:06:56 +0200
commit6fb17a06016506498f4de75ff754f500f9f674f1 (patch)
treed03c86959f150edc0f6f27ca2c06ccbc0e6e5bf0 /sql/opt_range.h
parent2023fac28130d7d3f7d6776332239c62c3890195 (diff)
parenta4ab2431a20f6e2198d980f8e84fa7118515ca3b (diff)
downloadmariadb-git-6fb17a06016506498f4de75ff754f500f9f674f1.tar.gz
5.5.39 merge
Diffstat (limited to 'sql/opt_range.h')
-rw-r--r--sql/opt_range.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/opt_range.h b/sql/opt_range.h
index 1ca245ea420..54b15826d1b 100644
--- a/sql/opt_range.h
+++ b/sql/opt_range.h
@@ -389,6 +389,13 @@ public:
Returns a QUICK_SELECT with reverse order of to the index.
*/
virtual QUICK_SELECT_I *make_reverse(uint used_key_parts_arg) { return NULL; }
+
+ /*
+ Add the key columns used by the quick select into table's read set.
+
+ This is used by an optimization in filesort.
+ */
+ virtual void add_used_key_part_to_set(MY_BITMAP *col_set)=0;
};
@@ -479,6 +486,9 @@ public:
#endif
virtual void replace_handler(handler *new_file) { file= new_file; }
QUICK_SELECT_I *make_reverse(uint used_key_parts_arg);
+
+ virtual void add_used_key_part_to_set(MY_BITMAP *col_set);
+
private:
/* Default copy ctor used by QUICK_SELECT_DESC */
friend class TRP_ROR_INTERSECT;
@@ -640,6 +650,8 @@ public:
virtual int read_keys_and_merge()= 0;
/* used to get rows collected in Unique */
READ_RECORD read_record;
+
+ virtual void add_used_key_part_to_set(MY_BITMAP *col_set);
};
@@ -714,6 +726,7 @@ public:
void add_keys_and_lengths(String *key_names, String *used_lengths);
Explain_quick_select *get_explain(MEM_ROOT *alloc);
bool is_keys_used(const MY_BITMAP *fields);
+ void add_used_key_part_to_set(MY_BITMAP *col_set);
#ifndef DBUG_OFF
void dbug_dump(int indent, bool verbose);
#endif
@@ -793,6 +806,7 @@ public:
void add_keys_and_lengths(String *key_names, String *used_lengths);
Explain_quick_select *get_explain(MEM_ROOT *alloc);
bool is_keys_used(const MY_BITMAP *fields);
+ void add_used_key_part_to_set(MY_BITMAP *col_set);
#ifndef DBUG_OFF
void dbug_dump(int indent, bool verbose);
#endif
@@ -935,6 +949,7 @@ public:
bool unique_key_range() { return false; }
int get_type() { return QS_TYPE_GROUP_MIN_MAX; }
void add_keys_and_lengths(String *key_names, String *used_lengths);
+ void add_used_key_part_to_set(MY_BITMAP *col_set);
#ifndef DBUG_OFF
void dbug_dump(int indent, bool verbose);
#endif