You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Semb Wever (Jira)" <ji...@apache.org> on 2020/08/19 09:37:00 UTC

[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=17180407#comment-17180407 ] 

Michael Semb Wever edited comment on CASSANDRA-15802 at 8/19/20, 9:36 AM:
--------------------------------------------------------------------------

[~RensGroothuijsen], there's two scenarios here that need to be addressed:
 - if the {{/* … */}} is inside a string literal it must not be stripped out
 - if an {{\*/}} is encountered without first encountering an {{/\*}} then the cql parsing needs to fail (rather than strip out everything on that line before the {{*/}}

I've added two more tests [here|https://github.com/apache/cassandra/commit/c62352045f13e946e8f56bc83485e31a3aa73a91] that cover these^. The second needs finishing…


was (Author: michaelsembwever):
[~RensGroothuijsen], there's two scenarios here that need to be addressed:
 - if the {{/* … */}} is inside a string literal it must not be stripped out
 - if an {{*/}} is encountered without first encountering an {{/*}} then the cql parsing needs to fail (rather than strip out everything on that line before the {{*/}}

I've added two more tests [here|https://github.com/apache/cassandra/commit/c62352045f13e946e8f56bc83485e31a3aa73a91] that cover these^. The second needs finishing…

> 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 
>            Assignee: Rens Groothuijsen
>            Priority: Normal
>             Fix For: 4.0-beta
>
>         Attachments: cqlsh.png
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> 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