summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-02-15 10:22:03 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-02-15 10:22:03 +0200
commitb006d2ead4640f0ab4e29687fd7d24988b1c98f1 (patch)
treea478984bcd7f4bb2e0fd0496eae77b871077a380 /sql/item_windowfunc.h
parentb782971c58b5656820429b8ef3fae5fd82f5a0f7 (diff)
parentdc09f8f29cb2b9fdce7d5d5a623fdc8dcf1814f9 (diff)
downloadmariadb-git-b006d2ead4640f0ab4e29687fd7d24988b1c98f1.tar.gz
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'sql/item_windowfunc.h')
-rw-r--r--sql/item_windowfunc.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h
index 0a0a02c86b1..cb85a2c06d1 100644
--- a/sql/item_windowfunc.h
+++ b/sql/item_windowfunc.h
@@ -319,6 +319,7 @@ class Item_sum_hybrid_simple : public Item_sum,
my_decimal *val_decimal(my_decimal *);
void reset_field();
String *val_str(String *);
+ bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
const Type_handler *type_handler() const
{ return Type_handler_hybrid_field_type::type_handler(); }
void update_field();
@@ -1265,6 +1266,29 @@ public:
return res;
}
+ bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ {
+ bool res;
+ if (force_return_blank)
+ {
+ null_value= true;
+ res= true;
+ }
+ else if (read_value_from_result_field)
+ {
+ if ((null_value= result_field->is_null()))
+ res= true;
+ else
+ res= result_field->get_date(ltime, fuzzydate);
+ }
+ else
+ {
+ res= window_func()->get_date(ltime, fuzzydate);
+ null_value= window_func()->null_value;
+ }
+ return res;
+ }
+
void split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array,
List<Item> &fields, uint flags);