Bug #86144 Workbench Connection "Close all but this" closes random tabs
Submitted: 1 May 2017 9:57 Modified: 8 May 2018 21:14
Reporter: Lee Butler Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:6.3.9 OS:Windows (10 x64)
Assigned to: CPU Architecture:Any
Tags: Connections, workbench

[1 May 2017 9:57] Lee Butler
Description:
(Marked as serious because it could destroy a bunch of work if it closes the wrong tab on you)

I've found an issue where having multiple connections open to servers (They can be the same server or different ones, doesnt seem to make a difference) and trying to click "Close All BUT this" in the context menu will close a random selectiom of tabs, sometimes including the one you wanted to keep open.

After closing the tabs it chooses to, it will then focus back to the home tab anyway. Instead of staying on the tab you were on (if it stayed open) like you'd expect it to.

How to repeat:
1. Open a bunch of connections (I'd recommend using different ones to identify them easier but you can use a bunch of the same and just open different editors in each I suppose)

2. Pick one. (I can't get it to happen on the second connection tab, but it's reliable on the first and third ones at least)

3. Right click and select "Close All BUT this"

4. Watch as a selection of tabs close which may or may not include the one you selected, while other tabs will remain open which you tried to close. 

Suggested fix:
Not sure, but I think the indexing of the connection tabs needs fixing a bit.
[2 May 2017 6:19] MySQL Verification Team
Hello Lee Butler,

Thank you for the report.
Verified as described with WB 6.3.9 on Win7.

Thanks,
Umesh
[8 May 2018 21:14] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 8.0.12 release, and here's the changelog entry:

With multiple connection tabs opened, selecting Close All But This from
the context menu (right-click a connection tab) closed tabs at random.

Thank you for the bug report.