Please look at primary key which you've defined. Second mutation has
exactly the same primary key - it overwrote row that you previously
had.

On Fri, Aug 28, 2015 at 1:14 PM, Tommy Stendahl
<tommy.stend...@ericsson.com> wrote:
> Hi,
>
> I did a small test using TTL but I didn't get the result I expected.
>
> I did this in sqlsh:
>
> cqlsh> create TABLE foo.bar ( key int, cluster int, col int, PRIMARY KEY
> (key, cluster)) ;
> cqlsh> INSERT INTO foo.bar (key, cluster ) VALUES ( 1,1 );
> cqlsh> SELECT * FROM foo.bar ;
>
>  key | cluster | col
> -----+---------+------
>    1 |       1 | null
>
> (1 rows)
> cqlsh> INSERT INTO foo.bar (key, cluster, col ) VALUES ( 1,1,1 ) USING TTL
> 10;
> cqlsh> SELECT * FROM foo.bar ;
>
>  key | cluster | col
> -----+---------+-----
>    1 |       1 |   1
>
> (1 rows)
>
> <wait for TTL to expire>
>
> cqlsh> SELECT * FROM foo.bar ;
>
>  key | cluster | col
> -----+---------+-----
>
> (0 rows)
>
>
>
> Is this really correct?
> I expected the result from the last select to be:
>
>  key | cluster | col
> -----+---------+------
>    1 |       1 | null
>
> (1 rows)
>
>
> Regards,
> Tommy



-- 
--
Marcin Pietraszek

Reply via email to