cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom van der Woerdt (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-13116) Don't allow changing the primary key from int to varint
Date Wed, 11 Jan 2017 09:13:58 GMT
Tom van der Woerdt created CASSANDRA-13116:
----------------------------------------------

             Summary: Don't allow changing the primary key from int to varint
                 Key: CASSANDRA-13116
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13116
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Tom van der Woerdt
            Priority: Critical


Simply put :

{code}
cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, 16777216, 2147483647);

 id         | value
------------+-------
          1 |  test
        128 |  test
        256 |  test
      65535 |  test
      65536 |  test
   16777215 |  test
   16777216 |  test
 2147483647 |  test

(8 rows)
cqlsh> alter table foo alter id TYPE varint;
cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, 16777216, 2147483647);

 id         | value
------------+-------
   16777215 |  test
   16777216 |  test
 2147483647 |  test

(3 rows)
cqlsh> select * from foo;

 id         | value
------------+-------
        128 |  test
   16777216 |  test
          1 |  test
 2147483647 |  test
   16777215 |  test
        256 |  test
      65535 |  test
      65536 |  test
{code}

This could really ruin someone's day...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message