Bug #65195 unnecessary difference in charset output for SHOW CREATE DATABSE|TABLE
Submitted: 3 May 2012 19:06 Modified: 4 May 2012 3:13
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:any OS:Any
Assigned to: CPU Architecture:Any
Tags: qc

[3 May 2012 19:06] Peter Laursen
Description:
I needed to 'search and replace in a dump and came across this, what I consider carelessness with framing output returned from statements (and yes .. it is a very old issue) 

How to repeat:
SHOW CREATE DATABASE test; 
-- .. DEFAULT CHARACTER SET utf8
SHOW CREATE TABLE test; 
-- .. DEFAULT CHARSET=utf8

Note differences in the output:
1) "CHARACTER SET" versus "CHARSET"
2) ' ' [SPACE CHARACTER] versus "="

Suggested fix:
In my understanding there is no reason why they cannot return the same syntax for the default in this case. It works (imports) enterchangebly with all 4 cartesic variants of the syntax in every context (database, table and columnn at least)

Searching in a GUI editor, 'grepping' from command line for charset details or whatever of the kind in a dump becomes unnecesarily complex due to this. This is not academic if you have a default database charset, tables with different default charset and tables with columns using different charsets in that database.
[4 May 2012 3:13] MySQL Verification Team
Thank you for the bug report.