Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 93180 invoked from network); 8 Mar 2007 03:59:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Mar 2007 03:59:45 -0000 Received: (qmail 64234 invoked by uid 500); 8 Mar 2007 03:59:53 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 64204 invoked by uid 500); 8 Mar 2007 03:59:53 -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 64192 invoked by uid 99); 8 Mar 2007 03:59:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2007 19:59:53 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2007 19:59:44 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2668271406B for ; Wed, 7 Mar 2007 19:59:24 -0800 (PST) Message-ID: <945502.1173326364125.JavaMail.root@brutus> Date: Wed, 7 Mar 2007 19:59:24 -0800 (PST) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2413) Derby allows duplicate cursor names for open PreparedStatements. In-Reply-To: <24259549.1173283644185.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479210 ] Dag H. Wanvik commented on DERBY-2413: -------------------------------------- See also DERBY-1036. As far as I recall, we settled on doing the duplicate check at execution time? > Derby allows duplicate cursor names for open PreparedStatements. > ---------------------------------------------------------------- > > Key: DERBY-2413 > URL: https://issues.apache.org/jira/browse/DERBY-2413 > Project: Derby > Issue Type: Bug > Components: JDBC, Network Client > Affects Versions: 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0 > Reporter: Daniel John Debrunner > Priority: Minor > > The following code does not throw any exception in embedded and client: The second setCursorName should throw an exception. > PreparedStatement ps1 = prepareStatement("SELECT I FROM T FOR UPDATE"); > ps1.setCursorName("TEST_DUP"); > > PreparedStatement ps2 = prepareStatement("SELECT C FROM T FOR UPDATE"); > ps1.setCursorName("TEST_DUP"); > If a prepare of a statement corresponds to a DECLARE CURSOR in SQL, then it would seem that only one DECLARE can exist at any time with a given name. > 14.1 SR 1a) states this for a DECLARE in a SQL client module, but seems to be silent as to what is required when the declare is not a a module definition. > Though the SQL OPEN call must go against a single DECLARE. > The javadoc for Statement.setCursorName says the cursor name must be unique within the connection. > Derby does detect duplicate names for open cursors (ResultSets) within a connection. > Existing application impact is a program is using duplicate names for different open statement objects will hit exceptions if this is fixed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.