Bug #37059 Errors during "Forward Engineer Schema" for Inserts date for TIMESTAMP columns
Submitted: 29 May 2008 9:34 Modified: 8 Aug 2008 16:25
Reporter: Bernhard Wellhoefer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.22 OS:Windows (XP SP2)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any

[29 May 2008 9:34] Bernhard Wellhoefer
Description:
I have a simple table with author/user data and the table has on named 'lastLoginAt' column of type TIMESTAMP.

When I now add some Inserts data like '2008-05-05 12:34:56' and then try to run the "Forward Engineer Schema", I run into errors. Here an extraction of the advanced log:

INSERT INTO `author` (`idAuthor`, `login`, `password`, `first`, `last`, `email`, `lastLoginAt`) VALUES (1, 'bernd', 'bernd', 'Bernhard', 'Wellhöfer', 'bernhard.wellhoefer@gaia-group.com', 2008-05-05)
Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '23:59:00)' at line 1

INSERT INTO `author` (`idAuthor`, `login`, `password`, `first`, `last`, `email`, `lastLoginAt`) VALUES (2, 'hanik', 'hanik', 'Michael', 'Hanik', 'michael.hanik@gaia-group.com', 2008-05-01 23:59:00)
Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'stephan', 'Stephan', 'Jätzold', 'stephan@jaetzold.de', 2008-05-29 11:27:06);

How to repeat:
Create such a column, enter some Inserts data and try to fill the database.
[29 May 2008 10:04] Johannes Taxacher
As a workaround, you can either enter the values quoted or use a numerical style (like 20080505123456) then they are accepted in the insert-statement.
We don't auto-quote values in TIMESTAMP columns now because you can also use numerical values or keywords.
We consider improving that like its handeled now for i.e. varchar columns.
[7 Aug 2008 14:38] Johannes Taxacher
inserts-editor (as well as columns editors default column) now auto-quote datatype values correctly.
fix will be in 5.0.24.
[8 Aug 2008 16:25] Tony Bedford
An entry was added to the 5.0.24 changelog:

Errors were generated in SQL code during Forward Engineer Schema for Inserts data in TIMESTAMP columns.