Bug #15032 Enable get Characterset for column and table
Submitted: 17 Nov 2005 20:08 Modified: 17 Nov 2005 22:17
Reporter: Vladimir Loubenski Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:MySQL 4.1.14 OS:Windows (Windows 2000)
Assigned to: CPU Architecture:Any

[17 Nov 2005 20:08] Vladimir Loubenski
Description:
I need to get characterset description for table and columns for MySQL 4.1.14.
For example if table was creaded :
CREATE TABLE T1 (
  F1 CHAR CHARACTER SET utf8 COLLATE utf8_general_ci 
)
CHARACTER SET ucs2 COLLATE ucs2_general_ci;

I need to get charcterset for column F1 - utf8,
table characterset - ucs2.

Enable to get this information using existed server functions or ODBC functions.

How to repeat:
Create table on MySQL 4.1:
CREATE TABLE T1 (
  F1 CHAR CHARACTER SET utf8 COLLATE utf8_general_ci 
)
CHARACTER SET ucs2 COLLATE ucs2_general_ci;

Enable to get information about columns and table characterset using existed server functions or ODBC functions.
[17 Nov 2005 22:17] MySQL Verification Team
You can get that information with show create table table_name:

mysql> select version();
+------------------+
| version()        |
+------------------+
| 4.1.16-debug-log |
+------------------+
1 row in set (0.02 sec)

mysql> show create table T1\G
*************************** 1. row ***************************
       Table: T1
Create Table: CREATE TABLE `T1` (
  `F1` char(1) character set utf8 default NULL
) ENGINE=MyISAM DEFAULT CHARSET=ucs2
1 row in set (0.00 sec)

mysql>