Bug #22883 Apply button in table editor is always enabled
Submitted: 2 Oct 2006 11:11 Modified: 18 Oct 2006 14:43
Reporter: Andreas Påhlsson (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.2.4rc OS:Linux (Linux)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any

[2 Oct 2006 11:11] Andreas Påhlsson
Description:
The Apply button in the table editor is always enabled, even if no changes has been made.

When the apply button is pressed and no changes have been made, MySQL Administrator makes up an 'ALTER TABLE'-statement with all the columns anyhow.

Example:
ALTER TABLE `database`.`mockup_table` MODIFY COLUMN `id` BIGINT(20) UNSIGNED NOT NULL DEFAULT NULL AUTO_INCREMENT,
 MODIFY COLUMN `other_id` BIGINT(20) UNSIGNED NOT NULL,
 MODIFY COLUMN `created` DATETIME  NOT NULL,
 MODIFY COLUMN `foregin_id` BIGINT(20) UNSIGNED NOT NULL;

How to repeat:
Start MySQL Administratior.
Select Catalogs in the right pane.
Select a schemata.
Select a table.
Press the Edit table button.
Press the Apply button.
Viola!

Suggested fix:
Disable the Apply button when no changes have been made.
[4 Oct 2006 12:28] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 1.2.4rc, and inform about the results.
[4 Oct 2006 13:38] Andreas Påhlsson
Checked and still there in 1.2.4rc.
[16 Oct 2006 17:21] MySQL Verification Team
Thank you for the bug report.
[18 Oct 2006 14:43] Vladimir Kolesnikov
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Button sensitivity was not touched. SQL diff code was fixed to generate proper (in this case - empty) diff SQL. So now when "apply changes" is presses with no actual changes, a dialog appears informing user that there's no changes to apply.