You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by Clinton Begin <cl...@gmail.com> on 2007/11/29 18:21:46 UTC
RE: [jira] Commented: (IBATIS-439) Batching of statements does not work for stored procedures
FYI: I haven't forgotten about this....just ridiculously busy.
I wonder if we should just try to get you commit access?
Clinton
-----Original Message-----
From: Trevor Brosnan (JIRA) [mailto:ibatis-dev@incubator.apache.org]
Sent: October-17-07 1:08 PM
To: dev@ibatis.apache.org
Subject: [jira] Commented: (IBATIS-439) Batching of statements does not work for stored procedures
[ https://issues.apache.org/jira/browse/IBATIS-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535679 ]
Trevor Brosnan commented on IBATIS-439:
---------------------------------------
This bug is a minor impact to fix - can this be resolved in the iBatis 2.3.1 release?
> Batching of statements does not work for stored procedures
> ----------------------------------------------------------
>
> Key: IBATIS-439
> URL: https://issues.apache.org/jira/browse/IBATIS-439
> Project: iBatis for Java
> Issue Type: Bug
> Components: SQL Maps
> Affects Versions: 2.3.0
> Environment: All relational databases
> Reporter: Trevor Brosnan
> Fix For: 2.3.1
>
>
> iBatis SQLMaps incorporates a mechanism for utilizing the JDBC API's underlying batching capabilities (Statement.addBatch()) to efficiently group a set of database operations together for maximum performance. This mechanism works as expected for dynamic SQL, but does not work for callable statements.
> This behavior has been deduced using P6Spy (configured to log to a Log4j SocketAppender) in conjunction with the SQL Profiler tool. As a note - NOT all JDBC Drivers support batching of callable statements. Older DB2 type 4 drivers did not support batching of callable statements. However, most modern drivers do (e.g. Sybase jConnect, Oracle JDBC Driver etc)
> The fix for this issue is straightforward. Change the method definition for sqlExecuteUpdate in class com.ibatis.sqlmap.engine.mapping.statement.ProcedureStatement to be as follows:
> protected int sqlExecuteUpdate(RequestScope request, Connection conn, String sqlString, Object[] parameters) throws SQLException {
>
> if (request.getSession().isInBatch()) {
> getSqlExecutor().addBatch(request, conn, sqlString,
> parameters);
> return 0;
> } else {
> return getSqlExecutor().executeUpdateProcedure(request, conn,
> sqlString.trim(), parameters);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (IBATIS-439) Batching of statements does not work for stored procedures
Posted by Larry Meadors <lm...@apache.org>.
Is the file that needs committed (any unit tests?) attached to the issue?
If it is, I'll commit it.
Larry
On Nov 29, 2007 10:21 AM, Clinton Begin <cl...@gmail.com> wrote:
> FYI: I haven't forgotten about this....just ridiculously busy.
>
> I wonder if we should just try to get you commit access?
>
> Clinton
>
>
> -----Original Message-----
> From: Trevor Brosnan (JIRA) [mailto:ibatis-dev@incubator.apache.org]
> Sent: October-17-07 1:08 PM
> To: dev@ibatis.apache.org
> Subject: [jira] Commented: (IBATIS-439) Batching of statements does not work for stored procedures
>
>
> [ https://issues.apache.org/jira/browse/IBATIS-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535679 ]
>
> Trevor Brosnan commented on IBATIS-439:
> ---------------------------------------
>
> This bug is a minor impact to fix - can this be resolved in the iBatis 2.3.1 release?
>
> > Batching of statements does not work for stored procedures
> > ----------------------------------------------------------
> >
> > Key: IBATIS-439
> > URL: https://issues.apache.org/jira/browse/IBATIS-439
> > Project: iBatis for Java
> > Issue Type: Bug
> > Components: SQL Maps
> > Affects Versions: 2.3.0
> > Environment: All relational databases
> > Reporter: Trevor Brosnan
> > Fix For: 2.3.1
> >
> >
> > iBatis SQLMaps incorporates a mechanism for utilizing the JDBC API's underlying batching capabilities (Statement.addBatch()) to efficiently group a set of database operations together for maximum performance. This mechanism works as expected for dynamic SQL, but does not work for callable statements.
> > This behavior has been deduced using P6Spy (configured to log to a Log4j SocketAppender) in conjunction with the SQL Profiler tool. As a note - NOT all JDBC Drivers support batching of callable statements. Older DB2 type 4 drivers did not support batching of callable statements. However, most modern drivers do (e.g. Sybase jConnect, Oracle JDBC Driver etc)
> > The fix for this issue is straightforward. Change the method definition for sqlExecuteUpdate in class com.ibatis.sqlmap.engine.mapping.statement.ProcedureStatement to be as follows:
> > protected int sqlExecuteUpdate(RequestScope request, Connection conn, String sqlString, Object[] parameters) throws SQLException {
> >
> > if (request.getSession().isInBatch()) {
> > getSqlExecutor().addBatch(request, conn, sqlString,
> > parameters);
> > return 0;
> > } else {
> > return getSqlExecutor().executeUpdateProcedure(request, conn,
> > sqlString.trim(), parameters);
> > }
> > }
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>