[
https://issues.apache.org/jira/browse/CASSANDRA-4796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476639#comment-13476639
]
Jonathan Ellis commented on CASSANDRA-4796:
-------------------------------------------
+1
> composite indexes don't always return results they should
> ---------------------------------------------------------
>
> Key: CASSANDRA-4796
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4796
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Brandon Williams
> Assignee: Sylvain Lebresne
> Fix For: 1.2.0 beta 2
>
> Attachments: 4726.txt
>
>
> composite_index_with_pk_test in the dtests is failing and it reproduces
> manually.
> {noformat}
> cqlsh:foo> CREATE TABLE blogs ( blog_id int,
> time1 int, time2 int, author text,
> content text, PRIMARY KEY (blog_id, time1,
> time2) ) ;
> cqlsh:foo> create index on blogs(author);
> cqlsh:foo> INSERT INTO blogs (blog_id, time1, time2, author, content) VALUES
> (1, 0, 0, 'foo', 'bar1');
> cqlsh:foo> INSERT INTO blogs (blog_id, time1, time2, author, content) VALUES
> (1, 0, 1, 'foo', 'bar2');
> cqlsh:foo> INSERT INTO blogs (blog_id, time1, time2, author, content) VALUES
> (2, 1, 0, 'foo', 'baz');
> cqlsh:foo> INSERT INTO blogs (blog_id, time1, time2, author, content) VALUES
> (3, 0, 1, 'gux', 'qux');
> cqlsh:foo> SELECT blog_id, content FROM blogs WHERE time1 = 1 AND
> author='foo';
> cqlsh:foo>
> {noformat}
> The expected result is:
> {noformat}
> blog_id | time1 | time2 | author | content
> ---------+-------+-------+--------+---------
> 2 | 1 | 0 | foo | baz
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira