diff options
author | ramil@mysql.com <> | 2005-11-22 18:29:46 +0400 |
---|---|---|
committer | ramil@mysql.com <> | 2005-11-22 18:29:46 +0400 |
commit | ca345dede4a001abb2ec06aa5feec34bed38f0e6 (patch) | |
tree | 636836023b7746f26e84336aa50f7cb2d83ab664 /sql | |
parent | 84bc725fb90119f4768d6d9516ca9d0e140896b6 (diff) | |
download | mariadb-git-ca345dede4a001abb2ec06aa5feec34bed38f0e6.tar.gz |
Fix for bug #10966: Variance functions return wrong data type.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_sum.cc | 3 | ||||
-rw-r--r-- | sql/item_sum.h | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index b2eaf39d624..027655e5cc7 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1030,9 +1030,6 @@ Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table, sizeof(double)*2) + sizeof(longlong), 0, name, table, &my_charset_bin); } - if (hybrid_type == DECIMAL_RESULT) - return new Field_new_decimal(max_length, maybe_null, name, table, - decimals, unsigned_flag); return new Field_double(max_length, maybe_null,name,table,decimals); } diff --git a/sql/item_sum.h b/sql/item_sum.h index 87cc248e5e4..7340dc78c66 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -481,7 +481,7 @@ public: { return sample ? "var_samp(" : "variance("; } Item *copy_or_same(THD* thd); Field *create_tmp_field(bool group, TABLE *table, uint convert_blob_length); - enum Item_result result_type () const { return hybrid_type; } + enum Item_result result_type () const { return REAL_RESULT; } }; class Item_sum_std; |