You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jordan West (Jira)" <ji...@apache.org> on 2020/05/11 19:49:00 UTC

[jira] [Updated] (CASSANDRA-15802) Commented-out lines that end in a semicolon cause an error.

     [ https://issues.apache.org/jira/browse/CASSANDRA-15802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jordan West updated CASSANDRA-15802:
------------------------------------
     Bug Category: Parent values: Correctness(12982)Level 1 values: API / Semantic Implementation(12988)
       Complexity: Normal
    Discovered By: User Report
         Severity: Low
           Status: Open  (was: Triage Needed)

This seems to be specific to multi-line comments:

{code}
cqlsh> /* describe keyspaces */
cqlsh> /* describe keyspaces; */
cqlsh> -- describe keyspaces;
cqlsh> -- describe keyspaces
cqlsh> -- describe keyspaces
cqlsh> /*
   ... describe keyspaces;
SyntaxException: line 2:19 mismatched character '<EOF>' expecting '*'
cqlsh> // describe keyspaces;
{code}

{code}
$ cat no-semi.cql
/*
  this is a comment
  with no semi-colon
 */
$ ./bin/cqlsh -f no-semi.cql
$
{code}

{code}
$ cat semi.cql
/*
 this is a multi-line
 comment with a semi-colon;
 */
$ ./bin/cqlsh -f semi.cql
semi.cql:4:SyntaxException: line 3:27 mismatched character '<EOF>' expecting '*'
semi.cql:5:Incomplete statement at end of file
{code}

> 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-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org