summaryrefslogtreecommitdiff
path: root/sql/group_by_handler.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-10-02 14:38:06 +0200
committerSergei Golubchik <serg@mariadb.org>2015-10-05 17:14:15 +0200
commitc93ac0a1c68ed73cc4a59a475a8d576122557001 (patch)
tree9e2e8007b6a861cfc11006a396256f79d25b81e1 /sql/group_by_handler.h
parent7ca8b4bbfa3fc1ac12bbfc20530426fa534b9142 (diff)
downloadmariadb-git-c93ac0a1c68ed73cc4a59a475a8d576122557001.tar.gz
cleanups and simplifications
Diffstat (limited to 'sql/group_by_handler.h')
-rw-r--r--sql/group_by_handler.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/sql/group_by_handler.h b/sql/group_by_handler.h
index 207e90e73c9..534acc27ee2 100644
--- a/sql/group_by_handler.h
+++ b/sql/group_by_handler.h
@@ -34,22 +34,13 @@ class group_by_handler
{
public:
THD *thd;
- List<Item> *fields;
- TABLE_LIST *table_list;
- ORDER *group_by, *order_by;
- Item *where, *having;
handlerton *ht;
/* Temporary table where all results should be stored in record[0] */
TABLE *table;
- group_by_handler(THD *thd_arg, List<Item> *fields_arg,
- TABLE_LIST *table_list_arg, ORDER *group_by_arg,
- ORDER *order_by_arg, Item *where_arg, Item *having_arg,
- handlerton *ht_arg)
- : thd(thd_arg), fields(fields_arg), table_list(table_list_arg),
- group_by(group_by_arg), order_by(order_by_arg), where(where_arg),
- having(having_arg), ht(ht_arg), table(0) {}
+ group_by_handler(THD *thd_arg, handlerton *ht_arg)
+ : thd(thd_arg), ht(ht_arg), table(0) {}
virtual ~group_by_handler() {}
/*
@@ -65,15 +56,17 @@ public:
This is becasue we can't revert back the old having and order_by elements.
*/
- virtual bool init(TABLE *temporary_table, Item *having_arg,
- ORDER *order_by_arg)
+ virtual bool init(Item *having_arg, ORDER *order_by_arg)
{
- table= temporary_table;
- having= having_arg;
- order_by= order_by_arg;
return 0;
}
+ bool ha_init(TABLE *temporary_table, Item *having_arg, ORDER *order_by_arg)
+ {
+ table= temporary_table;
+ return init(having_arg, order_by_arg);
+ }
+
/*
Bits of things the storage engine can do for this query.
Should be initialized on object creation.