You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Vladimir Kuptsov (JIRA)" <ji...@apache.org> on 2013/11/02 12:34:17 UTC

[jira] [Created] (CASSANDRA-6291) Unexpected update result in batch

Vladimir Kuptsov created CASSANDRA-6291:
-------------------------------------------

             Summary: Unexpected update result in batch
                 Key: CASSANDRA-6291
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6291
             Project: Cassandra
          Issue Type: Bug
         Environment: Cassandra 1.2.11
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
Ubuntu 12.04
            Reporter: Vladimir Kuptsov


I tried to execute the following script through the cqlsh console:

CREATE KEYSPACE testspace WITH replication = {'class':'SimpleStrategy', 'replication_factor':1};

USE testspace;

CREATE TABLE test (
	user_id bigint,
	user_data varchar,
	deleted boolean,
	PRIMARY KEY (user_id)
);

BEGIN BATCH
UPDATE test SET deleted=true WHERE user_id=1;
UPDATE test SET deleted=false, user_data='data' WHERE user_id=1;
APPLY BATCH;

After that I tried to fetch data:

cqlsh:testspace> SELECT * FROM test;

 user_id | deleted | user_data
---------+---------+-----------
       1 |    True |      data

As you can see, I've got "true" in the "deleted" column, but the last statement in batch is "UPDATE test SET deleted=false, user_data='data' WHERE user_id=1;"

Moreover the statements order in the batch doesn't influence on the result.



--
This message was sent by Atlassian JIRA
(v6.1#6144)