Bug #42255 Default Schema change only takes effect in a new tab
Submitted: 21 Jan 2009 22:31 Modified: 22 Jan 2009 16:18
Reporter: Philip Holly Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Query Browser Severity:S1 (Critical)
Version:1.2.15 OS:Windows (Vista Ultimate 64)
Assigned to: CPU Architecture:Any
Tags: default schema

[21 Jan 2009 22:31] Philip Holly
Description:
Changing the default schema does not affect an existing query tab. When a new tab is created, that new tab will use the new default schema, but the existing tabs will use the schema that was default when they were created. This is a major problem if the same table names exist in both databases.

Also, the default schema change can be seen in the Title Bar, but it's misleading on an existing tab. That's huge!

I haven't tested this behavior on a table that doesn't exist in both schemas.

How to repeat:
1. Create 2 new schemas.

2. Create the same table in each schema.

3. Populate the tables with different data. 

4. Make one of the databases a default schema by right-clicking on it and choosing "make default schema."

5. Create a new query tab and execute a query that returns a resultset.

6. Make the other schema the default schema. You will notice the Title Bar changed to reflect the new default schema.

7. Re-run the same query, in the same tab. It's supposed to use the new schema, but it still uses the old one.

8. Copy and paste the query into a brand new query tab and execute it. The results should be what you expect b/c it now is using the correct schema.
[21 Jan 2009 22:36] Philip Holly
This may be the same bug as #42246. Since the bug is critical I chose to submit it just in case their different.
[22 Jan 2009 16:18] MySQL Verification Team
Thank you for the bug report. Issue related as bug: http://bugs.mysql.com/bug.php?id=42246.