Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 73882 invoked from network); 18 Sep 2006 15:33:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Sep 2006 15:33:01 -0000 Received: (qmail 17814 invoked by uid 500); 18 Sep 2006 15:32:58 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 17778 invoked by uid 500); 18 Sep 2006 15:32:58 -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 17769 invoked by uid 99); 18 Sep 2006 15:32:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2006 08:32:58 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2006 08:32:55 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 57B2B7142F2 for ; Mon, 18 Sep 2006 15:27:23 +0000 (GMT) Message-ID: <25664544.1158593243356.JavaMail.jira@brutus> Date: Mon, 18 Sep 2006 08:27:23 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-1314) Differences between client and embedded when invoking stored procedures using Statement.executeUpdate() In-Reply-To: <11439655.1147267865110.JavaMail.jira@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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1314?page=comments#action_12435498 ] Knut Anders Hatlen commented on DERBY-1314: ------------------------------------------- PROBLEM The behaviour of executeQuery() and executeUpdate() did not match the JDBC specification when invoking stored procedures. SYMPTOMS (1) When invoking a stored procedure with executeQuery() or executeUpdate(), an exception was thrown indicating that the procedure did not return the correct number of ResultSet objects, although the correct number of ResultSet objects was in fact returned. (2) When invoking a stored procedure with executeQuery() or executeUpdate(), and the procedure did not return the correct number of ResultSet objects, the query executed successfully. (3) With the network client driver, when invoking a stored procedure with executeUpdate(), the return value was -1, whereas the JDBC specification says it should be 0. CAUSE The methods executeQuery() and executeUpdate() were not implemented in compliance with the JDBC specification. SOLUTION In Derby 10.2, the behaviour of the methods executeQuery() and executeUpdate() has been changed to match the JDBC specification. WORKAROUND Use execute() instead of executeUpdate()/executeQuery() to invoke a stored procedure which does not return exactly 0 or 1 ResultSet objects. > Differences between client and embedded when invoking stored procedures using Statement.executeUpdate() > ------------------------------------------------------------------------------------------------------- > > Key: DERBY-1314 > URL: http://issues.apache.org/jira/browse/DERBY-1314 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.2.1.0 > Reporter: Knut Anders Hatlen > Assigned To: Knut Anders Hatlen > Fix For: 10.2.1.0 > > Attachments: derby-1314-v1.diff, derby-1314-v1.stat > > > When invoking a stored procedure using Statement.executeUpdate(), the > client driver and the embedded driver behave differently. > If the stored procedure does not return any result set, the embedded > driver returns 0, whereas the client returns -1. > If the stored procedure returns one or more result sets, the embedded > driver returns -1, whereas the client fails with an exception. -- 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