Bug #9640 INFORMATION_SCHEMA shows wrong DATA_TYPE
Submitted: 5 Apr 2005 10:27 Modified: 8 Apr 2005 14:39
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.4 OS:Linux (SuSE 9.0)
Assigned to: Sergei Glukhov CPU Architecture:Any

[5 Apr 2005 10:27] Hakan Küçükyılmaz
Description:
INFORMATION_SCHEMA.COLUMNS shows wrong DATA_TYPE

How to repeat:
USE test;
CREATE TABLE t1 (a tinyint unsigned);
SELECT DATA_TYPE from INFORMATION_SCHEMA.COLUMNS WHERE  TABLE_SCHEMA = 'test' AND TABLE_NAME = 't1' AND COLUMN_NAME = 'a';

+-----------+
| DATA_TYPE |
+-----------+
| tinyint   |
+-----------+

Suggested fix:
This query should show tinyint unsigned as result.
[6 Apr 2005 7:32] Georg Richter
Column COLUMN_TYPE already contains this information:

COLUMN_TYPE: tinyint(3) unsigned
[6 Apr 2005 8:28] Sergei Glukhov
Peter Gulutzan said:
  We ignore "UNSIGNED" and "ZEROFILL". Those words may
  appear in COLUMN_TYPE but not in DATA_TYPE. Therefore
  BUG#9640 is not a bug.