Incorrect timestamp null on alter table in MySQL

Note: please leave bug reports and feature requests on

Incorrect timestamp null on alter table in MySQL

Postby raqua » Tue Oct 06, 2015 12:06 pm

Column is defined in table as:
`LAST_UNSUCCESSFUL_LOGIN_TIME` timestamp NULL DEFAULT NULL

Generated alter table fails. It looks like this:
ALTER TABLE `USER` MODIFY COLUMN LAST_UNSUCCESSFUL_LOGIN_TIME timestamp COMMENT 'Timestamp of last unsuccessful login attempt';

but should be

ALTER TABLE `USER` MODIFY COLUMN LAST_UNSUCCESSFUL_LOGIN_TIME timestamp NULL COMMENT 'Timestamp of last unsuccessful login attempt';
raqua
 
Posts: 19
Joined: Mon Aug 24, 2015 9:10 am

Re: Incorrect timestamp null on alter table in MySQL

Postby Serge » Tue Oct 06, 2015 12:27 pm

This issue will be fixed in the next version.
Thanks for report.
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Incorrect timestamp null on alter table in MySQL

Postby raqua » Thu Oct 15, 2015 1:23 pm

This is probably related, so I am putting it here instead of separate post.

ALTER TABLE schema.table MODIFY COLUMN START_TIME timestamp NOT NULL DEFAULT 0000-00-00 00:00:00 COMMENT 'Campaign start';
Should be
ALTER TABLE schema.table MODIFY COLUMN START_TIME timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Campaign start';

Quotes are missing on default timestamp.
raqua
 
Posts: 19
Joined: Mon Aug 24, 2015 9:10 am

Re: Incorrect timestamp null on alter table in MySQL

Postby Serge » Thu Oct 15, 2015 3:46 pm

This is also a bug. Will be fixed in the next version.
Thanks for report!
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Incorrect timestamp null on alter table in MySQL

Postby raqua » Fri Oct 16, 2015 10:55 am

Found another one:

ALTER TABLE schema.table MODIFY COLUMN AGE_CHECKED tinyint COMMENT '....';

should be:

ALTER TABLE schema.table MODIFY COLUMN AGE_CHECKED tinyint(1) COMMENT '....';
raqua
 
Posts: 19
Joined: Mon Aug 24, 2015 9:10 am

Re: Incorrect timestamp null on alter table in MySQL

Postby Serge » Fri Oct 16, 2015 2:25 pm

That's a different issue.
Currently DBeaver doesn't support MySQL numeric columns "display width" attributes. These attributes mostly used for plain-text output formatting. Maybe that's the main reason why they are not yet supported.

Actually I'm thinking about redesign of column type editor. Current one isn't flexible enough.
Anyhow I'll try to handle this problem somehow..
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb


Return to Support



Who is online

Users browsing this forum: No registered users and 25 guests