cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Adamson (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-12189) $$ escaped string literals are not handled correctly in cqlsh
Date Mon, 18 Jul 2016 14:09:20 GMT


Mike Adamson commented on CASSANDRA-12189:

bq. In context of CQLsh I don't see a way to distinguish between the end of input and incorrectly
closed $$. Do you think it's possible?
No, I don't. I couldn't find a way of covering all these cases so I opted for letting it work
correctly for valid input. 

> $$ escaped string literals are not handled correctly in cqlsh
> -------------------------------------------------------------
>                 Key: CASSANDRA-12189
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Mike Adamson
>            Assignee: Mike Adamson
>             Fix For: 3.x
> The syntax rules for pg ($$) escaped string literals in cqlsh do not match the lexer
rule for this type in Lexer.g. 
> The {{unclosedPgString}} rule is not correctly matching pg string literals in multi-line
statements so:
> {noformat}
> INSERT INTO test.test (id) values (
> ...$$<xml/>
> {noformat}
> fails with a syntax error at the forward slash.
> Both {{pgStringLiteral}} and {{unclosedPgString}} fail with the following string
> {noformat}
> $$a$b$$
> {noformat}
> where this is allowed by the CQL lexer rule.

This message was sent by Atlassian JIRA

View raw message