[CONJ-45] JDBC types in metadata for FLOAT and INT UNSIGNED are different than in ConnectorJ Created: 2013-06-16 Updated: 2014-04-29 Resolved: 2013-06-17 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | 1.1.2 |
| Fix Version/s: | 1.1.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Davy Verstappen | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
The getColumnType() method of java.sql.ResultSetMetaData returns an This gives problems with Hibernate, which uses this metadata to do its Here is the list of numerical types for which I found a mismatch:
(INT and INTEGER are equivalent of course) I'm attaching two patches:
|
| Comments |
| Comment by Vladislav Vaintroub [ 2013-06-17 ] |
|
Thank you for the patch! |
| Comment by Jacob Poder [ 2014-04-03 ] |
|
Hi, If the metadata is retrieved through DatabaseMetadata, it seems to return wrong values for int unsigned and smallint unsigned: // Example with smallint unsigned type will be 4 (INTEGER) instead of 5 (SMALLINT)! This stems from org.mariadb.jdbc.MySQLDatabaseMetaData.dataTypeClause(...) which still has the "old" behavior: My apologies if I posted this in the wrong place. Best regards, |