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

$$ escaped string literals are not handled correctly in cqlsh

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 3.8
    • Legacy/Tools
    • None
    • Normal

    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

              mike_tr_adamson Mike Adamson
              mike_tr_adamson Mike Adamson
              Mike Adamson
              Alex Petrov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: