Bug #13123 SQLDescribeCol returns wrong column length
Submitted: 12 Sep 2005 16:20 Modified: 12 Dec 2005 13:27
Reporter: Bogdan Degtyariov Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51.11 OS:Windows (Microsoft Windows XP)
Assigned to: MySQL Verification Team CPU Architecture:Any

[12 Sep 2005 16:20] Bogdan Degtyariov
Description:
SQLDescribeCol returns wrong column length for multibyte charsets.

How to repeat:
1. Start mysql server with default-character-set=utf8
2. Create a table with a column of char(16) type
3. Call SQLDescribeCol for the column from step 2
4. SQLDescribeCol will return the length in bytes, but specification demands the length in characters.
[26 Sep 2005 17:02] Bogdan Degtyariov
Try create table t1(c1 integer, c2 varchar(20)). Get the SQLDescribeCol for columns of "select * from t1". It will report ColumnSize 0. Insert one row with c2 "123", and try once more - it will report 3, etc.
[12 Dec 2005 13:27] Bogdan Degtyariov
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

Additional info:

This bug is fixed in MySQL Connector/ODBC 3.51.12