Bug #69742 New Schema Priviledge Definition: backslashed undesrore
Submitted: 14 Jul 2013 18:06 Modified: 14 Jul 2013 18:17
Reporter: Istvan Lovas Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.47 OS:Linux (gentoo mysql5.5)
Assigned to: CPU Architecture:Any
Tags: admin, backslash, schema, selected, undesrore

[14 Jul 2013 18:06] Istvan Lovas
Description:
Hi there,

I have Databases with backslashes in their names. So when I want to configure the Schema Privileges under 'Admin'->'Users and Privileges', the Workbench-popup offers me under 'selected schema' the underscores in the names escaped with backslashes e.g. my\_db1 instead of my_db1.

later this causes errors.

But If I type in the schema manually correctly as my_db1, everything works fine.

How to repeat:
1. create database 'my_db1';
2. goto 'Admin'->'Users and Privileges' and for a 'user' do an 'Add Entry'
3. select 'my\_db1' under 'selected schema' and click on 'OK'
4. select some rights and 'save changes'

You should get something like this: 

Error executing 'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE, TRIGGER ON my\_db1.* TO 'user'@'localhost''
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'my\_db1.* TO 'user'@'localhost'' at line 1.
SQL Error: 1064

Suggested fix:
So I think that underscores in the Schemas shouldn't be escaped in the select box.

If I type in the schema name as 'my_db1' manually, everything works fine.
[14 Jul 2013 18:17] MySQL Verification Team
Thank you for the bug report. Duplicate with http://bugs.mysql.com/bug.php?id=68175 .