diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-02-15 18:08:08 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-02-15 18:08:08 +0100 |
commit | 25609313ffbd9205e921d0793cf423f711d10ced (patch) | |
tree | f04a1c26fabcc5463aca51a860f03131e02d94f7 /sql/item_sum.cc | |
parent | 47a54a2e087a7c1fc861bcbc114c14987f492cfe (diff) | |
parent | 764eeeee74f999fe2107fc362236563be0025093 (diff) | |
download | mariadb-git-25609313ffbd9205e921d0793cf423f711d10ced.tar.gz |
5.3.4 merge
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 6e115854f17..afe4f34bd05 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1129,13 +1129,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); |