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

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

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    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.0-upgrade-16.01.2020
          38 kB
          Alex Sorokoumov
        2. 13917-3.11-testall-16.01.2020.png
          27 kB
          Alex Sorokoumov
        3. 13917-3.11-upgrade-16.01.2020.png
          37 kB
          Alex Sorokoumov
        4. 13917-3.0-testall-16.01.2020
          36 kB
          Alex Sorokoumov
        5. 13917-3.0-testall-13.12.2019
          16 kB
          Alex Sorokoumov
        6. 13917-3.11-testall-13.12.2019
          24 kB
          Alex Sorokoumov
        7. 13917-3.11-testall-20.11.2019.png
          28 kB
          Alex Sorokoumov
        8. 13917-3.0-testall-20.11.2019.png
          28 kB
          Alex Sorokoumov
        9. 13917-3.0-testall-2.png
          37 kB
          Alex Sorokoumov
        10. 13917-3.11-testall-2.png
          20 kB
          Alex Sorokoumov
        11. 13917-3.0.png
          37 kB
          Alex Sorokoumov
        12. 13917-3.11.png
          19 kB
          Alex Sorokoumov

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Gerrrr Alex Sorokoumov Assign to me
            ifesdjeen Alex Petrov
            Alex Sorokoumov
            Alex Petrov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment