[CONJ-144] getColumnClassName doesn't support all data types Created: 2015-03-02 Updated: 2016-09-01 Resolved: 2016-09-01 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.1.8 |
| Fix Version/s: | 1.5.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Georg Richter | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
getColunClassName only supports the following data types: TINYINT support for the following data types is missing: BOOLEAN |
| Comments |
| Comment by Vladislav Vaintroub [ 2015-03-02 ] |
|
Actually, all Types should be handled.The switch statement in https://github.com/MariaDB/mariadb-connector-j/blob/master/src/main/java/org/mariadb/jdbc/internal/mysql/MySQLType.java#L123 is only for non-trivial cases, where just mysql type info alone does not suffice, but other information like field length or encoding is required to derive the type. Trivial cases are handled after the switch statement. There is a reasonably extensive datatype test, which checks for equality of resultSetMetaData.getColumnClassName() and resultSet.getObject().getClass().getName() for many datatypes. |
| Comment by Diego Dupin [ 2016-09-01 ] |
|
Tested, i confirm metadata for "missing" type work well. The default type.getClassName() return appropriate result. |