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

Non-escaped single quotes causes CQL to hang

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Not A Problem
    • None
    • None
    • None
    • Cassandra 1.1.5, RHEL 6.3 x86_64

    Description

      Single quotes in string literals cause CQL to wait indefinitely. This behavior is inherited by clients implementing execute_cql. The end result is a client application that stops responding.

      For example, the following is entered in cqlsh (notice the ellipses):

      cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (1566bb5d-9093-4abd-bcaa-e1ac90b94a47, 'This is a test with Cassandra's reserved characters') USING CONSISTENCY LOCAL_QUORUM;
      ...

      This continues until ctrl-c is issued.

      I would expect a "Bad Request" message returned immediately, which is the behavior here:

      cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (7dcf9529-b57b-4d1d-a396-cff9bc98abb2, 'This is a test without the closing parenthesis in the values section of the insert statement.' USING CONSISTENCY LOCAL_QUORUM;
      Bad Request: line 1:176 missing ')' at 'USING'

      Attachments

        Activity

          People

            Unassigned Unassigned
            jwellonen Jason Wellonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: