db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@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
Date Mon, 31 Aug 2009 21:59:33 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dag H. Wanvik updated DERBY-4338:
---------------------------------

    Attachment: derby-151-b.stat
                derby-151-b.diff

Uploading version "b" of this patch. 

- Changed severity to database; updated ErrorCodeTest to reflect this.
  Rationale: It seems right - I don't know that it's safe to continue
  after this kind of error, and I compared to other IO level errors in
  raw store and mostly seem to have database severity. 

- Made the new Derby151Test not fail even if expected error is not
  seen. I did this to allow for possible different behavior on other
  VMs, JUnit verbose mode would instead print "Not able to test fix
  for DERBY-151: No interrupt seen".

- I added the same handling to read (even if not seen yet) as for
  write.  Regressions passed modulo ErrorCodeTest, which i missed
  first time around.

- Fixed some broken Javadocs.

Ready for review.


> 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-151-b.diff, derby-151-b.stat, 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.


Mime
View raw message