diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2006-12-22 09:29:28 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2006-12-22 09:29:28 +0400 |
commit | c872b005e2987ebc10db219c5ce8657441fe3533 (patch) | |
tree | ddd29b141c9a275f24f6361a13d2e0f413c8c5c5 /mysql-test/t/func_group.test | |
parent | 6cf0571a97b9d9381c650b96e039c0c0aba955a5 (diff) | |
download | mariadb-git-c872b005e2987ebc10db219c5ce8657441fe3533.tar.gz |
Fix for bug #21976: Unnecessary warning with count(decimal)
We use val_int() calls (followed by null_value check) to determine
nullness in some Item_sum_count' and Item_sum_count_distinct' methods,
as a side effect we get extra warnings raised in the val_int().
Fix: use is_null() instead.
mysql-test/r/func_group.result:
Fix for bug #21976: Unnecessary warning with count(decimal)
- test result.
mysql-test/t/func_group.test:
Fix for bug #21976: Unnecessary warning with count(decimal)
- test case.
sql/item.h:
Fix for bug #21976: Unnecessary warning with count(decimal)
- comment adjusted.
sql/item_sum.cc:
Fix for bug #21976: Unnecessary warning with count(decimal)
- use is_null() to determine nullness.
Diffstat (limited to 'mysql-test/t/func_group.test')
-rw-r--r-- | mysql-test/t/func_group.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 079d107fad8..a47fd028b92 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -700,3 +700,14 @@ create table t1 select stddev(0); show create table t1; drop table t1; +# +# Bug #21976: Unnecessary warning with count(decimal) +# + +create table t1 (a decimal(20)); +insert into t1 values (12345678901234567890); +select count(a) from t1; +select count(distinct a) from t1; +drop table t1; + +--echo End of 5.0 tests |