cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tianshi Wang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-11513) Result set is not unique on primary key (cql)
Date Wed, 06 Apr 2016 17:48:25 GMT
Tianshi Wang created CASSANDRA-11513:
----------------------------------------

             Summary: Result set is not unique on primary key (cql) 
                 Key: CASSANDRA-11513
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11513
             Project: Cassandra
          Issue Type: Bug
            Reporter: Tianshi Wang


[cqlsh 5.0.1 | Cassandra 3.4 | CQL spec 3.4.0 | Native protocol v4]

Run followings,
{code}
drop table if exists test0;
CREATE TABLE test0 (
    pk int,
    a int,
    b text,
    s text static,
    PRIMARY KEY (pk, a)
);

insert into test0 (pk,a,b,s) values (0,1,'b1','hello b1');
insert into test0 (pk,a,b,s) values (0,2,'b2','hello b2');
insert into test0 (pk,a,b,s) values (0,3,'b3','hello b3');
create index on test0 (b);
insert into test0 (pk,a,b,s) values (0,2,'b2 again','b2 again');
{code}

Now select one record based on primary key, we got all three records.
{code}
cqlsh:ops> select * from test0 where pk=0 and a=2;

 pk | a | s        | b
----+---+----------+----------
  0 | 1 | b2 again |       b1
  0 | 2 | b2 again | b2 again
  0 | 3 | b2 again |       b3
{code}



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

Mime
View raw message