commit 9349d297bda91c7c0e78db46d09450ae10532ba2
breaks datatypes for MAX()/MIN()/etc.. queries.
MAX(), MIN() should return the same datatype as the field. Think of datetime, varchar, etc.
All datatypes with a order relation can be used with a MIN()/MAX().
CREATE TABLE test (
field DATE DEFAULT NULL
);
INSERT INTO test (field) VALUES ('2012-04-01'), ('2013-05-12');
SELECT MIN(field), MAX(field) FROM test;
Even with SUM() and numeric fields, the behavior is a little bit unexpected:
CREATE TABLE test2 (
field DOUBLE DEFAULT NULL
);
INSERT INTO test2 (field) VALUES (0.5), (0.25), (0.20), (0.05);
SELECT SUM(field) FROM test2;
I would expect the value 1.0 as float and not 1 as integer.
commit 9349d297bda91c7c0e78db46d09450ae10532ba2 breaks datatypes for MAX()/MIN()/etc.. queries.
MAX(), MIN() should return the same datatype as the field. Think of datetime, varchar, etc. All datatypes with a order relation can be used with a MIN()/MAX().
Even with SUM() and numeric fields, the behavior is a little bit unexpected:
I would expect the value 1.0 as float and not 1 as integer.