summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-02-01 15:48:02 -0800
committerIgor Babaev <igor@askmonty.org>2012-02-01 15:48:02 -0800
commit7b79d8a33f56d178c78209f910a0694807a63f8f (patch)
tree3d4a8131e8688c6599461bfce72bb87c718a53e4 /sql/item_sum.cc
parent7ed15e6e50aec65560d8988fc5713f1f489b6616 (diff)
parent81690cf326e09799ca77d9f7bc5601905b706548 (diff)
downloadmariadb-git-7b79d8a33f56d178c78209f910a0694807a63f8f.tar.gz
Merge 5.2->5.3 in preparation for the release of mariadb-5.3.4-rc.
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 183f8ccff10..60ec27863bd 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -582,13 +582,12 @@ Item_sum_num::fix_fields(THD *thd, Item **ref)
return TRUE;
decimals=0;
- maybe_null=0;
+ maybe_null= sum_func() != COUNT_FUNC;
for (uint i=0 ; i < arg_count ; i++)
{
if (args[i]->fix_fields(thd, args + i) || args[i]->check_cols(1))
return TRUE;
set_if_bigger(decimals, args[i]->decimals);
- maybe_null |= args[i]->maybe_null;
}
result_field=0;
max_length=float_length(decimals);