Error: Too big precision 14 specified for 'time'. Maximum is 6.

Asked by Jorge Hernandez on 2013-10-15

Hey guys,

How can I get that error fixed?

I am running MariaDB 5.5.33, I thought that issue was solved long ago but it just happened to me.

Thanks,

Question information

Language:
English Edit question
Status:
Answered
For:
MariaDB Edit question
Assignee:
No assignee Edit question
Last query:
2013-10-15
Last reply:
2013-10-16
Alexander Barkov (abarkov) said : #1

Can you please post the SQL query (or queries) that returned this error?
Thanks.

Jorge Hernandez (jfha73) said : #2

It happens when creating a new table that contains a field set like this:

time timestamp(14)

It works when it's set back to 6 instead of 14.

Thanks

Alexander Barkov (abarkov) said : #3

MariaDB supports up to 6 fractional digits in date/time data types.
There are no plans to support more digits.

Axel Schwenke (ahel) said : #4

For a field definition like TIMESTAMP(N) the meaning of the number N has changed when MariaDB (and later MySQL) introduced sub-second precision. This happened in MariaDB-5.3 and MySQL-5.6.

Older versions interpret N as display width, like for INT columns. Versions with high resolution timestamp interpret N as the number of fractional digits.

See also: https://mariadb.com/kb/en/microseconds-in-mariadb/

Axel Schwenke (ahel) said : #5

PS: the usage of a display width for a TIMESTAMP column has been poperly deprecated and yields

warning 1287
'TIMESTAMP(14)' is deprecated and will be removed in a future release. Please use 'TIMESTAMP' instead

in MariaDB-5.1 and MariaDB-5.2. Also mysqldump does not write a display width for TIMESTAMP columns any more. So if you have a CREATE TABLE statement with TIMESTAMP(14) it must be from a very old dump or otherwise a very old tool.

Can you help with this problem?

Provide an answer of your own, or ask Jorge Hernandez for more information if necessary.

To post a message you must log in.