[6 APR 2005 15:29] Chadwick Baatz
Description: whenCalling a stored procedure with datatype decimal (m,d) (i.e. decimal (18,0)) The Connector/j library throws the exception being Low. After looking to the code it appears the Getcallstmtparametertypes method does not expect that a parameter datatype Could include a comma. Therefore, any stored procedure created with a compound datatype:float (m,d), Decimal (m,d), etc ... 'll has this problem.ErrorMessage:java.sql.SQLException:Internal Error when parsing callable Statement metadata(missing parameter type) at Com.mysql.jdbc.DatabaseMetaData.getCallStmtParameterTypes (databasemetadata.java:6902)ErrorIn JDBC sampling:java.sql.SQLException:Internal Error when parsing callable Statement metadata(missing parameter type) at Com.mysql.jdbc.DatabaseMetaData.getProcedureColumns (databasemetadata.java:2653) at COM.M Ysql.jdbc.CallableStatement.determineParameterTypes (callablestatement.java:1042) at Com.mysql.jdbc.callablestatement.<init> (callablestatement.java:83) at Com.mysql.jdbc.Connection.prepareCall (connection.java:1248) at Com.mysql.jdbc.Connection.prepareCall ( connection.java:1225) at testcallablestatement.<init> (testcallablestatement.java:34) at Testcallablestatement.main (testcallablestatement.java:112)How to repeat:Create Stored procedure:delimiter//drop Procedure IF EXISTS test_proc//create Procedure test_proc (Decimalparam DECIMAL ( 18,0) BEGIN SELECT param_list from Mysql.proc WHERE name= ' Test_proc '; End//create JAVA/JDBC program to call Stored procedureimport java.sql.connection;import java.sql.sqlexception;import ja Va.sql.drivermanager;import Java.sql.callablestatement;public class testclass{public TestClass () {Connection conn = Null CallableStatement cstmt = null; try {//Load class Class.forName ("Com.mysql.jdbc.Driver"); Modify URL with correct user, pass, host, and DB name conn = drivermanager.getconnection ("Jdbc:mysql://Error: "+ ex"); Ex.printstacktrace (); } finally {if (cstmt! = null) {try {cstmt.close (); } catch (SQLException err) {cstmt = null; }} try {if (conn! = null && conn.isclosed () = = False) Conn.close (); } catch (SQLException err) {conn = null; }}} public static void Main (string[] args) {new TestClass (); }}suggested FIX:Work Around:don ' t use, in defining JDBC called stored procedure parameters. For example, decimal instead of decimal (18,0). Fix:on Line 6836 of Com.mysql.jdbc.DatabaseMetaData theStatementForparsingThe parameter list is "list parselist = Stringutils.split (Parameterdef,", ", true);". Since This was the problem this needs to be modified. Either add some intelligence to the argumentparsingThe parameter list is retrieved.
[7 APR 2005 18:49] Mark Matthews
Fixed for 3.1.8. You can test the fix with the nightly snapshot fromhttp://downloads.mysql.com/snapshots.php after 00:00 GMT April 8th. Thanks for your bug report!
SQL call stored procedure error internal "error when parsing callable statement metadata (missing parameter type)