6

I'm using MySQL Workbench 6.1.6, and I have opened a SQL Editor Window and have 14 Query tabs open. If I close the connection, and then open the connection again from the Home page it reopens all 14 tabs. That's ok.

However, if I close the tabs, then close the connection, when I re-open the connection the tabs re-appear. I have tried closing the tabs and exiting workbench. I have tried closing the tabs and opening new ones, but each time the original 14 tabs re-appear.

Does anybody know of what I can do to get rid of these 14 tabs once and for all?

5

That's actually a bug. MySQL Workbench saves the tabs on close of the connection. To get rid of the unwanted tabs you could temporarily switch off the snapshot feature:

enter image description here

If you like to get that bug fixed file a bug report at http://bugs.mysql.com.

  • 1
    cheers, I eventually fixed it by opening a second connection, opening some tabs and executing some queries in those tabs. (Simply opening a second connection with empty tabs didn't work). Then closing the initial connection, but not the second, and exiting from workbench. After that, when I started workbench, and opened that connection it had the new tabs in. The connection then worked as expected remebering the last tabs I had open each time I opened it. From what you say above though, I'm guessing I have just moved the problem rather than fixing it. – IGGt Jun 12 '14 at 7:51
  • @IGGt Darn, that didn't work for me – mikato Feb 19 '15 at 21:08
  • @Mikato, I'm currently using workbench 6.2.8, nad haven't had this problem since, if that helps. – IGGt Feb 20 '15 at 8:13
  • @IGGt That's great to know. I'll upgrade. Thanks! – mikato Feb 27 '15 at 19:37
  • @IGGt there is no version 6.2.8 of MySQL Workbench. The latest one is 6.2.4 with 6.2.5 around the corner. – Mike Lischke Feb 28 '15 at 10:33
2

It's already solved in MySQL Workbench 6.3, I've just tested it an it works (it keeps only the previous tabs between sessions).

  • 1
    Are you sure? I just updated and it keeps bringing all the tabs back. No only that, each of them are showing some hash-key instead of tab's name – Matías Cánepa May 20 '15 at 1:19
  • Have you installed exactly that version? – jbr.swork Jul 13 '15 at 7:18
0

Looking for the same thing, I came across the report bug about this issue; In addition to some weird tab naming that is also happening to me.

http://bugs.mysql.com/bug.php?id=74966

0

In the bug site says that is solved in version 6.3.7. You can download from oracle site.

0

I know this is a bit off-topic, but this post was only half of my problem; I wanted my remaining tabs to show up in a specific order - a problem if there are more than nine tabs.

If you go to the workspace directory ("C:\Users\<user account>\AppData\Roaming\MySQL\Workbench\sql_workspaces\<workspace name>-<integer>.workspace" in Windows 7), you'll see files that represent the tabs. The files representing tabs that display saved SQL will be named <integer>.filename and will contain the filename of the saved SQL. The files representing tabs that display unsaved SQL will be named <table name>.scratch and will contain the actual SQL.

(I discovered the way to delete stubborn tabs from the UI was to start from the left, but you could also delete stubborn tab files here. I actually used Mike's solution.)

For tabs displaying saved SQL (at least), the tab file names determine the display order: alphabetical. For example, if there are 11 such tabs, the display order would be 1.filename, 10.filename, 11.filename, 2.filename, etc.

Using the UI to display more than nine saved SQL files in a specific order requires anticipating the tab file names (which will be created sequentially during loading), sorting them alphabetically, and using the sorted tab file names to specify the sequence in which to load the saved SQL files so that they display in the desired order, left to right. (In the example above, the tab to be displayed second would be loaded tenth.) Or you could simply rename the tab files accordingly. The latter may be the only way to sort unsaved SQL tabs.

So this does includes two answers to the original post, but mostly it's extra information for those searching to have their own way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.