Bug #71699 Object explorer toggle database bug when filtered
Submitted: 13 Feb 2014 10:33 Modified: 20 Jan 2017 16:26
Reporter: László Somogyi Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.3.7 OS:Windows (7,10)
Assigned to: CPU Architecture:Any
Tags: filter, object explorer, toggle

[13 Feb 2014 10:33] László Somogyi
Description:
When you filter your db-s in the object explorer, and try to open (expand or whatever you call it; click on the arrow before the db name) a previously not "fetched" database: first it opens, then immediately closes... very annoying.

The fastest way to reproduce, just filter for a db and double click on it, you will see what i mean. Its only affecting not fetched dbs (those what you havent opened yet in the current session).

Other, seems related:
If you have 2 database which match the filter, eg. you have "test" and "test1" dbs, and you filter for "test":
- open the first one (should be the "test" db) and open the tables list
- close the db, without closing the tables (just click on the arrow before the db name)
- double click on the "test1" db and you will see the "test" db will open instead of the "test1" with the tables opened (it only happens when test1 wasnt fetched before)
This one is extremely annoying.

It is not exclusive for 6.0.9, i think it was in 5.2 too...

How to repeat:
Create a schema (or use one, which is not set as default on connection - not fetched)
Use the filter to find your schema
Double click on it, or just try to open with the arrow

The other:
Create at least 2 schemas with same base name, eg: test1 and test2
Filter for "test"
Toggle open test1's tables
Close the whole test1 schema, without closing its tables first
Double click on test2, or just try to open with the arrow (test1 will open with the tables unexpectedly)

Suggested fix:
Should work like when no filter is used.
[30 Oct 2015 16:22] MySQL Verification Team
Please try version 6.3.5. Thanks.
[31 Oct 2015 21:15] László Somogyi
Hi

Yes, 6.3.5 totally the same buggero (both issues). This is with Win 10, but will check Win 7 too on monday.
[12 Feb 2016 9:02] Mike Lischke
Hi, can you please also try version 6.3.6? Is the problem fixed there?
[20 Feb 2016 21:39] László Somogyi
Yes, same. I made a little video about it: https://dl.dropboxusercontent.com/u/2692/workbench-bug71699-6.3.6.mp4

You can see all on this. I open test first, it closes immediately, so I open it again (first problem). I open test tables, then I close the db and open test2... and yeah test opens instead and test2 remains closed... then I finally can open test2 (second problem).
This does not seem big deal here, but in reality I always have to filter cause there are lot of dbs and this always happens...

Anyway I had to create test2 db cause I cannot tell workbench to not select test1 by default on connection for some reason :D Maybe this is another bug, but dont care, you shouldnt either.
[7 Jul 2016 0:40] MySQL Verification Team
Please try version 6.3.7. Thanks.
[7 Jul 2016 6:18] László Somogyi
Same, nothing changed with 6.3.7
Win7 x64
[8 Jul 2016 12:02] MySQL Verification Team
Thank you for the feedback.
Observed on Win7 with WB 6.3.7 just as described by reporter i.e

If you have 2 database which match the filter, eg. you have "sbtest1" and "sbtest2" dbs, and you filter for "sbtest":
- open the first one (should be the "sbtest2" db) and open the tables list
- close the db, without closing the tables (just click on the arrow before the db name)
- double click on the "sbtest1" db and you will see the "sbtest2" db will open instead of the "sbtest1" with the tables opened (it only happens when test1 wasnt fetched before)
This one is extremely annoying.
[20 Jan 2017 16:26] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.3.9 release, and here's the changelog entry:

The schema navigator incorrectly opened a previously viewed database,
instead of the one selected, after the schema filter in the Navigator
panel was used to find and list multiple databases.

Thank you for the bug report.