Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
This fails in MySQL 5.1, MariaDB 5.1 and above:
drop table if exists t1;
CREATE TABLE t1(f1 DECIMAL(5,1) UNSIGNED);
INSERT INTO t1 VALUES (0.2),(0.1);
set sql_buffer_result=0;
SELECT 1 as 'one' FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE f1 = 0);
set sql_buffer_result=1;
SELECT 1 as 'one' FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE f1 = 0);
The second query return two rows, the first one only one row (which is correct).