Merging into mysql-5.5-bugfixing.

This commit is contained in:
Mats Kindahl 2010-09-23 14:38:24 +02:00
commit 04b3b7c1a6
3 changed files with 24 additions and 2 deletions

View file

@ -1908,4 +1908,16 @@ group by PAY.id + 1;
mult v_net_with_discount v_total
1.0000 27.18 27.180000
DROP TABLE currencies, payments, sub_tasks;
#
# BUG#52171: distinct aggregates on unsigned decimal fields trigger assertions
#
CREATE TABLE t1 (a DECIMAL(4,4) UNSIGNED);
INSERT INTO t1 VALUES (0);
SELECT AVG(DISTINCT a) FROM t1;
AVG(DISTINCT a)
0.00000000
SELECT SUM(DISTINCT a) FROM t1;
SUM(DISTINCT a)
0.0000
DROP TABLE t1;
End of 5.1 tests

View file

@ -1509,5 +1509,14 @@ group by PAY.id + 1;
DROP TABLE currencies, payments, sub_tasks;
--echo #
--echo # BUG#52171: distinct aggregates on unsigned decimal fields trigger assertions
--echo #
CREATE TABLE t1 (a DECIMAL(4,4) UNSIGNED);
INSERT INTO t1 VALUES (0);
SELECT AVG(DISTINCT a) FROM t1;
SELECT SUM(DISTINCT a) FROM t1;
DROP TABLE t1;
--echo End of 5.1 tests