[CONJ-72] tinyInt1isBit is not applied by MySQLDatabaseMetaData when retrieving columns Created: 2013-10-31 Updated: 2017-01-18 Resolved: 2013-11-13 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Bryan Turner (Inactive) | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
MariaDB Java Client 1.1.5 |
||
| Issue Links: |
|
||||||||
| Description |
|
When MySQLDatabaseMetaData.getColumns(String, String, String, String) is used (by Hibernate in my particular case), it does not apply the tinyInt1isBit setting from the JDBC URL. That means it returns "tinyint" where it should be returning "bit", which causes Hibernate to fail to validate the schema. It looks like a bug in MySQLDatabaseMetaData.dataTypeClause(String), line 99 (in the 1.1.5 source):
Based on the "year" line, it seems like the "tinyint" code should be:
|
| Comments |
| Comment by Bryan Turner (Inactive) [ 2013-10-31 ] |
|
The standard MySQL Connector/J implementation correctly translates the column types in its equivalent version of this method. |
| Comment by Georg Richter [ 2013-11-13 ] |
|
fixed in rev. 493 |
| Comment by Bryan Turner (Inactive) [ 2014-04-15 ] |
|
Unfortunately it appears this is only half a fix. The next problem is that the TYPE_NAME value is still wrong, and shows TINYINT rather than BIT. As a result, things like Hibernate validation still fail. It appears the SQL returned by columnTypeClause(String) needs something done to it as well. |