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

[CQL] Inconsistent handling double dollar sign for strings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Low
    • Resolution: Unresolved
    • None
    • Legacy/CQL
    • None
    • Low

    Description

      Double dollar signs is a [built-in method for escaping columns that may contain single quotes in its content](https://docs.datastax.com/en/cql/3.3/cql/cql_reference/escape_char_r.html). The way this is handled however is not consistent, in the sense that it allows for $ to appear in the middle of the string but not in the last char.

      Examples:

      Valid: insert into users(id, name) values(1, $$john$$)
      Inserts the string john

      Valid: insert into users(id, name) values(1, $$jo$hn$$)
      Inserts the string jo$hn

      Valid: insert into users(id, name) values(1, $$$john$$)
      Inserts the string $john

      Invalid: insert into users(id, name) values(1, $$john$$$)

      Fails with:

      Invalid syntax at line 1, char 48
        insert into users(id, name) values(1, $$john$$$);
      

      Attachments

        Activity

          People

            mychal Michał Szczygieł
            picadoh Hugo Picado
            Michał Szczygieł
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: