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.


Question information

English Edit question
MariaDB Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alexander Barkov (abarkov) said :

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

Revision history for this message
Jorge Hernandez (jfha73) said :

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.


Revision history for this message
Alexander Barkov (abarkov) said :

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

Revision history for this message
Axel Schwenke (ahel) said :

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:

Revision history for this message
Axel Schwenke (ahel) said :

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.