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
-
Activity
Field | Original Value | New Value |
---|---|---|
Summary | tinyInt1isBit is not applied by | tinyInt1isBit is not applied by MySQLDatabaseMetaData |
Summary | tinyInt1isBit is not applied by MySQLDatabaseMetaData | tinyInt1isBit is not applied by MySQLDatabaseMetaData when retrieving columns |
Assignee | Rasmus Johansson [ ratzpo ] | Georg Richter [ georg ] |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | defaullt [ 29520 ] | MariaDB v2 [ 47834 ] |
Fix Version/s | 1.1.6 [ 13801 ] |
Workflow | MariaDB v2 [ 47834 ] | MariaDB connectors [ 54926 ] |
Workflow | MariaDB connectors [ 54926 ] | MariaDB v3 [ 70222 ] |
Workflow | MariaDB v3 [ 70222 ] | MariaDB v4 [ 134704 ] |
The standard MySQL Connector/J implementation correctly translates the column types in its equivalent version of this method.