Bug #70438 "Omit Schema Qualifier" option doesn't apply to GRANT statements
Submitted: 26 Sep 2013 15:22 Modified: 6 Nov 2013 19:55
Reporter: NOT_FOUND NOT_FOUND Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2 and 6.0 OS:Any
Assigned to: CPU Architecture:Any

[26 Sep 2013 15:22] NOT_FOUND NOT_FOUND
When forward engineering a SQL CREATE script, if you check the "Omit Schema Qualifier" it correctly removes the schema name from the create statements, but leaves it on the GRANT statements. This makes trying to maintain scripts that can be used to create a variety of database instances with different names impossible.

How to repeat:
Create a model with one table, one user, and grant that user a single privilege.

Select File -> Export -> Forward engineer SQL CREATE script 

check the Omit Schema Qualifier in Object Names checkbox

click Continue

check the Export User Objects checkbox

click Continue

Note the grant statements still have the model name (schema name)

Suggested fix:
Omit the schema qualifier in the GRANT statements.
[26 Sep 2013 17:06] MySQL Verification Team
Thank you for the bug report.
[6 Nov 2013 19:55] Philip Olson
Fixed as of MySQL Workbench 6.0.8, and here's the changelog entry:

When forward engineering an "SQL CREATE" script, checking the "Omit Schema
Qualifier" preference would correctly remove the schema name from the CREATE
statements, but it incorrectly left the schema name on the GRANT

Command sequence: "File", "Export", "Forward engineer SQL CREATE script".

Thank you for the bug report.