Bug #24942 Incorrect display of Schemata list for schema names containing an underscore
Submitted: 10 Dec 2006 9:07 Modified: 11 Dec 2006 9:12
Reporter: Lee Hericks Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.2.6 rc OS:Microsoft Windows (Windows Vista)
Assigned to: Mike Lischke CPU Architecture:Any

[10 Dec 2006 9:07] Lee Hericks
Description:
In User Administration, schemata that contain an underscore '_', are displayed as '\_'.  For example, I have a schema named 'forum_development'.  It is displayed properly in the Schemata list under the Catalogs section.  However, in User Administration, for assigning privileges, it is displayed as 'forum\_development'.  This is also the case with 'information\_schema'.

How to repeat:
Create a new schema containing an underscore '_'.  Navigate to the User Administration section.  The new schema appears with '\_' instead of '_'.

Suggested fix:
Is the underscore being escaped in the code for this section, but not for the schemata list in Catalogs?
[11 Dec 2006 9:12] Mike Lischke
This behavior is by design. The underscore is a wild card in various situations (like in LIKE clauses or the user privileges). Particularly for the privileges we have to show an escape char to make clear if the underscore is meant as wild card or part of the object name. In all other sections this is not necessary because no wild cards are allowed there. So we do not show an escape char there as it makes the display looking clumsy.