Bug #4491 timestamp(19) doesn't work
Submitted: 9 Jul 2004 20:02 Modified: 10 Aug 2004 2:15
Reporter: Bruce Bristol Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.20 OS:Linux (Linux)
Assigned to: Dmitry Lenev CPU Architecture:Any

[9 Jul 2004 20:02] Bruce Bristol
Description:
http://dev.mysql.com/doc/mysql/en/News-4.0.19.html

If length of a timestamp field is defined as 19, the timestamp will be displayed as "YYYY-MM-DD HH:MM:SS.
This is done to make it easier to use tables created in MySQL 4.1 to be used in MySQL 4.0. 

Doesn't appear to be working, though we would like to use it.

How to repeat:
mysql> create table bb (a char(1), ts timestamp(19));
Query OK, 0 rows affected (0.00 sec)

mysql> desc bb;
+-------+---------------+------+-----+---------+-------+
| Field | Type          | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+-------+
| a     | char(1)       | YES  |     | NULL    |       |
| ts    | timestamp(14) | YES  |     | NULL    |       |
+-------+---------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

mysql> insert into bb values ('a','2004-07-01 23:55:55');
Query OK, 1 row affected (0.00 sec)

mysql> select * from bb;
+------+----------------+
| a    | ts             |
+------+----------------+
| a    | 20040701235555 |
+------+----------------+
1 row in set (0.00 sec)

Suggested fix:
Please make it work as described or tell me what I'm doing wrong.

Thanks!
[9 Jul 2004 22:45] Dean Ellis
Verified against 4.0.21 (1.1902); thank you for the report!
[13 Jul 2004 15:13] Tim Bunce
The timestamp(19) behaviour is also NOT documented:

http://dev.mysql.com/doc/mysql/en/TIMESTAMP_pre-4.1.html
http://dev.mysql.com/doc/mysql/en/Date_and_time_type_overview.html
[10 Aug 2004 2:15] Dmitry Lenev
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

ChangeSet 1.1946 2004/08/06 12:15:40 dlenev@brandersnatch.localdomain
  Fix for bug #4491 "timestamp(19) doesn't work".
  We should allow 19 as length of newly created TIMESTAMP fields.