Bug #44867 DEFERRABILITY column in resultsets for database metadata has wrong data type
Submitted: 14 May 11:40 Modified: 26 May 12:52
Reporter: Vivekanand Bachche
Status: Closed
Category:Connector/J Severity:S3 (Non-critical)
Version:5.1.7 OS:Microsoft Windows
Assigned to: Target Version:
Triage: Needs Triage: D4 (Minor)

[14 May 11:40] Vivekanand Bachche
Description:
The column in database metadata resultsets which named as DEFERRABILITY is expected to be
of type 'short' (i.e. small int). MySQL driver returns it as 'integer'.

Following are the metadata apis which return this column-
1. getImportedKeys
2. getExportedKeys
3. getCrossReferrence

This can give critical problems with BI tools which perform strict checking before
retreiving metadata information.

How to repeat:
For each API mentioned in the description, check the type of column named "DEFERRABILITY"
in the returned result set.
[14 May 12:42] Vivekanand Bachche
Logical cause and fix looks to be simialar for following bugs-
44791
44862
44863
44865
44867
44868
44869
[14 May 13:10] Vivekanand Bachche
Please exclude 44791 from the list in my previous comment.
[14 May 18:49] Valeriy Kravchuk
Thank you for the problem report.
[22 May 22:54] Mark Matthews
Fixed, see http://bazaar.launchpad.net/~mark-mysql/connectorj/5.1/revision/793
[26 May 12:52] Tony Bedford
An entry has been added to the 5.1.8 changelog:

The DEFERRABILITY column in database metadata result sets was expected to be of type
SHORT. However, Connector/J returned it as INTEGER.

This affected the following methods: getImportedKeys(), getExportedKeys(),
getCrossReference().