Bug #59856 Clearing a DATETIME column's default value has no effect

Submitted: 31 Jan 2011 23:27 Modified: 1 Feb 2011 20:45
Reporter: Yvan Rodrigues Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.31 OS:Windows
Assigned to: CPU Architecture:Any
Tags: ALTER TABLE, DEFAULT

[31 Jan 2011 23:27] Yvan Rodrigues
Description:
The application does not acknowledge that changing a column's default value puts the table in a dirty state.

How to repeat:
- Right click a table | Alter table...
- Switch to Columns tab
- Change the default value for an existing column
- Click Apply

Message returned: No changes to object were detected.

If you make other changes that work, such as adding a column, only that change is acknowledged, not the change to default value.

Suggested fix:
Change in default value should put the object into a dirty state.
[1 Feb 2011 4:19] Valeriy Kravchuk
What version of server are you working with? 

On Mac OS X I see ALTER generated in such cases:

ALTER TABLE `test`.`t73` CHANGE COLUMN `col805` `col805` VARCHAR(51) CHARACTER SET 'utf8' NULL DEFAULT 'ddddd'  ;

Will check on Windows later.
[1 Feb 2011 15:59] Yvan Rodrigues
Can only reproduce by clearing default value of a DATETIME column
[1 Feb 2011 17:56] Valeriy Kravchuk
Still can not repeat on Mac OS X. After clearing default value ('2011-02-01 19:54:16') of the DATETIME column the following code was generated:

ALTER TABLE `test`.`t73` CHANGE COLUMN `col790` `col790` DATETIME NULL  ;
[1 Feb 2011 20:46] MySQL Verification Team
I couldn't repeat on Windows Vista too.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 4.955 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
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.