Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 69027 invoked from network); 18 Oct 2005 23:03:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Oct 2005 23:03:08 -0000 Received: (qmail 27760 invoked by uid 500); 18 Oct 2005 23:03:07 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 27740 invoked by uid 500); 18 Oct 2005 23:03:07 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 27731 invoked by uid 99); 18 Oct 2005 23:03:07 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2005 16:03:06 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id D0BA250F for ; Wed, 19 Oct 2005 01:02:45 +0200 (CEST) Message-ID: <1116917662.1129676565851.JavaMail.jira@ajax.apache.org> Date: Wed, 19 Oct 2005 01:02:45 +0200 (CEST) From: "Deepa Remesh (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-498) Result set holdability defined inside stored procedures is ignored by server/client Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-498?page=all ] Deepa Remesh updated DERBY-498: ------------------------------- Attachment: xa_proc_test.diff xa_proc_test.status With derby-498.diff, I ran derbynetmats and derbynetclientmats suites using Sun jdk13. All tests passed. Also attaching an additional patch "xa_proc_test.diff" for xa tests. It does the following: 1. Adds procedure test to jdbcapi/xaSimplePositive.sql. 2. Updates master files. This patch is independent of the changes for DERBY-498. I ran the test jdbcapi/xaSimplePositive.sql successfully in embedded and derbynetclientmats framework before and after applying derby-498.diff. (This test is excluded from derbynetmats) I will open a new JIRA issue with repro for the problem found in xa holdability. > Result set holdability defined inside stored procedures is ignored by server/client > ----------------------------------------------------------------------------------- > > Key: DERBY-498 > URL: http://issues.apache.org/jira/browse/DERBY-498 > Project: Derby > Type: Bug > Components: Network Client, Network Server > Versions: 10.1.2.0, 10.2.0.0 > Reporter: A B > Assignee: Deepa Remesh > Attachments: d498.java, derby-498.diff, derby-498.status, xa_proc_test.diff, xa_proc_test.status > > Assume I have a Java stored procedure that returns one or more result sets, and the holdability of those result sets is specified as part of the createStatement() method within the procedure definition (see below for an example). > If I execute this procedure against Derby embedded, the holdability of each result set matches that of the statement-specific holdability that is defined within the stored procedure. However, if I run the procedure against the Network Server using the Derby client, the holdability of _all_ result sets is the same, and it is based on the holdability of the statement that _executed_ the procedure--i.e. the statement-specific holdability that is defined within the procedure is ignored. > Ex: If I create a stored procedure that corresponds to the following method: > public static void p2(ResultSet[] rs1, ResultSet[] rs2, > ResultSet[] rs3) throws Exception > { > Connection conn = DriverManager.getConnection( > "jdbc:default:connection"); > Statement st1 = conn.createStatement( > ResultSet.TYPE_FORWARD_ONLY, > ResultSet.CONCUR_READ_ONLY, > ResultSet.HOLD_CURSORS_OVER_COMMIT); > rs1[0] = st1.executeQuery("select * from testtable1"); > Statement st2 = conn.createStatement( > ResultSet.TYPE_FORWARD_ONLY, > ResultSet.CONCUR_READ_ONLY, > ResultSet.CLOSE_CURSORS_AT_COMMIT); > rs2[0] = st2.executeQuery("select * from testtable2"); > Statement st3 = conn.createStatement( > ResultSet.TYPE_FORWARD_ONLY, > ResultSet.CONCUR_READ_ONLY, > ResultSet.HOLD_CURSORS_OVER_COMMIT); > rs3[0] = st3.executeQuery("select * from testtable3"); > return; > } > } > Then with Derby embedded, if I have a JDBC Statement that executes a call to this procedure, rs1 and rs3 will behave with HOLD_CURSORS holdability and rs2 will behave with CLOSE_CURSORS holdability--and that will be the case regardless of the holdability on the Statement that executed the call. That seems correct to me. > But if I do the same thing with Network Server, all of the result sets (rs1, rs2, and rs3) will have the same holdability as the JDBC Statement that executed the call. It doesn't matter what the holdabilities used within the procedure definition are: they will all be over-ridden by the holdability of the Statement that made the call. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira