cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giovanni Gargani (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-5300) Insufficient validation of UPDATE queries against counter cfs
Date Fri, 01 Mar 2013 10:05:13 GMT

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

Giovanni Gargani commented on CASSANDRA-5300:
---------------------------------------------

I welcomed it as nice feature, too. Forcing a defined value in a counter does have uses (i.e.,
when you have a cap to the value a counter can reach)
                
> Insufficient validation of UPDATE queries against counter cfs
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-5300
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5300
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0
>            Reporter: Aleksey Yeschenko
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.3
>
>         Attachments: 5300.txt
>
>
> {noformat}
> CREATE TABLE demo (
>   id int PRIMARY KEY,
>   c counter
> )
> {noformat}
> This is expected:
> {noformat}
> insert into demo (id, c) VALUES ( 0, 20);
> Bad Request: INSERT statement are not allowed on counter tables, use UPDATE instead
> {noformat}
> This should also be forbidden, but it is not:
> {noformat}
> update demo set c = 20 where id = 0;
> select * from demo;
>  id | c
> ----+----
>   0 | 20
> {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

Mime
View raw message