Bug #7215 information_schema: columns are longtext instead of varchar

Submitted: 13 Dec 2004 1:22 Modified: 23 Feb 2005 14:06
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.3-alpha-debug OS:Linux (SUSE 9.2)
Assigned to: Sergei Glukhov CPU Architecture:Any

[13 Dec 2004 1:22] Peter Gulutzan
Description:
There are information_schema columns which contain catalog identifiers. 
They have data type = 'longtext'. But that's not appropriate. 
They should have data type = 'varchar(x)' where x is the 
maximum identifier size, usually 64. It is now possible for 
a varchar to have more than 255 characters, so this should 
always be possible. 
 

How to repeat:
mysql> select table_schema,table_name, column_name from information_schema.columns 
where data_type = 'longtext'; 
+--------------------+-------------------+--------------------+ 
| table_schema       | table_name        | column_name        | 
+--------------------+-------------------+--------------------+ 
| information_schema | SCHEMATA          | CATALOG_NAME       | 
| information_schema | SCHEMATA          | SQL_PATH           | 
| information_schema | TABLES            | TABLE_CATALOG      | 
| information_schema | TABLES            | CREATE_OPTIONS     | 
| information_schema | COLUMNS           | TABLE_CATALOG      | 
| information_schema | COLUMNS           | COLUMN_TYPE        | 
| information_schema | COLUMNS           | COLUMN_COMMENT     | 
| information_schema | ROUTINES          | ROUTINE_CATALOG    | 
| information_schema | ROUTINES          | ROUTINE_DEFINITION | 
| information_schema | ROUTINES          | SQL_MODE           | 
| information_schema | STATISTICS        | TABLE_CATALOG      | 
| information_schema | VIEWS             | TABLE_CATALOG      | 
| information_schema | VIEWS             | VIEW_DEFINITION    | 
| information_schema | USER_PRIVILEGES   | TABLE_CATALOG      | 
| information_schema | SCHEMA_PRIVILEGES | TABLE_CATALOG      | 
| information_schema | TABLE_PRIVILEGES  | TABLE_CATALOG      | 
| information_schema | COLUMN_PRIVILEGES | TABLE_CATALOG      | 
| information_schema | TABLE_CONSTRAINTS | CONSTRAINT_CATALOG | 
| information_schema | KEY_COLUMN_USAGE  | CONSTRAINT_CATALOG | 
| information_schema | KEY_COLUMN_USAGE  | TABLE_CATALOG      | 
| information_schema | TABLE_NAMES       | TABLE_CATALOG      | 
+--------------------+-------------------+--------------------+ 
21 rows in set (0.11 sec)
[23 Feb 2005 11:18] Alexander Barkov
Ok to push.
[23 Feb 2005 11:38] Sergei Glukhov
Fixed in 5.0.3
[23 Feb 2005 14:06] Paul DuBois
Noted in 5.0.3 changelog.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.