Bug #145 | ResultSetMetaData.getColumnTypeName bug for fieldtype CHAR | ||
---|---|---|---|
Submitted: | 11 Mar 2003 14:33 | Modified: | 22 Apr 2003 10:47 |
Reporter: | Mark Matthews | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 3.0.6 | OS: | NA |
Assigned to: | Mark Matthews | CPU Architecture: | Any |
[11 Mar 2003 14:33]
Mark Matthews
[11 Mar 2003 14:36]
Mark Matthews
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php MySQL server is returning those types (from a packet-level dump) of your testcase (the 'type' is returned as the 6th value from the end of the packet...Note that anything with BLOB in it is '0xfc' which is the MySQL field type for BLOB...and ENUM and SET are returned as '0xfe' which is 'String'...therefore mapped to 'CHAR' by Connector/J...the CHAR bug you report can not be duplicated, maybe because you used a big enough CHAR that it was silently converted to 'VARCHAR' by the server???: 10 74 79 70 65 73 52 65 . t y p e s R e 67 72 65 73 73 54 65 73 g r e s s T e s 74 0c 76 61 72 63 68 61 t . v a r c h a 72 46 69 65 6c 64 03 20 r F i e l d . . 00 00 01 fd 03 00 00 00 . . . . . . . . 00 . 10 74 79 70 65 73 52 65 . t y p e s R e 67 72 65 73 73 54 65 73 g r e s s T e s 74 09 63 68 61 72 46 69 t . c h a r F i 65 6c 64 03 02 00 00 01 e l d . . . . . fe 03 00 00 00 00 . . . . . . 10 74 79 70 65 73 52 65 . t y p e s R e 67 72 65 73 73 54 65 73 g r e s s T e s 74 09 65 6e 75 6d 46 69 t . e n u m F i 65 6c 64 03 01 00 00 01 e l d . . . . . fe 03 00 01 00 00 . . . . . . 10 74 79 70 65 73 52 65 . t y p e s R e 67 72 65 73 73 54 65 73 g r e s s T e s 74 08 73 65 74 46 69 65 t . s e t F i e 6c 64 03 05 00 00 01 fe l d . . . . . . 03 00 08 00 00 . . . . . 10 74 79 70 65 73 52 65 . t y p e s R e 67 72 65 73 73 54 65 73 g r e s s T e s 74 0d 74 69 6e 79 62 6c t . t i n y b l 6f 62 46 69 65 6c 64 03 o b F i e l d . ff 00 00 01 fc 03 90 00 . . . . . . . . 00 00 . . 10 74 79 70 65 73 52 65 . t y p e s R e 67 72 65 73 73 54 65 73 g r e s s T e s 74 0f 6d 65 64 69 75 6d t . m e d i u m 42 6c 6f 62 46 69 65 6c B l o b F i e l 64 03 ff ff ff 01 fc 03 d . . . . . . . 90 00 00 00 . . . . 10 74 79 70 65 73 52 65 . t y p e s R e 67 72 65 73 73 54 65 73 g r e s s T e s 74 0d 6c 6f 6e 67 62 6c t . l o n g b l 6f 62 46 69 65 6c 64 03 o b F i e l d . ff ff ff 01 fc 03 90 00 . . . . . . . . 00 00 . . 10 74 79 70 65 73 52 65 . t y p e s R e 67 72 65 73 73 54 65 73 g r e s s T e s 74 09 62 6c 6f 62 46 69 t . b l o b F i 65 6c 64 03 ff ff 00 01 e l d . . . . . fc 03 90 00 00 00 . . . . . .
[11 Mar 2003 15:29]
John Zoetebier
The CHAR field was stored in the table as VARCHAR(10) This seems to happen implicitly when storing a CHAR field with size more then 3. When CHAR field is stored as CHAR in database JDBC connector returns ColumnTypeName "CHAR", as expected.
[3 May 2003 12:19]
Jim Winstead
(don't mind me. this is just a test. sorry.)