dynamobi/dynamobi — Issue #630: [FRG-242] Trailing spaces after semicolon confuse SQL parser
Author: dynamobi-build
Created: 2011-12-30 03:39:29+00:00
State: closed
Labels: FRG, SQL Parser

[reporter="jhyde", created="Wed, 13 Dec 2006 17:22:24 -0500 (GMT-05:00)"]
If there are trailing spaces after the semicolon following a stmt entered via sqlline, get a parse exception. For example,

0: jdbc:> select 1 as one

. . . . . .> from (values (true));{space}

Error: org.eigenbase.sql.parser.SqlParseException: Encountered ";" at line 2, column 21.

Was expecting one of:

"AS" ...

"EXCEPT" ...

"GROUP" ...

"HAVING" ...

"INTERSECT" ...

"ORDER" ...

"OVER" ...

"TABLESAMPLE" ...

"UNION" ...

"WHERE" ...

"WINDOW" ...

...

...

"NATURAL" ...

"JOIN" ...

"INNER" ...

"LEFT" ...

"RIGHT" ...

"FULL" ...

"CROSS" ...

"," ... (state=,code=0)

Interestingly, the problem does not occur if the stmt is on a single line. Problem may be in sqlline.