Loss of precision on DISTINCT in 5.1-micro

Bug #731124 reported by Philip Stoev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Medium
Sergei Golubchik

Bug Description

DISTINCT causes loss of precision - the values returned are missing the sub-second part and are grouped together by the second.

This is alspo repeatable in mysql-5.1, but I think it should be fixed regardless so that increased precision is properly handled in all situations.

Test case:

CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1),(2),(3);
SELECT DISTINCT TIME( TIMESTAMPADD( MICROSECOND , f1 , '10:10:10' ) ) FROM t1 ;

SELECT TIME( TIMESTAMPADD( MICROSECOND , f1 , '10:10:10' ) ) FROM t1 ;

Related branches

Changed in maria:
milestone: none → 5.3
assignee: nobody → Sergei (sergii)
Changed in maria:
status: New → Fix Committed
importance: Undecided → Medium
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.