Bug #67775 | Moving an existing column after a new one when altering a table causes wrong ord | ||
---|---|---|---|
Submitted: | 30 Nov 2012 22:15 | Modified: | 11 Feb 2013 18:11 |
Reporter: | Kostas Stroggylos | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Workbench: SQL Editor | Severity: | S3 (Non-critical) |
Version: | 5.2.44 | OS: | Windows (Microsoft Windows 7 Enterprise Edition Service Pack 1 (build 7601), 64-bit) |
Assigned to: | CPU Architecture: | Any | |
Tags: | WBBugReporter |
[30 Nov 2012 22:15]
Kostas Stroggylos
[11 Feb 2013 18:11]
Ruben Dario Morquecho Valdez
Could you please try new Workbench 5.2.46 version? Thank you for your interest in MySQL Workbench!
[11 Feb 2013 18:20]
Ruben Dario Morquecho Valdez
Could you please try new Workbench Version 5.2.46 . Thank you for your interest in MySQL Workbench!.
[12 Feb 2013 18:29]
Kostas Stroggylos
No, it still behaves in the same manner. For example, let's say I create a table named 'test' as follows: CREATE TABLE `test`.`test` ( `test_id` INT NOT NULL , `test_description` VARCHAR(50) NOT NULL , PRIMARY KEY (`test_id`) ); Then: - create a new column `test_name` VARCHAR(50) - drag column `test_description` after `test_name` - drag column `test_id` after `test_description` - click 'Apply' the statement generated is: ALTER TABLE `test`.`test` CHANGE COLUMN `test_description` `test_description` VARCHAR(50) NOT NULL AFTER `test_name` , ADD COLUMN `test_name` VARCHAR(50) NULL FIRST ; and when attempting to apply changes the following error is generated: ERROR 1054: Unknown column 'test_name' in 'test' SQL Statement: ALTER TABLE `test`.`test` CHANGE COLUMN `test_description` `test_description` VARCHAR(50) NOT NULL AFTER `test_name` , ADD COLUMN `test_name` VARCHAR(50) NULL FIRST ERROR: Error when running failback script. Details follow. ERROR 1050: Table 'test' already exists SQL Statement: CREATE TABLE `test` ( `test_id` int(11) NOT NULL, `test_description` varchar(50) NOT NULL, PRIMARY KEY (`test_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8