Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-12189

$$ escaped string literals are not handled correctly in cqlsh

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 3.8
    • Component/s: Legacy/Tools
    • Labels:
      None
    • Severity:
      Normal
    • Since Version:

      Description

      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:

      INSERT INTO test.test (id) values (
      ...$$<xml/>
      

      fails with a syntax error at the forward slash.

      Both pgStringLiteral and unclosedPgString fail with the following string

      $$a$b$$
      

      where this is allowed by the CQL lexer rule.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mike_tr_adamson Mike Adamson
                Reporter:
                mike_tr_adamson Mike Adamson
                Authors:
                Mike Adamson
                Reviewers:
                Alex Petrov
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: