Bug #86577 Table data import wizard check boxes do not apply when creating table
Submitted: 4 Jun 2017 11:25 Modified: 21 Mar 2018 0:28
Reporter: Lee Butler Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.3.9 OS:Windows (10)
Assigned to: CPU Architecture:Any
Tags: Import Wizard, workbench

[4 Jun 2017 11:25] Lee Butler
Description:
The table data import wizard (in table create mode) still creates columns in a table even if the checkbox for the column has been unchecked. It then leaves the column filled with null values. See how to and screenshots easy reproduction.

This behaviour is particularly troublesome if you have a sheet to import with 2 columns with the same name, as the import will fail because it creates the table with duplicate names and fails. 

How to repeat:
Create a dataset wiuth a few columns to import through the wizard

After selected the file, use the create new table option.

When you get to the screen in the first screenshot below, uncheck one (or more if you like) of the columns, and continue the wizard until the end.

Now you've created the wizard, select the table you created and show yourself the data.

Oh noes! The column(s) you selected were still created but are now full of NULL data (see screenshot 2).

Suggested fix:
When preparing the CREATE TABLE statement, check the state of the checkboxes and see if the user actually wants to create that column.
[4 Jun 2017 11:25] Lee Butler
Screenshot 1, check box is unchecked

Attachment: workbench testunchecked.PNG (image/png, text), 19.08 KiB.

[4 Jun 2017 11:26] Lee Butler
Screenshot 2, Unchecked checkbox column got created anyway.

Attachment: workbench test columnexists.PNG (image/png, text), 13.49 KiB.

[5 Jun 2017 7:08] Chiranjeevi Battula
Hello  Lee Butler,

Thank you for the bug report.
Verified this behavior on MySQL Workbench in 6.3.9 version

Thanks,
Chiranjeevi.
[5 Jun 2017 7:08] Chiranjeevi Battula
Screenshot

Attachment: Bug_86577.JPG (image/jpeg, text), 52.19 KiB.

[5 Jun 2017 7:08] Chiranjeevi Battula
Screenshot

Attachment: Bug_86577_1.JPG (image/jpeg, text), 42.76 KiB.

[21 Mar 2018 0:28] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 8.0.11 release, and here's the changelog entry:

The Table Data Import wizard ignored the user's column selection and
always generated tables containing the full set of columns. Deselected
columns were populated with NULL values after the import operation.

Thank you for the bug report.