Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 8799 invoked from network); 31 Aug 2009 16:07:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Aug 2009 16:07:57 -0000 Received: (qmail 25705 invoked by uid 500); 31 Aug 2009 16:07:57 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 25598 invoked by uid 500); 31 Aug 2009 16:07:56 -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 25541 invoked by uid 99); 31 Aug 2009 16:07:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Aug 2009 16:07:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Aug 2009 16:07:54 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 21A5C234C1E6 for ; Mon, 31 Aug 2009 09:07:33 -0700 (PDT) Message-ID: <1810900593.1251734853137.JavaMail.jira@brutus> Date: Mon, 31 Aug 2009 09:07:33 -0700 (PDT) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4338) Network client raises error "executeQuery method can not be used for update" when sql is preceded by /* */ comments In-Reply-To: <2088486472.1249481475148.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dag H. Wanvik updated DERBY-4338: --------------------------------- Issue & fix info: [Newcomer] (was: [Patch Available, Newcomer]) > Network client raises error "executeQuery method can not be used for update" when sql is preceded by /* */ comments > ------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-4338 > URL: https://issues.apache.org/jira/browse/DERBY-4338 > Project: Derby > Issue Type: Bug > Components: Network Client > Affects Versions: 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0 > Reporter: Will Gomes > Assignee: Dag H. Wanvik > Fix For: 10.6.0.0 > > Attachments: derby-4338-a.diff, derby-4338-a.stat, derby-4338-b.diff, derby-4338-b.stat, derby-4338-c.diff, derby-4338-c.stat, derby-4338-d.diff, derby-4338-d.stat > > > Network derby client does not properly detect a sql select statement preceded by /* */ comments. As a result the sql appears to be detected as an update statement, and results in the following error: > org.apache.derby.client.am.SqlException: executeQuery method can not be used for update. > at org.apache.derby.client.am.Statement.checkForAppropriateSqlMode(Unknown Source) > at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source) > at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source) > The problem appears to be in Statment.parseSqlAndSetSqlModes(), which only appears to check for "--" style comments. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.