Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 11703 invoked from network); 26 Nov 2007 04:57:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Nov 2007 04:57:37 -0000 Received: (qmail 90394 invoked by uid 500); 26 Nov 2007 04:57:25 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 90359 invoked by uid 500); 26 Nov 2007 04:57:25 -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 90350 invoked by uid 99); 26 Nov 2007 04:57:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Nov 2007 20:57:25 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [76.96.62.24] (HELO QMTA02.westchester.pa.mail.comcast.net) (76.96.62.24) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2007 04:57:03 +0000 Received: from OMTA02.westchester.pa.mail.comcast.net ([76.96.62.19]) by QMTA02.westchester.pa.mail.comcast.net with comcast id HBs71Y0010QuhwU050MM00; Mon, 26 Nov 2007 04:57:05 +0000 Received: from speedy ([24.16.216.208]) by OMTA02.westchester.pa.mail.comcast.net with comcast id HGx41Y0064WMPZk0300000; Mon, 26 Nov 2007 04:57:05 +0000 X-Authority-Analysis: v=1.0 c=1 a=o36Ru-Bsbf4A:10 a=mV9VRH-2AAAA:8 a=Me9G01nOmPo8Bd43Rq8A:9 a=vFH7EUTWhpj4lhESa7cA:7 a=BgOiDjtVFs9y3QjwNKvFJp8uviQA:4 a=KdsN9ty_cgEA:10 a=88iI8knYSJUA:10 a=oltf0pfCdT4A:10 From: "James F. Adams" To: Subject: RE: [jira] Assigned: (DERBY-3157) Lexical error (EOF) when comment consists of a single character Date: Sun, 25 Nov 2007 20:57:02 -0800 Message-ID: <000001c82fe8$c9733d30$0b00a8c0@speedy> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6822 Importance: Normal Thread-Index: Acgvs9F3UsrjLwoZTM65rMZoC9PIlAAMraQg In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Virus-Checked: Checked by ClamAV on apache.org 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 "" at line 2, column 35. Instead of: ERROR XCY04: Invalid syntax for optimizer overrides. The syntax should = be -- DERBY-PROPERTIES propertyName =3D value [, propertyName =3D 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]=20 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)" writes: > [=20 > = https://issues.apache.org/jira/browse/DERBY-3157?page=3Dcom.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=F8y 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=20 >> more whitespace at the beginning of the comment doesn't help. PreparedStatement ps =3D c.prepareStatement("VALUES 1 -- x"); Exception = in thread "main" java.sql.SQLSyntaxErrorException: Lexical error at line 1, column 14. Encountered: 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(Unk= now n Source) >> at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknow= n 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.(Unknown Source) >> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown = Source) >> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(Unknown = Source) >> at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.(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: after : "". >> at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) >> at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcro= ssD RDA(Unknown Source) >> ... 14 more >> Caused by: ERROR 42X02: Lexical error at line 1, column 14. = Encountered: 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.prepareIn= ter 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. > > --=20 Dag H. Wanvik Sun Microsystems, Database Technology Group (DBTG) Haakon VII gt. 7b, N-7485 Trondheim, Norway Tel: x43496/+47 73842196, Fax: +47 73842101