[MDEV-437] Microseconds: In time functions precision is calculated modulo 256 Created: 2012-08-07  Updated: 2012-08-30  Resolved: 2012-08-30

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.25, 5.3.7
Fix Version/s: 5.5.27, 5.3.9

Type: Bug Priority: Trivial
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

SELECT NOW(257);
+-----------------------+
| NOW(257)              |
+-----------------------+
| 2012-08-07 04:07:25.8 |
+-----------------------+
1 row in set (0.01 sec)

Works the same way in MySQL 5.6. It seems harmless, just somewhat embarrassing, so unless it's a cool feature, maybe it makes sense to fix it some day.

With columns it's different though:

CREATE TABLE t (a DATETIME(257));
ERROR 1426 (42000): Too big precision 257 specified for 'a'. Maximum is 6.


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