Bug #25298 Content of Error Message is duplicated after attempt to use invalid db_name
Submitted: 27 Dec 2006 20:01 Modified: 16 Jan 2007 10:09
Reporter: Stephen Gornick Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.2.8 beta OS:Windows (Windows XP Pro SP2)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: 1049, db_name, duplicate, error, invalid, message, repeat, schema, Use

[27 Dec 2006 20:01] Stephen Gornick
Description:
After issuing the SQL statement USE and passing an invalid schema (db_name), an error dialog box is displayed that repeats the same error message twice.

How to repeat:
Launch Query Browser (Windows) and connect as any user.
In the text entry field enter:
  use BadSchemaName;    [assuming that no such schema exists]
Then click on the Execute button.

Expected:
Either a message displayed in the status line or a dialog informing me that I had attempted to use an invalid schema (db_name).

Actual:
An error dialog box titled: "MySQL Query Browser SQL Error"
with the message:
"The default schema cannot be changed to BadSchemaName
 The following error occured: Unknown database 'BadSchemaName' (1049)

A MySQL error was encountered.  The message is:
  
The default schema cannot be changed to BadSchemaName
 The following error occured: Unkown database 'BadSchemaName' (1049)"

Suggested fix:
Display the error message only once.
[27 Dec 2006 20:57] Stephen Gornick
Originally had 1.2.5 beta so installed latest (1.2.8 beta) and problem still
occurs there.
[28 Dec 2006 8:16] Sveta Smirnova
Thank you for the report.

Verified as described.
[16 Jan 2007 10:09] Mike Lischke
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html