Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.3.4
-
None
-
None
-
linux kernel 2.6.31, MySQL 5.0.91, MySQL 5.1.44
Description
When I'm calling a MySQL stored procedure with INOUT parameter and the parameter value is NULL an exception is thrown: java.sql.SQLException: Incorrect integer value: 'null' for column 'p_value' at row 1.
Here's my MySQL server log fragment:
42 Query SET @com_mysql_jdbc_outparam_p_value='null'
42 Query call procedure_with_inout_parameters( @com_mysql_jdbc_outparam_p_id, @com_mysql_jdbc_outparam_p_value )
So it seems like value 'null' (quoted!) is assigned to the variable passed to the procedure (instead of null). The jdbcType of the parameter is explicitly set in the inline parameter map of the call.
I'm not really sure if it's a IBatis or MySQL jdbc issue - I will attach a test case exposing this problem.