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

Bind parameters of collection types are not properly validated

    XMLWordPrintableJSON

Details

    • Correctness - API / Semantic Implementation
    • Normal

    Description

      It looks like C* is not validating properly the bind parameters for collection types. If an element of the collection is invalid the value will not be rejected and might cause an Exception later on.
      The problem can be reproduced with the following test:

          @Test
          public void testInvalidQueries() throws Throwable
          {
              createTable("CREATE TABLE %s (k int PRIMARY KEY, s frozen<set<tuple<int, text, double>>>)");
              execute("INSERT INTO %s (k, s) VALUES (0, ?)", set(tuple(1,"1",1.0,1), tuple(2,"2",2.0,2)));
          }
      

      The invalid Tuple will cause an "IndexOutOfBoundsException: Index: 3, Size: 3"

      Attachments

        Activity

          People

            blerer Benjamin Lerer
            blerer Benjamin Lerer
            Benjamin Lerer
            Andres de la Peña
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: