Bug #115121 different precision in MySQL5.7.42andMySQL8.3.0
Submitted: 25 May 9:09 Modified: 27 May 9:40
Reporter: Ecee no Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.3.0 OS:Any
Assigned to: CPU Architecture:Any

[25 May 9:09] Ecee no
Description:
Time rounding may be different in Insert and Select. Even different between a query、subquery 、view. 
Could you respond to that? Why are the results different? Is this expected behavior or a bug?
Thanks.

How to repeat:
1. reuslt is 00:00:00.00002
select maketime(2.4/time '08:30:23.01',2.4/time '08:30:23.01',2.4/time '08:30:23.01') f14;

2. reuslt is 00:00:00.00003
select * from (select maketime(2.4/time '08:30:23.01',2.4/time '08:30:23.01',2.4/time '08:30:23.01')) f14;

drop view if exists v1;
CREATE OR REPLACE VIEW v1 as select maketime(2.4/time '08:30:23.01',2.4/time '08:30:23.01',2.4/time '08:30:23.01') f14;
select * from v1;

drop table if exists t1;
CREATE table t1(f14 time(6)) as select maketime(2.4/time '08:30:23.01',2.4/time '08:30:23.01',2.4/time '08:30:23.01') f14;
select * from t1;
[27 May 9:40] MySQL Verification Team
Hi Mr. no,

Thank you for your bug report.

We have managed to repeat it with mysql 8.4.0.

However, it is not a bug.

It is not a bug, because floating point arithmetics is involved in the test case and it is, by definition, very prone to the rounding errors.

Not a bug.