db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3579) The Developer's Guide incorrectly describes the behavior of transactions inside procedures and functions
Date Tue, 22 Jul 2008 16:59:33 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615672#action_12615672

Rick Hillegas commented on DERBY-3579:

Thanks for the patch, Kim. This material is much more clear after you changed "procedure"
to "routine". A couple comments:


I would distinguish between functions and procedures:

# Database-side JDBC routines (routines using nested connections)

You cannot execute functions within SQL statements if those functions perform a commit or
rollback on the current connection. Since in auto-commit mode all SQL statements are implicitly
committed, Derby turns off auto-commit during execution of database-side routines and turns
it back on when the statement completes.

Routines that use nested connections are not permitted to turn auto-commit on or off.



There is a spurious right angle bracket following "getConnection" on this line:

<p>With DriverManager, you use the connection URL as an argument to get the <i>getConnection</i>>

> The Developer's Guide incorrectly describes the behavior of transactions inside procedures
and functions
> --------------------------------------------------------------------------------------------------------
>                 Key: DERBY-3579
>                 URL: https://issues.apache.org/jira/browse/DERBY-3579
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions:
>            Reporter: Rick Hillegas
>            Assignee: Kim Haase
>         Attachments: DERBY-3579-2.diff, DERBY-3579-2.stat, DERBY-3579-2.zip, DERBY-3579.diff,
DERBY-3579.zip, z.java
> The "Programming database-side JDBC procedures" section of the Developer's Guide misleads
users about how transactions can be managed inside database procedures. For instance, the
section titled "Invoking a procedure using the CALL command" says the following: "Procedures
that use nested connections, on the other hand, are not permitted to commit or roll back and
can therefore be rolled back after the calling statement." This is not true. User-coded procedures
can issue both commit() and rollback() on the nested connection bound to the "jdbc:default:connection"
URL and those methods have the desired behavior. The whole "Programming database-side JDBC
procedures" section could use an overhaul since it appears to make other misleading statements
about the behavior of transactions inside routines. Thanks to Dag for pointing out the following
email thread: http://www.nabble.com/Transaction-Problems-of-a-Derby-Stored-Procedure-td15494178.html

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

View raw message