Page 1 of 1

MySQL 5.5.25 and Update (not compatible with TIMESTAMP(x))

Posted: Thu 16. Aug 2012, 17:01
by Earl of Mar
Hello,

I´m trying to upgrade from 1.1 to 1.5, getting errors during execution of 27-08-2004 to 1.2.7-DEV.sql script:
"ERROR: 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 '(14) NOT NULL,
`group_trash` int(1) NOT NULL default '0',
`group_active` int' at line 6 -> CREATE TABLE `phpwcms_usergroup` ..."

The same if I am pasting the SQL code directly to PHPmyAdmin:
"#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 '(14) NOT NULL, `group_trash` int(1) NOT NULL default '0', `group_active` i' at line 6..."

What I found is that "timestamp(14)" is causing the errors (i.e.`group_timestamp` timestamp(14) NOT NULL,). It runs fine without the "(14)": i.e.`group_timestamp` timestamp NOT NULL). Does MySQL 5.5 not support timestamp(x)?

I´m upgrading to phpwcms 1.5 because the old version will not run with PHP 5.3...

Please help!

Markus

Re: MySQL 5.5.25 and Update (not compatible with TIMESTAMP(x

Posted: Thu 16. Aug 2012, 20:32
by Earl of Mar
OK, this TIMESTAMP(14) seems to be used only in update 07 (27-08-2004...) which I edited.

Re: MySQL 5.5.25 and Update (not compatible with TIMESTAMP(x

Posted: Fri 17. Aug 2012, 07:25
by flip-flop
Hi,

yes, timestamp(N) is incompatible with MySql 5.5 ->
http://dev.mysql.com/doc/refman/5.5/en/ ... eries.html
Incompatible change: In very old versions of MySQL (prior to 4.1), the TIMESTAMP data type supported a display width, which was silently ignored beginning with MySQL 4.1. This is deprecated in MySQL 5.1, and removed altogether in MySQL 5.5. These changes in behavior can lead to two problem scenarios when trying to use TIMESTAMP(N) columns with a MySQL 5.5 or later server:
Serch for timestamp on this page.

Knut

Re: MySQL 5.5.25 and Update (not compatible with TIMESTAMP(x

Posted: Sun 19. Aug 2012, 01:07
by Oliver Georgi
solved, next time use issues…