summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.cc
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2016-03-16 01:26:39 +0300
committerSergei Petrunia <psergey@askmonty.org>2016-03-16 01:26:39 +0300
commit833304313d65f426323b10016616c3a6d951804b (patch)
tree474c8216cc46d33ff16f0c6a0aa12535191570ad /sql/item_windowfunc.cc
parent21a0291c1de5553dbfc06447b8b81d3756adb843 (diff)
downloadmariadb-git-833304313d65f426323b10016616c3a6d951804b.tar.gz
Continuation of "Implemented a counter within Item_sum_sum" a few commits before
Query result had 0 where it should have had NULLs: - Make Item_window_func::val* functions honor NULL-handling conventions: 1. set null_value to indicate whether we've returned a NULL value 2. val_str and val_decimal should return NULL pointer when they're returning SQL NULL value. Fix assertion failure when sending results to network. - The assert was due to window func returing SQL NULL despite having maybe_null=false - Fixed by settting Item_window_func::maybe_null correctly in fix_fields
Diffstat (limited to 'sql/item_windowfunc.cc')
-rw-r--r--sql/item_windowfunc.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc
index 82e84ab5c36..027b0bdf0a1 100644
--- a/sql/item_windowfunc.cc
+++ b/sql/item_windowfunc.cc
@@ -59,6 +59,7 @@ Item_window_func::fix_fields(THD *thd, Item **ref)
fix_length_and_dec();
max_length= window_func->max_length;
+ maybe_null= window_func->maybe_null;
fixed= 1;
force_return_blank= true;