[ 
https://issues.apache.org/jira/browse/CASSANDRA-15802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17107705#comment-17107705
 ] 

Rens Groothuijsen edited comment on CASSANDRA-15802 at 5/14/20, 11:14 PM:
--------------------------------------------------------------------------

[~null-]The parser being unaware that it is currently inside a comment block 
does seem to be the problem. It stops parsing as soon as it encounters an end 
token, and sends the statement without the trailing comment block terminator, 
which then naturally returns a syntax error.

Edit: I think [this 
line|https://github.com/apache/cassandra/blob/trunk/bin/cqlsh.py#L932] is where 
the relevant end token check is happening.


was (Author: rensgroothuijsen):
[~null-]The parser being unaware that it is currently inside a comment block 
does seem to be the problem. It stops parsing as soon as it encounters an end 
token, and sends the statement without the trailing comment block terminator, 
which then naturally returns a syntax error.

> Commented-out lines that end in a semicolon cause an error.
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-15802
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15802
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Interpreter, CQL/Syntax
>            Reporter: null 
>            Priority: Normal
>         Attachments: cqlsh.png
>
>
> Commented-out lines that end in a semicolon cause an error.
> For example:
> /*
> describe keyspaces;
> */
>  
> This produces an error:
> SyntaxException: line 2:22 no viable alternative at input '<EOF> (...*
> describe keyspaces;...)
>  
> It works as expected if you use syntax:
> -- describe keyspaces;
>  
> Environment:
> python:3.7.7-slim-stretch (docker image)
>  
> I found that this was first seen here, and was patched, but the bug appears 
> to have resurfaced:
> https://issues.apache.org/jira/browse/CASSANDRA-2488



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to