diff options
author | Alexander Barkov <bar@mariadb.org> | 2015-03-12 18:12:15 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2015-03-12 18:12:15 +0400 |
commit | bb3115b256113097bcfd0d80213e160339e4b00b (patch) | |
tree | 2130426378c4762344bda6aad5f8e5d16d6cf770 /sql/item_cmpfunc.h | |
parent | 129c82bb5916d05ece4efad55e8dede3005559b4 (diff) | |
download | mariadb-git-bb3115b256113097bcfd0d80213e160339e4b00b.tar.gz |
MDEV-6990 GROUP_MIN_MAX optimization is not applied in some cases when it could
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 685e9105aa3..7aaef893415 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -131,6 +131,11 @@ public: bool is_bool_type() { return true; } void fix_length_and_dec() { decimals=0; max_length=1; } uint decimal_precision() const { return 1; } + virtual bool can_optimize_group_min_max(Item_field *min_max_arg_item, + const Item *const_item) const + { + return false; + } }; @@ -419,6 +424,12 @@ public: { return (*arg != NULL); } + bool can_optimize_group_min_max(Item_field *min_max_arg_item, + const Item *const_item) const + { + return min_max_arg_item->field->can_optimize_group_min_max(this, + const_item); + } }; /** |