Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
-
None
-
Normal
-
Newcomer
-
Embedded/Client difference
Description
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.
Attachments
Attachments
Issue Links
- is duplicated by
-
DERBY-3626 Issue with bracketed SQL comments on a remote database connection from ij
- Closed
- is related to
-
DERBY-5011 [patch] Client driver lexer to determine statement type: fix bad attempt at incrementing a variable
- Closed