Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
DERBY-1610 fixed some bugs in PreparedStatement.java. I find that the buggy file is similar to ClientPreparedStatement.java. For example, both files have the following code:
public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setBigDecimal", parameterIndex, x); } final int paramType = getColumnMetaDataX().getColumnType(parameterIndex); ... } catch ( SqlException se ) { throw se.getSQLException(); } }
The fixed code is as follow:
public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setBigDecimal", parameterIndex, x); } final int paramType = getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex ) ); ... } catch ( SqlException se ) { throw se.getSQLException(); } }
The repair can be applied to ClientPreparedStatement.java