You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Jeffery Painter <pa...@kiasoft.com> on 2011/04/29 19:42:45 UTC

MySQL 5.5.11 and TIMESTAMP

Hello,

I was running maven torque:datasql task (maven version 1 plugin) and ran
into an issue with the generated SQL when inserting into a MySQL 5.5.11
(community edition) database on Windows platform.

The generated sql has statements that look like this:

CREATE TABLE TEST( ID INT NOT NULL, MODIFIED TIMESTAMP(0) )

However, TIMESTAMP(0) is not supported in the latest version of MySQL for
some reason... removing the (0) manually corrects the issue.

Can someone tell me where in the Torque generation steps it is adding the
(0)? I don't have anything like that in my app-schema.xml file.

In fact, this version of MySQL doesn't support any numeric value in the
form of (nn) after the timestamp definition.

http://dev.mysql.com/doc/refman/5.5/en/datetime.html

It does work under MySQL 5.1.x on Ubuntu 10.10.

Thanks for any help... I will try to find a MySQL 5.1.x installer for
Windows and test against that.

--
Jeffery Painter


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: MySQL 5.5.11 and TIMESTAMP

Posted by Jeffery Painter <pa...@kiasoft.com>.
Yes Thomas!

I will try to modify that and see if it works. Looks like the Turbine
skeleton code throws size="0" in the schema files automatically.

Thanks,

Jeffery


> Am 29.04.2011 19:42, schrieb Jeffery Painter:
>> Can someone tell me where in the Torque generation steps it is adding
>> the
>> (0)? I don't have anything like that in my app-schema.xml file.
>
> Could it be that in the schema definition of the "modified"-column there
> is a size-attribute? If so, try to remove that.
>
> Bye, Thomas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: MySQL 5.5.11 and TIMESTAMP

Posted by Thomas Vandahl <tv...@apache.org>.
Am 29.04.2011 19:42, schrieb Jeffery Painter:
> Can someone tell me where in the Torque generation steps it is adding the
> (0)? I don't have anything like that in my app-schema.xml file.

Could it be that in the schema definition of the "modified"-column there 
is a size-attribute? If so, try to remove that.

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org