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

COMPACT STORAGE queries on dense static tables accept hidden column1 and value columns

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Awaiting Feedback
    • Priority: Low
    • Resolution: Unresolved
    • Fix Version/s: 3.0.x, 3.11.x
    • Component/s: Legacy/Core
    • Labels:
    • Severity:
      Low
    • Complexity:
      Low Hanging Fruit

      Description

      Test for the issue:

          @Test
          public void testCompactStorage() throws Throwable
          {
              createTable("CREATE TABLE %s (a int PRIMARY KEY, b int, c int) WITH COMPACT STORAGE");
              assertInvalid("INSERT INTO %s (a, b, c, column1) VALUES (?, ?, ?, ?)", 1, 1, 1, ByteBufferUtil.bytes('a'));
              // This one fails with Some clustering keys are missing: column1, which is still wrong
              assertInvalid("INSERT INTO %s (a, b, c, value) VALUES (?, ?, ?, ?)", 1, 1, 1, ByteBufferUtil.bytes('a'));       
              assertInvalid("INSERT INTO %s (a, b, c, column1, value) VALUES (?, ?, ?, ?, ?)", 1, 1, 1, ByteBufferUtil.bytes('a'), ByteBufferUtil.bytes('b'));
              assertEmpty(execute("SELECT * FROM %s"));
          }
      

      Gladly, these writes are no-op, even though they succeed.

      value and column1 should be completely hidden. Fixing this one should be as easy as just adding validations.

        Attachments

        1. 13917-3.11-testall-2.png
          20 kB
          Aleksandr Sorokoumov
        2. 13917-3.11.png
          19 kB
          Aleksandr Sorokoumov
        3. 13917-3.0-testall-2.png
          37 kB
          Aleksandr Sorokoumov
        4. 13917-3.0.png
          37 kB
          Aleksandr Sorokoumov

          Activity

            People

            • Assignee:
              Gerrrr Aleksandr Sorokoumov
              Reporter:
              ifesdjeen Alex Petrov
              Authors:
              Aleksandr Sorokoumov
              Reviewers:
              Alex Petrov
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: