[MDEV-4869] Wrong result of MAKETIME(0, 0, -0.1) Created: 2013-08-09  Updated: 2013-09-16  Resolved: 2013-09-16

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.3, 5.5.32, 5.3.12
Fix Version/s: 10.0.5, 5.5.33, 5.3.13

Type: Bug Priority: Minor
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Duplicate Votes: 0
Labels: None


 Description   

There is some inconsistency between
MAKETIME(0,0, negative_integer_number) and
MAKETIME(0,0, negative_decimal_number)

SELECT MAKETIME(0,0,-1), MAKETIME(0, 0, -0.1);
+------------------+----------------------+
| MAKETIME(0,0,-1) | MAKETIME(0, 0, -0.1) |
+------------------+----------------------+
| NULL             | 00:00:00             |
+------------------+----------------------+

The expression with the negative decimal number should also return NULL.

MySQL-5.5 exhibits the same behaviour.
MySQL-5.6 returns NULL for both expressions.



 Comments   
Comment by Alexander Barkov [ 2013-09-16 ]

The patch for "MDEV-4724 Some temporal functions do not preserve microseconds" fixed this issue as well.

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