[MDEV-4871] Temporal literals do not accept nanoseconds Created: 2013-08-09  Updated: 2013-08-22  Resolved: 2013-08-15

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

Type: Bug Priority: Blocker
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None


 Description   

MariaDB [test]> SELECT TIME'10:10:10.1234567';
ERROR 1525 (HY000): Incorrect TIME value: '10:10:10.1234567'
MariaDB [test]> SELECT TIMESTAMP'2001-01-01 10:10:10.1234567';
ERROR 1525 (HY000): Incorrect DATETIME value: '2001-01-01 10:10:10.1234567'

The expected result is to return a value with 6 fractional digits without errors.
A "truncated" warning (or a note) is probably not necessary,
because decimal numbers do not produce warnings/notes when precision is too high.

The problem is repeatable even when 0 nanoseconds present:

MariaDB [test]> SELECT TIME'10:10:10.1234560';
ERROR 1525 (HY000): Incorrect TIME value: '10:10:10.1234560'

This is a bug in MDEV-3838, should be fixed before the release.



 Comments   
Comment by Alexander Barkov [ 2013-08-15 ]

Fixed in 10.0.4

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