diff options
author | unknown <bell@sanja.is.com.ua> | 2004-12-07 09:07:37 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-12-07 09:07:37 +0200 |
commit | b9d9c31430637906a9f053e8286cf6e661ae9adb (patch) | |
tree | 24b6477125edcd735f83e296143509ac2e5a751c /sql/item_sum.h | |
parent | e1248f4fc392d20ff34084ee913df90815d15008 (diff) | |
parent | 9438c2ca766a176d9b03ebdba466bef37c6e1b40 (diff) | |
download | mariadb-git-b9d9c31430637906a9f053e8286cf6e661ae9adb.tar.gz |
merge
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index 521c595712b..e718c885d4a 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -402,18 +402,20 @@ class Item_sum_hybrid :public Item_sum enum_field_types hybrid_field_type; int cmp_sign; table_map used_table_cache; + bool was_values; // was checked at least some values (for max/min only) public: Item_sum_hybrid(Item *item_par,int sign) :Item_sum(item_par), sum(0.0), sum_int(0), hybrid_type(INT_RESULT), hybrid_field_type(FIELD_TYPE_LONGLONG), - cmp_sign(sign), used_table_cache(~(table_map) 0) + cmp_sign(sign), used_table_cache(~(table_map) 0), was_values(TRUE) { collation.set(&my_charset_bin); } Item_sum_hybrid(THD *thd, Item_sum_hybrid *item): Item_sum(thd, item), value(item->value), sum(item->sum), sum_int(item->sum_int), hybrid_type(item->hybrid_type), hybrid_field_type(item->hybrid_field_type),cmp_sign(item->cmp_sign), - used_table_cache(item->used_table_cache) + used_table_cache(item->used_table_cache), + was_values(TRUE) { collation.set(item->collation); } bool fix_fields(THD *, TABLE_LIST *, Item **); table_map used_tables() const { return used_table_cache; } @@ -433,6 +435,8 @@ class Item_sum_hybrid :public Item_sum void min_max_update_real_field(); void min_max_update_int_field(); void cleanup(); + bool any_value() { return was_values; } + void no_rows_in_result(); }; |