Bug #68307 | DatabaseMetaData.getProcedureColumns bug | ||
---|---|---|---|
Submitted: | 7 Feb 2013 20:22 | Modified: | 25 Jun 2013 20:25 |
Reporter: | Mikael Hakman | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 5.1.22 | OS: | Windows |
Assigned to: | Filipe Silva | CPU Architecture: | Any |
[7 Feb 2013 20:22]
Mikael Hakman
[23 Apr 2013 11:27]
Alexander Soklakov
Hi Mikael, Thanks for the report. I see no bug for getProcedureColumns, look at JDBC API please http://docs.oracle.com/javase/7/docs/api/constant-values.html#java.sql.DatabaseMetaData.pr...: public static final int procedureColumnOut 4 public static final int procedureColumnResult 3 Function columns are wrong, verified by code review, com.mysql.jdbc.DatabaseMetaData.convertTypeDescriptorToProcedureRow(...), starting from line 856 with comment "NOTE: For JDBC-4.0, we luck out here for functions because the values are the same for functionColumn..." realizes the same logic for procedures and functions, but: public static final int functionColumnOut 3 public static final int procedureColumnOut 4 public static final int functionColumnResult 5 public static final int procedureColumnResult 3 public static final int functionReturn 4 public static final int procedureColumnReturn 5 So we have a bug here.
[25 Jun 2013 20:24]
Daniel So
Added entry to changelog of Connector/J version 5.1.25: The DatabaseMetaData.getProcedureColumns() method returned wrong COLUMN_TYPE values.