Bug #10460 SHOW CREATE TABLE uses inconsistent upper/lower case
Submitted: 9 May 2005 7:50 Modified: 8 Mar 2006 16:18
Reporter: Carsten Pedersen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.4-beta-standard-log OS:Linux (SuSE Linux 9.2)
Assigned to: Magnus Blåudd CPU Architecture:Any

[9 May 2005 7:50] Carsten Pedersen
Description:
SHOW CREATE TABLE uses uppercase for certain key words such as "CREATE TABLE", "PRIMARY KEY", "ENGINE", ... - but not for others, such as "int", "auto_increment", "unsigned", ...

How to repeat:
mysql> drop table if exists t;
Query OK, 0 rows affected (0.00 sec)

create table t (i INT(10) not null AUTO_INCREMENT, primary key (i));

mysql> show create table t\G
*************************** 1. row ***************************
       Table: t
Create Table: CREATE TABLE `t` (
  `i` int(10) NOT NULL auto_increment,
  PRIMARY KEY  (`i`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

Suggested fix:
make all reserved/key words uppercase
[10 Jun 2005 11:29] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/25854
[14 Jun 2005 9:12] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/25967
[8 Jul 2005 13:59] Magnus Blåudd
Will be fixed in 5.1
[12 Jul 2005 8:45] Magnus Blåudd
Started fixing this in 5.1
[21 Feb 2006 8:06] Magnus Blåudd
Will be fixed in 5.2
[22 Feb 2006 9:10] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/3018
[22 Feb 2006 9:11] Magnus Blåudd
Made a patch for 5.1 where the ouput from SHOW CREATE TABLE uses uppercase for "CHARACTER SET", "COLLATE",
"DEFAULT", "ON UPDATE" and "AUTO_INCREMENT"
[6 Mar 2006 11:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/3496
[8 Mar 2006 8:28] Magnus Blåudd
Pushed a patch for 5.1.8 where the ouput from SHOW CREATE TABLE uses uppercase for
"CHARACTER SET", "COLLATE",
"DEFAULT", "ON UPDATE" and "AUTO_INCREMENT"
Datatypes are still in lowercase.
[8 Mar 2006 16:18] Paul Dubois
Noted in 5.1.8 changelog.

The output from <literal>SHOW CREATE TABLE</literal> is more
consistent about using uppercase for keywords. Data types
still are in lowercase. (Bug #10460)