[MDEV-22622] TIME_FORMAT microsecond parsing omitted Created: 2020-05-19  Updated: 2022-02-02  Resolved: 2022-02-02

Status: Closed
Project: MariaDB Server
Component/s: Data types, Temporal Types
Affects Version/s: 10.3.22, 10.4.13
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Alexander Barkov
Resolution: Not a Bug Votes: 0
Labels: upstream


 Description   

exactly same as https://bugs.mysql.com/bug.php?id=99621
given affects MySQL-5.6 this probably applies to all versions

part 1: Microseconds are unparsed.

SELECT TIME_FORMAT("0:1:38:096", "%H:%i:%s:%f")
-> "00:01:38:000000"

part 2: Without hour ("%H") and with "%f" TIME_FORMAT returns null

SELECT TIME_FORMAT("1:38:096", "%i:%s:%f")
-> NULL

https://dbfiddle.uk/?rdbms=mariadb_10.4&fiddle=3292799fc6f8674fb15f14c7b2b8eb47



 Comments   
Comment by Daniel Black [ 2022-02-02 ]

Not a bug per MySQL bug response.

part 1;

microsecond needs a . separator per https://mariadb.com/kb/en/time/ in parsing.

Generated at Thu Feb 08 09:16:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.