Quantcast
Channel: Tigase.org - mysql
Viewing all articles
Browse latest Browse all 5

Timestamp issue with database/mysql-schema-4.sql in Tigase 5.1

$
0
0

Encountered error with Timestamp columns while creating a fresh MySQL installation for Tigase 5.1 and executing the database/mysql-schema-4.sql script.

ERROR 1293 (HY000) at line 39: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

Here is the incriminated extract :

-- Time the account has been created
acc_create_time timestamp DEFAULT CURRENT_TIMESTAMP,
-- Time of the last user login
last_login timestamp DEFAULT CURRENT_TIMESTAMP,
-- Time of the last user logout
last_logout timestamp DEFAULT CURRENT_TIMESTAMP,

It looks like mysql won't accept several columns with DEFAULT CURRENT_TIMESTAMP.

It went better with those modifications :

-- Time the account has been created
acc_create_time timestamp DEFAULT CURRENT_TIMESTAMP,
-- Time of the last user login
-- #fix attempt# last_login timestamp DEFAULT CURRENT_TIMESTAMP,
last_login timestamp DEFAULT '1970-01-01 01:01:01',
-- Time of the last user logout
-- #fix attempt# last_logout timestamp DEFAULT CURRENT_TIMESTAMP,
last_logout timestamp DEFAULT '1970-01-01 01:01:01',

Is this change acceptable ?


Viewing all articles
Browse latest Browse all 5

Trending Articles