Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
MariaDB Java Client 1.1.5
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):
" WHEN 'tinyint' THEN " + Types.TINYINT +
|
" WHEN 'year' THEN " + (((connection.getProtocol().datatypeMappingFlags & MySQLValueObject.YEAR_IS_DATE_TYPE)== 0)? Types.SMALLINT :Types.DATE) +
|
Based on the "year" line, it seems like the "tinyint" code should be:
" WHEN 'tinyint' THEN " + (((connection.getProtocol().datatypeMappingFlags & MySQLValueObject.TINYINT1_IS_BIT) == 0) ? Types.TINYINT : Types.BIT) +
|
" WHEN 'year' THEN " + (((connection.getProtocol().datatypeMappingFlags & MySQLValueObject.YEAR_IS_DATE_TYPE) == 0) ? Types.SMALLINT : Types.DATE) +
|
Attachments
Issue Links
- is blocked by
-
CONJ-412 tinyInt1isBit is not applied in method columnTypeClause
- Closed