MySQL Forums
Forum List  »  Backup

current_timestamp problem (Error 1293)
Posted by: Aaron Yang
Date: May 07, 2015 02:20AM

while i dump a db as *.sql,
some code as following:
"
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` INT NOT NULL DEFAULT '',
`name` varchar(100) NOT NULL,
`createdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
`modifieddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
"
it will cause
"Error Code: 1293 -
Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" during import/restore.

but there are many create table code like above one in sql file.
so it's impossible to correct manually.
i don't know it is a bug or a mistake setting while i operating.
how could i avoid the error t-sql appear while dump OR how could i correct restore when the wrong code exists(not ignore them).

i use 5.5.40 version dump into 5.5.40 version.

Options: ReplyQuote


Subject
Views
Written By
Posted
current_timestamp problem (Error 1293)
7676
May 07, 2015 02:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.