[ https://issues.apache.org/jira/browse/DERBY-6951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lashan Faliq reassigned DERBY-6951: ----------------------------------- Assignee: Lashan Faliq > ClientPreparedStatement may be buggy > ------------------------------------ > > Key: DERBY-6951 > URL: https://issues.apache.org/jira/browse/DERBY-6951 > Project: Derby > Issue Type: Bug > Components: SQL > Reporter: Hao Zhong > Assignee: Lashan Faliq > > 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: > {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(); > } > } > {code} > The fixed code is as follow: > {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( > checkForEscapedCallWithResult( parameterIndex ) ); > ... > } > catch ( SqlException se ) > { > throw se.getSQLException(); > } > } > {code} > The repair can be applied to ClientPreparedStatement.java -- This message was sent by Atlassian JIRA (v6.4.14#64029)