Bug #98560 Workbench doesn't remember open tabs in editor
Submitted: 11 Feb 2020 20:39 Modified: 5 Mar 2020 18:12
Reporter: Stephen Rider Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:8.0.19 OS:Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:x86
Tags: WBBugReporter

[11 Feb 2020 20:39] Stephen Rider
Description:
The "Save snapshot of open editors on close" feature no longer works. (It used to work great, a couple updates ago).  I reopen Workbench and it's forgotten all my open tabs.  This is to an extent a data loss issue, as I may have had test queries in the editor, and that's all gone.

It appears (I haven't test super thoroughly) to affect the "background" connection when I have more than one connection open in different tabs.

How to repeat:
Open Workbench. Open Connection A.  Open Connection B.  Open some tabs on each of those connections.  Close Workbench.  Reopen Workbench.

Problem 1: Connection A and Connection B are closed. They should have reopened.

Reopen Connections A and B.  The editor tabs that were previously open are gone, or **even worse** the tabs from Connection B are moved to Connection A, replacing Connection A's tabs.

Suggested fix:
It seems a recent change broke this, so I would suggest looking at recent changes to the code.
[11 Feb 2020 20:42] Stephen Rider
It's inconsistent. Sometime tabs are completely gone.  Sometimes they have jumped between Connection tabs.
[5 Mar 2020 9:36] MySQL Verification Team
Hello Stephen Rider,

Thank you for the bug report.
I tried to reproduce your issue on windows 10 with workbench 8.0.19 but I am not seeing any issues at my end.

Regards,
Ashwini Patil
[5 Mar 2020 17:57] Stephen Rider
I have now repeated this multiple times. I have reproduced it with complete consistency. Tried deleting the %AppData%\MySQL\Workbench\ directory; tried uninstalling/reinstalling Workbench. Same result (after manually restoring connections).

This is a major issue, because if I have to quit the program for any reason I lose whatever queries I might have entered in open tabs. This is lost of actual work.

To Reproduce:

I have two connections, MyConnection and MyConnection-dev.  MyConnection has a default schema of myschema.  MyConnection-dev has a default schema of myschematest.

Open a tab of each Connection, and open tabs for the following tables:

Under MyConnection:
* myschema.tableA
* myschema.tableB
* myschema.tableC

Under MyConnection-dev:
* myschematest.tableA
* myschematest.tableB
* myschematest.tableC

Quit Workbench.
Reopen Workbench. Both connection tabs are closed.
Reopen MyConnection tab. Reopen MyConnection-dev tab.  It now shows:

Under MyConnection:
* myschematest.tableA
* myschematest.tableB
* myschematest.tableC

***NOTE the schema*** -- Those are the tabs that *were under the other connection*!

Under MyConnection-dev:
* Query1 (empty tab)
[5 Mar 2020 18:10] Stephen Rider
Note: the two connections are at different IP addresses, but have the same login credentials
[5 Mar 2020 18:12] Stephen Rider
Changing Severity to Serious.  The "workaround" is to manually save all my info to text files, which is a major PITA but doable.  Still could have work lost if Windows reboots to install an update though.