Bug #85522 Changing filter on tables during Forward Engineering gives error
Submitted: 17 Mar 2017 15:42 Modified: 18 Sep 2018 16:15
Reporter: Ted Koch Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:6.3.9 build 10690321 CE (64 bits) Comm. OS:Any
Assigned to: CPU Architecture:Any
Tags: Changing filter, forward engineering

[17 Mar 2017 15:42] Ted Koch
Description:
During forward engineering the selection of what tables should be part of the create script can be changed. For this are a left and a right field. By default all table names are in the left field. By selecting and using the buttons between the fields it is possible to move the table names between the left en right fields. At least that was the case in the previous versions. Now I get an error (bug) screen whenever I click on any of the buttons to move table names. I have restarted Workbench several times to retry but the issue persists.

My model has eight databases connected to each other with roughly 150 tables. When generating the create script on all tables it results into about a 4000 line script. 

How to repeat:
- Open a model
- Click on menu File
- Click on sub menu Export
- Click on option Forward Engineer SQL CREATE script

Screen Forward Engineer SQL Script opens.

- Click on Next
- Click on Show Filter in the first block Export MySQL Table Options. 

The filter that gives the issue is now shown.

- Select one or more tables in the left field and click button >. Result: Error message.
- Click in button >>. Result: Error message.

Suggested fix:
Check the code. Check what has been changed compared to the previous version in which this used to work.
[17 Mar 2017 15:45] Ted Koch
Error when changing the filter

Attachment: 2017-03-17_1645.png (image/png, text), 131.92 KiB.

[17 Mar 2017 15:54] Ted Koch
Same happens when trying to apply the same filters to when:
- Clicking on menu Database
- Clicking on option Forward Engineer

Screen Forward Engineer to database is opened.

- Clicking Next
- Clicking Next
- Clicking Show Filter in block Export MySql Table Objects.

And than make changes to the selected tabel names.
[17 Mar 2017 17:06] MySQL Verification Team
Thank you for the bug report.

Exception = System.Runtime.InteropServices.SEHException
Message = External component has thrown an exception.
FullText = System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
   at MformsButton.OnClick(EventArgs args)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[23 Mar 2017 10:17] Ted Koch
When can I expect feedback on this report? Especially when can I expect a fix or is it better to reinstall an older version and work with that? Or is that not an option anymore because the files saved with build 10690321 can no longer be used in older versions of Workbench?
[26 Apr 2017 23:16] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=86100 marked as duplicate of this one.
[27 Apr 2017 2:52] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=86102 marked as duplicate of this one.
[22 May 2017 22:03] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=86412 marked as duplicate of this one.
[5 Dec 2017 9:04] Luis Delgado
Same here. Any idea on when this will be reviewed?
[15 Jan 2018 20:11] Quentin Roberts
I am also running into this issue for the last few releases. Any ETA for a fix? Does anyone know of a working version that doesn't throw an exception when changing the filter in the reverse engineering wizard?
[16 Jan 2018 14:34] Quentin Roberts
If you uninstall the current version you are using and use the following version it should work fine.

mysql-workbench-community-6.0.9-win32.msi
[19 Jan 2018 18:58] Greg Fletcher
I am having the same problem, but I am only evaluating Workbench so I am only trying to generate Create Scripts for 3 tables. 

I wanted to add that the issue happens when trying to fwd engineer without trying to filter out tables. So for me it happens:
 - Trying to filter tables out (moving from left to right in filter screen)
 - Trying to fwd engineer a schema.
 - Trying to fwd engineer a single table.

As an aside, since i am evaluating the software, I have to comment on the fact that this issue looks to be 10 MONTHS old!! If one cannot generate scripts, is the software only for diagramming? Does it normally take a calendar year to resolve what looks to be a critical issue?
[19 Jan 2018 19:08] Greg Fletcher
Clarification... I am in the File->Export... not Database-FwdEngineer. Just trying to export a 1-3 table CREATE TABLE .sql script in plain old ASCII format.  

... ALSO, I am using Workbench build 6.3.10 on Windows 7 Pro SP1 (64-bit).
[20 Jan 2018 0:31] Greg Fletcher
Still can't FILTER, but I got it to EXPORT...

Like I said, I'm new so I'm still a little confused on how the setup should look. What I had done was:

-- RUN A (Fail) ----
1. Renamed the default schema to testdb.
2. Added a couple tables using the add table feature.
3. Generated a diagram.
4. Added more tables using the left-toolbar in the diagrammer.
5. played with creating relationships using the diagrammer toolbar.
6. Realized i was confused and created a 2nd schema called starterdb
7. Copy/paste 4 tables from testdb to starterdb.
8. renamed a couple fk columns in starterdb. 

What I wanted to do was generate the 4 tables in starterdb, so I went "File->Export->FWDEngineer...". Once UI checked the 'Filter' screen I saw that ALL THE TABLES from both testdb and starterdb were listed. It was when I tried to exclude the starterdb tables that I got the error. I then tried to export everything and received the same error. 

Since then, I shut it down and started from stratch like so:
--RUN B (Partial Success) ----
1. Renamed the default schema to testdb.
2. Add 4 tables using the add table feature in the model screen.
3. Added Foreign Keys the same way as the tables in 3.
4. Generated a diagram.
5. "File->Export->FWDEngineer...".

This time, I was not able to Filter, but I could Export the script.

I know that there were inconsistencies between the two schemas in RUN A (I was playing with the relationships in the smaller diagram). I suspect that the inconsistencies have something to do with this Issue.  

One other note. In RUN A I was able to right-click a table in the diagram and copy the SQL to the clipboard. Anyways, I hope this helps.
Greg.
[29 Jan 2018 6:22] Chiranjeevi Battula
http://bugs.mysql.com/bug.php?id=89443 marked as duplicate of this one.
[22 Mar 2018 17:31] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=90181 marked as duplicate of this one.
[4 May 2018 0:17] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=90741 marked as duplicate of this one.
[16 May 2018 12:55] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=90888 marked as duplicate of this one.
[10 Jul 2018 13:49] Bill Linder
Just in case anyone has not thought of it, if you want to only add a few tables from the schema, right click on each table you want to add, select 'Copy SQL to clipboard'.  Open a new SQL Tab and paste the copied code into that tab.  Execute that and your table will be added.  You may need to change the insert code if the table already exists, as the copied code uses:
CREATE TABLE IF NOT EXISTS

This is just a work around.  A few people had asked outside of this forum so I thought I would add it here.
[18 Sep 2018 16:15] Christine Cole
Posted by developer:
 
Fixed as of the upcoming  release, and here's the changelog entry:

The filter arrows that select objects for forward or reverse engineering
within wizards generated an error instead of moving the objects as
expected.

Thank you for the bug report.