[ 
https://issues.apache.org/jira/browse/DERBY-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kristian Waagan updated DERBY-3441:
-----------------------------------

    Attachment: derby-3441-2a-minor_am_refactoring.diff

Thanks for the comment Dan. I'll address your other comments later.

'derby-3441-2a-minor_am_refactoring.diff' addresses Dans comment about the 
improvement in resetParameters. I changed this (and other existing code) to use 
Arrays.fill, and also removed some unnecessary throws clauses from the existing 
code. I figured out 'batch_' was never set to null, so I made it final and 
removed a null check.

In the future it might be better to only create the ArrayList if you actually 
do batching, and maybe add a clearBatchX method that will be called where 
batch_.clear is called currently.

Committed patch 2a to trunk with revision 631515.
Have run a subset of the regression tests, am running the full suite for 
verification.

> Determine and implement a proper procedure for resetting a prepared statement 
> for reuse in a statement pool
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3441
>                 URL: https://issues.apache.org/jira/browse/DERBY-3441
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC, Network Client
>    Affects Versions: 10.4.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>             Fix For: 10.4.0.0
>
>         Attachments: derby-3441-1a-statement_reset.diff, 
> derby-3441-2a-minor_am_refactoring.diff
>
>
> Initial investigations indicate there are no existing suitable methods to 
> properly reset a prepared (or callable) statement for reuse with a statement 
> pool.
> A full reset is too heavy weight and defeats the purpose of statement 
> pooling, but a proper procedure should be achievable by reusing existing 
> pieces of code.
> Correctness is of course the most important thing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to