Bug #90269 Changing Connection Name loses all saved queries and scripts
Submitted: 31 Mar 2018 7:51 Modified: 2 Apr 2018 5:25
Reporter: Adtc Rlz Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:6.3.10 OS:Windows (Microsoft Windows 10 Home Single Language)
Assigned to: CPU Architecture:x86 (x64)
Tags: WBBugReporter

[31 Mar 2018 7:51] Adtc Rlz
Description:
If you have scripts and queries that are open and auto-saved previously in a connection, changing the connection name (that is, renaming it) in the Connections list will reset and lose all those auto-saved data.

This appears related to #75456 but that talks about column widths, but I'm concerned about the SQL Editor tabs with all the saved queries.

How to repeat:
1. Create a connection.
2. Open the connection and create some SQL Editor tabs.
3. Fill the tabs with any queries or text.
4. Close the connection.
5. Open the connection again.
6. Verify that all tabs have been saved and restored.
7. Close the connection.
8. Right-click the connection and click Edit Connection...
9. Change the connection name and close the dialog.
10. Open the connection again.

All tabs/queries/text are lost. After rename, the connection opens with a single blank SQL Editor tab.

Renaming the connection back to the original name does not help. Data is lost PERMANENTLY.

Suggested fix:
All tabs/queries/text must be saved and restored as normal even if connection name has changed.

Use an internal unique and permanent non-editable connection identifier to associate saved data to the connection, instead of the user-editable connection name.

Or continue using the original connection name as the permanent internal identifier (to retrieve saved data, etc) while using the new connection name for display only.
[2 Apr 2018 5:25] MySQL Verification Team
Hello Adtc Rlz,

Thank you for the report and feedback.

Thanks,
Umesh
[9 Nov 2020 7:49] Gergana Stefanova
I just experienced the same problem using version 8.0.20.