Bug #61641 USE Statement unbolds active database
Submitted: 24 Jun 2011 22:26 Modified: 21 Nov 2011 4:18
Reporter: David Berg Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.34 CE OS:Windows (XP Pro SP3)
Assigned to: CPU Architecture:Any

[24 Jun 2011 22:26] David Berg
Description:
When execution of a script encounters a USE statement, the active database is unbolded in the Object Browser sidebar. Whatever database is selected in the USE statement should be bolded to inform the user which database is the currently avtive database.

How to repeat:
Open Workbench to the SQL Editor with a connection that specifies a database schema, but contains multiple (> 1) databases.

Execute a USE statement to select either the same or a different database.

Observe that no databases are left bolded after execution. 

Suggested fix:
Bold the database name that becomes selected with the USE statement.
[25 Jun 2011 6:24] Valeriy Kravchuk
On Mac OS X I see the behavior you ask about with 5.2.34. Maybe it's just a platform-specific bug.
[27 Jun 2011 13:33] Valeriy Kravchuk
I see exactly the same behavior (whatever database is mentioned in last USE statement, it is bolded) as you want on Windows XP also. 

Please, specify exact steps to perform, after Workbench startup, to see the problem while connected to fresh MySQL server.
[27 Jun 2011 17:31] David Berg
USE Examples to illustrate Bug #61641

Attachment: Bug #61641.zip (application/x-zip-compressed, text), 177.30 KiB.

[27 Jun 2011 17:32] David Berg
Valeriy,
Thank you for your prompt response. While replicating the scenario where I discovered my originally observed phenomenon, I discovered that the database name is unbolded only when the startup database name - or any database name above it in the list of databases - is selected with USE.

I attached a sequence of snapshots to illustrate the pheomenon. Startup is first, followed by SQL Editor, then USE 1,2,3,4,5. Notice that if the database name is selected is below the startup database, it is bolded. But if the startup database name - or any database above it in the list - is selected, it is unbolded.
[29 Jun 2011 9:58] Valeriy Kravchuk
Verified just as described in the last comment. I consider this a bug.
[21 Nov 2011 4:18] Philip Olson
Fixed as of 5.2.36:
+        &workbench; would not recognize the active schema with case
+        insensitive servers. As a result, an active schema within the
+        Object browser would be unselected after a
+        <literal>USE</literal> statement was executed.