diff options
author | Varun Gupta <varunraiko1803@gmail.com> | 2017-07-17 13:25:08 +0530 |
---|---|---|
committer | Varun Gupta <varunraiko1803@gmail.com> | 2017-11-01 23:13:01 +0530 |
commit | 330577988f23bcee35fb3956d35d9c51f410ea46 (patch) | |
tree | 825993b9700d12f8c0772f39eba0d6882d06222f /sql/item_sum.h | |
parent | 64a2a3029577e1539bcf029c73d616b40b657b1c (diff) | |
download | mariadb-git-330577988f23bcee35fb3956d35d9c51f410ea46.tar.gz |
has_error field added to the item_sum class. This field ensures that query is terminated
if we get any error during the add function call. This is currently used only for the
percentile functions
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index 467a77c8983..a3bcf397db7 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -367,6 +367,7 @@ public: int8 max_arg_level; /* max level of unbound column references */ int8 max_sum_func_level;/* max level of aggregation for embedded functions */ bool quick_group; /* If incremental update of fields */ + bool has_error; /* This list is used by the check for mixing non aggregated fields and sum functions in the ONLY_FULL_GROUP_BY_MODE. We save all outer fields @@ -388,19 +389,19 @@ protected: public: void mark_as_sum_func(); - Item_sum(THD *thd): Item_func_or_sum(thd), quick_group(1) + Item_sum(THD *thd): Item_func_or_sum(thd), quick_group(1), has_error(0) { mark_as_sum_func(); init_aggregator(); } Item_sum(THD *thd, Item *a): Item_func_or_sum(thd, a), quick_group(1), - orig_args(tmp_orig_args) + has_error(0), orig_args(tmp_orig_args) { mark_as_sum_func(); init_aggregator(); } Item_sum(THD *thd, Item *a, Item *b): Item_func_or_sum(thd, a, b), - quick_group(1), orig_args(tmp_orig_args) + quick_group(1), has_error(0), orig_args(tmp_orig_args) { mark_as_sum_func(); init_aggregator(); |