Description
David Boden opened SPR-10084 and commented
On a SQL query that involves:
insert into AbcTable
select :param1, :param2, otherValue
from DefTable
... using a NamedParameterJdbcTemplate and mapping one of the named parameters to NULL in the parameter map results in:
java.io.IOException: JZ0SL: Unsupported SQL type 0.
Example code (Spring 3.1.3.RELEASE):
MapSqlParameterSource parameters = new MapSqlParameterSource();
parameters.addValue("param1", null);
template.update(insertSql, parameters);
Works (inserts a null value into the table) in 3.1.1.RELEASE.
Using Sybase JConnect 7.07.ESD5 (latest) and other versions of JConnect spanning back 2 years.
Test details to follow on Monday, just wanted to raise the issue.
Affects: 3.1.3
Issue Links:
- Update to spring 3.1.3 causes SqlException when executing sql statement with null parameters, caused by changes in StatementCreatorUtils.setNull method. [SPR-10185] #14818 Update to spring 3.1.3 causes SqlException when executing sql statement with null parameters, caused by changes in StatementCreatorUtils.setNull method. ("is duplicated by")
- performancedrop due to repeated JDBC 3.0 getParameterType calls in setNull in StatementCreatorUtils [SPR-11100] #15726 performancedrop due to repeated JDBC 3.0 getParameterType calls in setNull in StatementCreatorUtils
- Protect against getParameterType cursor leak with Oracle 12c JDBC driver [SPR-14629] #19196 Protect against getParameterType cursor leak with Oracle 12c JDBC driver
Referenced from: commits f449b5a, f0a1ff2
Backported to: 3.1.4