You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2007/10/29 12:30:53 UTC
[jira] Created: (DERBY-3157) Lexical error (EOF) when comment
consists of a single character
Lexical error (EOF) when comment consists of a single character
---------------------------------------------------------------
Key: DERBY-3157
URL: https://issues.apache.org/jira/browse/DERBY-3157
Project: Derby
Issue Type: Bug
Components: SQL
Affects Versions: 10.3.1.4, 10.4.0.0
Reporter: Knut Anders Hatlen
Priority: Minor
The following statement fails with an SQLException. Adding whitespace or other characters at the end of the comment makes it pass. Adding more whitespace at the beginning of the comment doesn't help.
PreparedStatement ps = c.prepareStatement("VALUES 1 -- x");
Exception in thread "main" java.sql.SQLSyntaxErrorException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at comment.main(comment.java:5)
Caused by: java.sql.SQLException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 14 more
Caused by: ERROR 42X02: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
... 8 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3157) Lexical error (EOF) when comment
consists of a single character
Posted by "James F. Adams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James F. Adams updated DERBY-3157:
----------------------------------
Derby Info: (was: [Patch Available])
Removing patch available flag. An error occurs in derbyAll. I am investigating and will post a new patch when fixed.
> Lexical error (EOF) when comment consists of a single character
> ---------------------------------------------------------------
>
> Key: DERBY-3157
> URL: https://issues.apache.org/jira/browse/DERBY-3157
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.3.1.4, 10.4.0.0
> Reporter: Knut Anders Hatlen
> Assignee: James F. Adams
> Priority: Minor
> Attachments: DERBY-3157.diff
>
>
> The following statement fails with an SQLException. Adding whitespace or other characters at the end of the comment makes it pass. Adding more whitespace at the beginning of the comment doesn't help.
> PreparedStatement ps = c.prepareStatement("VALUES 1 -- x");
> Exception in thread "main" java.sql.SQLSyntaxErrorException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
> at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at comment.main(comment.java:5)
> Caused by: java.sql.SQLException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
> ... 14 more
> Caused by: ERROR 42X02: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
> ... 8 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3157) Lexical error (EOF) when comment
consists of a single character
Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kathey Marsden updated DERBY-3157:
----------------------------------
Issue & fix info: [Repro attached]
Urgency: Normal
Triaged for 10.5.2. Set normal urgency.
> Lexical error (EOF) when comment consists of a single character
> ---------------------------------------------------------------
>
> Key: DERBY-3157
> URL: https://issues.apache.org/jira/browse/DERBY-3157
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.3.1.4, 10.4.1.3
> Reporter: Knut Anders Hatlen
> Priority: Minor
> Attachments: DERBY-3157.diff
>
>
> The following statement fails with an SQLException. Adding whitespace or other characters at the end of the comment makes it pass. Adding more whitespace at the beginning of the comment doesn't help.
> PreparedStatement ps = c.prepareStatement("VALUES 1 -- x");
> Exception in thread "main" java.sql.SQLSyntaxErrorException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
> at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at comment.main(comment.java:5)
> Caused by: java.sql.SQLException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
> ... 14 more
> Caused by: ERROR 42X02: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
> ... 8 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3157) Lexical error (EOF) when comment
consists of a single character
Posted by "James F. Adams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James F. Adams updated DERBY-3157:
----------------------------------
Attachment: DERBY-3157.diff
Attached patch proposal DERBY-3157.diff for review.
I simplified the processing of end of line comments in order to correct certain termination conditions. A few addtional tests were added.
Running derbyall and suites.All.
> Lexical error (EOF) when comment consists of a single character
> ---------------------------------------------------------------
>
> Key: DERBY-3157
> URL: https://issues.apache.org/jira/browse/DERBY-3157
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.3.1.4, 10.4.0.0
> Reporter: Knut Anders Hatlen
> Assignee: James F. Adams
> Priority: Minor
> Attachments: DERBY-3157.diff
>
>
> The following statement fails with an SQLException. Adding whitespace or other characters at the end of the comment makes it pass. Adding more whitespace at the beginning of the comment doesn't help.
> PreparedStatement ps = c.prepareStatement("VALUES 1 -- x");
> Exception in thread "main" java.sql.SQLSyntaxErrorException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
> at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at comment.main(comment.java:5)
> Caused by: java.sql.SQLException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
> ... 14 more
> Caused by: ERROR 42X02: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
> ... 8 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (DERBY-3157) Lexical error (EOF) when comment
consists of a single character
Posted by "James F. Adams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James F. Adams reassigned DERBY-3157:
-------------------------------------
Assignee: James F. Adams
> Lexical error (EOF) when comment consists of a single character
> ---------------------------------------------------------------
>
> Key: DERBY-3157
> URL: https://issues.apache.org/jira/browse/DERBY-3157
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.3.1.4, 10.4.0.0
> Reporter: Knut Anders Hatlen
> Assignee: James F. Adams
> Priority: Minor
>
> The following statement fails with an SQLException. Adding whitespace or other characters at the end of the comment makes it pass. Adding more whitespace at the beginning of the comment doesn't help.
> PreparedStatement ps = c.prepareStatement("VALUES 1 -- x");
> Exception in thread "main" java.sql.SQLSyntaxErrorException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
> at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at comment.main(comment.java:5)
> Caused by: java.sql.SQLException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
> ... 14 more
> Caused by: ERROR 42X02: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
> ... 8 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3157) Lexical error (EOF) when comment
consists of a single character
Posted by "James F. Adams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James F. Adams updated DERBY-3157:
----------------------------------
Derby Info: [Patch Available]
> Lexical error (EOF) when comment consists of a single character
> ---------------------------------------------------------------
>
> Key: DERBY-3157
> URL: https://issues.apache.org/jira/browse/DERBY-3157
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.3.1.4, 10.4.0.0
> Reporter: Knut Anders Hatlen
> Assignee: James F. Adams
> Priority: Minor
> Attachments: DERBY-3157.diff
>
>
> The following statement fails with an SQLException. Adding whitespace or other characters at the end of the comment makes it pass. Adding more whitespace at the beginning of the comment doesn't help.
> PreparedStatement ps = c.prepareStatement("VALUES 1 -- x");
> Exception in thread "main" java.sql.SQLSyntaxErrorException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
> at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at comment.main(comment.java:5)
> Caused by: java.sql.SQLException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
> ... 14 more
> Caused by: ERROR 42X02: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
> ... 8 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3157) Lexical error (EOF) when comment
consists of a single character
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538545 ]
Dag H. Wanvik commented on DERBY-3157:
--------------------------------------
This happens when the lexer pops out of one of the states LOOKFOR_DE*
MORE productions (because there is longer a chance of finding
--derby-properties) *and* there are no more characters forthcoming.
This is an error,
cf. https://javacc.dev.java.net/doc/tokenmanager.html:
"Whenever the end of file <EOF> is detected, it causes the creation
of an <EOF> token (regardless of the current state of the lexical
analyzer). However, if an <EOF> is detected in the middle of a
match for a regular expression, or immediately after a MORE regular
expression has been matched, an error is reported.
The last condition applies, so the SKIP production:
<IT_IS_NOT_DERBYPROPERTIES_COMMENT> SKIP :
{
<SINGLE_LINE_SQLCOMMENT: (~["\n","\r"])* ("\n"|"\r"|"\r\n")?> : DEFAULT
}
which is supposed to catch this doesn't apply unless there is at least
one more character. So, for example all of these will fail:
-- x
-- dx
-- derby-prox
-- derby-propx
whereas these will all work:
-- xx
-- dxx
-- derby-proxx
-- derby-propxx
The first 'x' is chewed when in a MORE state, so next is EOF.
> Lexical error (EOF) when comment consists of a single character
> ---------------------------------------------------------------
>
> Key: DERBY-3157
> URL: https://issues.apache.org/jira/browse/DERBY-3157
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.3.1.4, 10.4.0.0
> Reporter: Knut Anders Hatlen
> Priority: Minor
>
> The following statement fails with an SQLException. Adding whitespace or other characters at the end of the comment makes it pass. Adding more whitespace at the beginning of the comment doesn't help.
> PreparedStatement ps = c.prepareStatement("VALUES 1 -- x");
> Exception in thread "main" java.sql.SQLSyntaxErrorException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
> at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at comment.main(comment.java:5)
> Caused by: java.sql.SQLException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
> ... 14 more
> Caused by: ERROR 42X02: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
> ... 8 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
RE: [jira] Assigned: (DERBY-3157) Lexical error (EOF) when comment consists of a single character
Posted by "James F. Adams" <ja...@comcast.net>.
Dag,
The patch collapses the single character productions used to search for
DERBY-PROPERTIES and seems to take care of the specified cases.
However, the following input in lang/optimizerOverrides.sql
select * from t1 --derby-properties
;
Generates:
ERROR 42X01: Syntax error: Encountered "<EOF>" at line 2, column 35.
Instead of:
ERROR XCY04: Invalid syntax for optimizer overrides. The syntax should be --
DERBY-PROPERTIES propertyName = value [, propertyName = value]*
When run using the DerbyNetClient framework. The test passes when using the
embedded framework. I never determined what caused this change in
behaviour.
-----Original Message-----
From: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM]
Sent: Sunday, November 25, 2007 2:37 PM
To: derby-dev@db.apache.org
Subject: Re: [jira] Assigned: (DERBY-3157) Lexical error (EOF) when comment
consists of a single character
"James F. Adams (JIRA)" <ji...@apache.org> writes:
> [
> https://issues.apache.org/jira/browse/DERBY-3157?page=com.atlassian.ji
> ra.plugin.system.issuetabpanels:all-tabpanel ]
>
> James F. Adams reassigned DERBY-3157:
> -------------------------------------
>
> Assignee: (was: James F. Adams)
I see you unassigned yourself, James. You posted a patch, which I apparentøy
still has some problems, could you comment on what residual issues there
might be with it, or do you consider it a dead end? (I didn't look closely
at it ;)
Thanks,
Dag
>
>> Lexical error (EOF) when comment consists of a single character
>> ---------------------------------------------------------------
>>
>> Key: DERBY-3157
>> URL: https://issues.apache.org/jira/browse/DERBY-3157
>> Project: Derby
>> Issue Type: Bug
>> Components: SQL
>> Affects Versions: 10.3.1.4, 10.4.0.0
>> Reporter: Knut Anders Hatlen
>> Priority: Minor
>> Attachments: DERBY-3157.diff
>>
>>
>> The following statement fails with an SQLException. Adding whitespace
>> or other characters at the end of the comment makes it pass. Adding
>> more whitespace at the beginning of the comment doesn't help.
PreparedStatement ps = c.prepareStatement("VALUES 1 -- x"); Exception in
thread "main" java.sql.SQLSyntaxErrorException: Lexical error at line 1,
column 14. Encountered: <EOF> after : "".
>> at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
>> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
>> at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknow
n Source)
>> at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
>> at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
>> at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown
Source)
>> at
org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
>> at
org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
>> at
org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
>> at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown
Source)
>> at
org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
>> at
org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
>> at comment.main(comment.java:5)
>> Caused by: java.sql.SQLException: Lexical error at line 1, column 14.
Encountered: <EOF> after : "".
>> at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
>> at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossD
RDA(Unknown Source)
>> ... 14 more
>> Caused by: ERROR 42X02: Lexical error at line 1, column 14. Encountered:
<EOF> after : "".
>> at
org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
>> at
org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
>> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown
Source)
>> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown
Source)
>> at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInter
nalStatement(Unknown Source)
>> ... 8 more
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
--
Dag H. Wanvik
Sun Microsystems, Database Technology Group (DBTG)
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax: +47 73842101
Re: [jira] Assigned: (DERBY-3157) Lexical error (EOF) when comment
consists of a single character
Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
"James F. Adams (JIRA)" <ji...@apache.org> writes:
> [ https://issues.apache.org/jira/browse/DERBY-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> James F. Adams reassigned DERBY-3157:
> -------------------------------------
>
> Assignee: (was: James F. Adams)
I see you unassigned yourself, James. You posted a patch, which I
apparentøy still has some problems, could you comment on what residual
issues there might be with it, or do you consider it a dead end? (I
didn't look closely at it ;)
Thanks,
Dag
>
>> Lexical error (EOF) when comment consists of a single character
>> ---------------------------------------------------------------
>>
>> Key: DERBY-3157
>> URL: https://issues.apache.org/jira/browse/DERBY-3157
>> Project: Derby
>> Issue Type: Bug
>> Components: SQL
>> Affects Versions: 10.3.1.4, 10.4.0.0
>> Reporter: Knut Anders Hatlen
>> Priority: Minor
>> Attachments: DERBY-3157.diff
>>
>>
>> The following statement fails with an SQLException. Adding whitespace or other characters at the end of the comment makes it pass. Adding more whitespace at the beginning of the comment doesn't help.
>> PreparedStatement ps = c.prepareStatement("VALUES 1 -- x");
>> Exception in thread "main" java.sql.SQLSyntaxErrorException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
>> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
>> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
>> at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
>> at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
>> at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
>> at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
>> at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
>> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
>> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
>> at comment.main(comment.java:5)
>> Caused by: java.sql.SQLException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
>> at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
>> ... 14 more
>> Caused by: ERROR 42X02: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
>> at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
>> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
>> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
>> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
>> at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
>> ... 8 more
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
--
Dag H. Wanvik
Sun Microsystems, Database Technology Group (DBTG)
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax: +47 73842101
[jira] Assigned: (DERBY-3157) Lexical error (EOF) when comment
consists of a single character
Posted by "James F. Adams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James F. Adams reassigned DERBY-3157:
-------------------------------------
Assignee: (was: James F. Adams)
> Lexical error (EOF) when comment consists of a single character
> ---------------------------------------------------------------
>
> Key: DERBY-3157
> URL: https://issues.apache.org/jira/browse/DERBY-3157
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.3.1.4, 10.4.0.0
> Reporter: Knut Anders Hatlen
> Priority: Minor
> Attachments: DERBY-3157.diff
>
>
> The following statement fails with an SQLException. Adding whitespace or other characters at the end of the comment makes it pass. Adding more whitespace at the beginning of the comment doesn't help.
> PreparedStatement ps = c.prepareStatement("VALUES 1 -- x");
> Exception in thread "main" java.sql.SQLSyntaxErrorException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
> at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> at comment.main(comment.java:5)
> Caused by: java.sql.SQLException: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
> ... 14 more
> Caused by: ERROR 42X02: Lexical error at line 1, column 14. Encountered: <EOF> after : "".
> at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
> ... 8 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.