You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Dmitriy Ukhlov (JIRA)" <ji...@apache.org> on 2013/12/02 18:20:37 UTC
[jira] [Created] (CASSANDRA-6430) DELETE with IF =
clause doesn't work properly if more then one row are going to be deleted
Dmitriy Ukhlov created CASSANDRA-6430:
-----------------------------------------
Summary: DELETE with IF <field>=<value> clause doesn't work properly if more then one row are going to be deleted
Key: CASSANDRA-6430
URL: https://issues.apache.org/jira/browse/CASSANDRA-6430
Project: Cassandra
Issue Type: Bug
Reporter: Dmitriy Ukhlov
CREATE TABLE test(key int, sub_key int, value text, PRIMARY KEY(key, sub_key) );
INSERT INTO test(key, sub_key, value) VALUES(1,1, '1.1');
INSERT INTO test(key, sub_key, value) VALUES(1,2, '1.2');
INSERT INTO test(key, sub_key, value) VALUES(1,3, '1.3');
SELECT * from test;
key | sub_key | value
-----+---------+-------
1 | 1 | 1.1
1 | 2 | 1.2
1 | 3 | 1.3
DELETE FROM test WHERE key=1 IF value='1.2';
[applied]
-----------
False <=============== I guess second row should be removed
SELECT * from test;
key | sub_key | value
-----+---------+-------
1 | 1 | 1.1
1 | 2 | 1.2
1 | 3 | 1.3
(3 rows)
DELETE FROM test WHERE key=1;
SELECT * from test;
(0 rows) <=========== all rows were removed: OK
--
This message was sent by Atlassian JIRA
(v6.1#6144)