[MDEV-2854] LP:731124 - Loss of precision on DISTINCT in 5.1-micro Created: 2011-03-08  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Philip Stoev (Inactive) Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug731124.xml    

 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 ;



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2011-10-28 ]

Launchpad bug id: 731124

Generated at Thu Feb 08 06:44:39 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.