Quantcast

MySQL 5.5.11 and TIMESTAMP

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

MySQL 5.5.11 and TIMESTAMP

Jeffery Painter

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: [hidden email]
For additional commands, e-mail: [hidden email]

tv
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MySQL 5.5.11 and TIMESTAMP

tv
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MySQL 5.5.11 and TIMESTAMP

Jeffery Painter

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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...