You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2012/09/25 18:52:11 UTC

[jira] [Commented] (CASSANDRA-4709) (CQL3) Missing validation for IN queries on column not part of the PK

    [ https://issues.apache.org/jira/browse/CASSANDRA-4709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462961#comment-13462961 ] 

Jonathan Ellis commented on CASSANDRA-4709:
-------------------------------------------

+1
                
> (CQL3) Missing validation for IN queries on column not part of the PK
> ---------------------------------------------------------------------
>
>                 Key: CASSANDRA-4709
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4709
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 1.1.6
>
>         Attachments: 4709.txt
>
>
> Copy-pasting from the original mail (http://mail-archives.apache.org/mod_mbox/cassandra-user/201209.mbox/%3C20120922185826.GO6205@pslp2%3E):
> {noformat}
> [cqlsh 2.2.0 | Cassandra 1.1.5 | CQL spec 3.0.0 | Thrift protocol 19.32.0]
> Use HELP for help.
> cqlsh> 
> cqlsh> create keyspace xpl1 WITH strategy_class ='SimpleStrategy' and strategy_options:replication_factor=1;
> cqlsh> use xpl1;
> cqlsh:xpl1> create table t1 (pk varchar primary key, col1 varchar, col2 varchar);
> cqlsh:xpl1> create index t1_c1 on t1(col1);
> cqlsh:xpl1> create index t1_c2 on t1(col2);
> cqlsh:xpl1> insert into t1  (pk, col1, col2) values ('pk1','foo1','bar1');
> cqlsh:xpl1> insert into t1  (pk, col1, col2) values ('pk1a','foo1','bar1');
> cqlsh:xpl1> insert into t1  (pk, col1, col2) values ('pk1b','foo1','bar1');
> cqlsh:xpl1> insert into t1  (pk, col1, col2) values ('pk1c','foo1','bar1');
> cqlsh:xpl1> insert into t1  (pk, col1, col2) values ('pk2','foo2','bar2');
> cqlsh:xpl1> insert into t1  (pk, col1, col2) values ('pk3','foo3','bar3');
> cqlsh:xpl1> select * from t1 where col2='bar1';
>  pk   | col1 | col2
> ------+------+------
>  pk1b | foo1 | bar1
>   pk1 | foo1 | bar1
>  pk1a | foo1 | bar1
>  pk1c | foo1 | bar1
> cqlsh:xpl1> select * from t1 where col2 in ('bar1', 'bar2') ;
> cqlsh:xpl1> 
> {noformat}
> We should either make that last query work or refuse the query but returning nothing is wrong.

--
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