Bug #14973 Probelms with Manually Editing SQL
Submitted: 16 Nov 2005 9:38 Modified: 25 Nov 2005 11:44
Reporter: Martin King-Turner Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S3 (Non-critical)
Version:1.0.20rc OS:Windows (Win XP)
Assigned to: CPU Architecture:Any

[16 Nov 2005 9:38] Martin King-Turner
Description:
Using Ctrl-X to cut more than 1 line of text when manually editing SQL in the edit window displayed by the Advanced button in the "Manual Editing" step creates duplicate lines of text on the screen.

How to repeat:
Use the migration of the Northwind Access sample database as a test case.  Step through the migration process to "Manual Edit", change the filter to "Show All Objects", click on the Categories table and click the Advanced>> button.  You should then see the following in the Advanced window:

CREATE TABLE `NWind`.`Categories` (
  `CategoryID` INT(10) NOT NULL AUTO_INCREMENT,
  `CategoryName` VARCHAR(15) NULL,
  `Description` LONGTEXT NULL,
  `Picture` LONGBLOB NULL,
  PRIMARY KEY (`CategoryID`),
  UNIQUE INDEX `CategoryName` (`CategoryName`)
)
ENGINE = INNODB;

Now highlight a couple of lines with your mouse (e.g. the  2 lines `Description` LONGTEXT NULL,  `Picture` LONGBLOB NULL,) and press Ctrl-X to cut them.  You will now see the line PRIMARY KEY (`CategoryID`), displayed twice.

Suggested fix:
Remove the duplicate display.

It would also be nice to provide a few other text editing enhancements to this window, e.g.:-

- Right mouse click to activate a cut/copy/paste menu
- Pressing Enter to insert a blank line (rather than activate the Next button)
- If text changes are made and the user clicks on another item in the top window (e.g. another table or view) without first clicking on the "Apply Changes" button, a dialogue box could be displayed asking whether the previous text changes should be stored or discarded.  Right now, the changes are "silently" discarded which can be very annoying.
[20 Nov 2005 10:50] Valeriy Kravchuk
Thank you for a bug report. Verified just as described. 

I've used simple test schema on MySQL 5.0.15-nt and tried to migrate it to the same server (so, no need to use Access or any other database). I had selected a table, and then, in the "SQL Create Script of Selected Object" edit box highlighted 2 table columns and pressed Ctrl+X. The line immediately following them was displayed twice. 

In fact, if you switch to any other window and then back to Migration Toolkit, the "doubled" row dissappears. So, it may be just incorrect redraw of the editor content.
[20 Nov 2005 10:52] Valeriy Kravchuk
Thank you for a bug report. Verified just as described. 

I've used simple test schema on MySQL 5.0.15-nt and tried to migrate it to the same server (so, no need to use Access or any other database). I had selected a table, and then, in the "SQL Create Script of Selected Object" edit box highlighted 2 table columns and pressed Ctrl+X. The line immediately following them was displayed twice. 

In fact, if you switch to any other window and then back to Migration Toolkit, the "doubled" row dissappears. So, it may be just incorrect redraw of the editor content.
[25 Nov 2005 11:44] Michael G. Zinner
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 bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html