db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lashan Faliq (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (DERBY-6951) ClientPreparedStatement may be buggy
Date Sun, 24 Sep 2017 14:10:10 GMT

     [ 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)

Mime
View raw message