Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 932AE10A55 for ; Mon, 13 Jan 2014 21:49:14 +0000 (UTC) Received: (qmail 62720 invoked by uid 500); 13 Jan 2014 21:28:36 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 62702 invoked by uid 500); 13 Jan 2014 21:28:35 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 62678 invoked by uid 99); 13 Jan 2014 21:28:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jan 2014 21:28:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of v.prudnikov@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-ob0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jan 2014 21:28:29 +0000 Received: by mail-ob0-f172.google.com with SMTP id gq1so8385673obb.3 for ; Mon, 13 Jan 2014 13:28:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=tdYaVx+iki+d0oHo8UWDq8gd+dTFr6dXpThZDVde1+w=; b=YBuw4SoG5yR44tbEooNe7I8VRRM+5+bBtw2CzoTtyomaZ/IGx+8VcNEwnSZvVdOecf 9E4hYPoorHNPTdoQWrgNR9LaC/1mnPOsHtDTGDUK+HqIFxMFqawqWqkawq+D+3/zTE8U QrQkNBVyfSyLB5JyoNbzb4ML/dw5vjQLj+THlvkfoO1kJQuV5DGlxMj2GfbVnIzJjdVE QoPEwsgau0ofFkCRc9OAj4weEdR0j7jJlHVlw28qJaE1xnLNIYl3/l4ulT8bxlX+y9j1 YI1V9qVDC9xGw/PBjN2M6hxcU+OCy00uOcmTiCU85kf+9+AVphRcf3JSA7ivcT54YRq4 K1lg== X-Received: by 10.60.135.130 with SMTP id ps2mr22364451oeb.46.1389648488672; Mon, 13 Jan 2014 13:28:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.176.68 with HTTP; Mon, 13 Jan 2014 13:27:24 -0800 (PST) In-Reply-To: <891BD3BF4E34CF47833A088BCFCA8A4D01A5D149@SW550MBPX041.visa.com> References: <891BD3BF4E34CF47833A088BCFCA8A4D01A5D149@SW550MBPX041.visa.com> From: Vladimir Prudnikov Date: Mon, 13 Jan 2014 22:27:24 +0100 Message-ID: Subject: Re: Problem inserting set when query contains IF NOT EXISTS. To: user Content-Type: multipart/alternative; boundary=047d7b3a9cb087b63404efe0c017 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3a9cb087b63404efe0c017 Content-Type: text/plain; charset=UTF-8 Sorry, I thought I was running the latest version, but it was on this instance... [cqlsh 4.1.0 | Cassandra 2.0.1-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 19.37.0] I tried with 2.0.4 and it works just fine. On Mon, Jan 13, 2014 at 9:07 PM, Huang, Roger wrote: > Validimir, > > Thanks what version of Cassandra? > > -Roger > > > > > > *From:* Vladimir Prudnikov [mailto:v.prudnikov@gmail.com] > *Sent:* Monday, January 13, 2014 11:57 AM > *To:* user > *Subject:* Problem inserting set when query contains IF NOT EXISTS. > > > > Hi all, > > I've spend a lot of time finding a bug in system, but it turns out that > the problem is in Cassandra. > > > > Here is how to reproduce. > > > > ============= > > CREATE KEYSPACE IF NOT EXISTS test_set WITH REPLICATION = { 'class' : > 'SimpleStrategy', 'replication_factor' : 1 }; > > USE test_set; > > > > CREATE TABLE IF NOT EXISTS user ( > > key timeuuid PRIMARY KEY, > > username text, > > email text, > > first_name text, > > last_name text, > > features set, > > ) WITH caching='all'; > > > > INSERT INTO user(key,username,email,first_name,last_name,features) VALUES > (now(),'ainsttp0ess2kiphu2pe1bbrle',' > l3b7brn6jp9e8s0mmsr7ae55t4@mmcm4jf9a9g9b95c053ksbsi18.com','gqh9ekmv6vc9nf1ce8eo3rjcdd','fmg92158br9ddivoj59417q514',{'i6v8i4a5gpnris5chjibllqf0','480m4c1obiq61ilii1g7rm0v17','50kovlifrtrtqihnvmbefaeacl'}) > IF NOT EXISTS; > > > > select * from user; > > ============== > > > > The problem here is that user.features is null instead of set of 3 strings. > > If you remove `IF NOT EXISTS` it executes correctly and set of string will > be inserted. > > > > I don't see any problem with the queries, seems to be the problem with C*. > > > > -- > Vladimir Prudnikov > -- Vladimir Prudnikov --047d7b3a9cb087b63404efe0c017 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sorry, I thought I was running the latest version, bu= t it was on this instance...

[cqlsh 4.1.0 | Cassandra 2= .0.1-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 19.37.0]

I tried with 2.0.4 and it works just fine.


On Mon, Jan 13, 2014 at 9:07 = PM, Huang, Roger <rohuang@visa.com> wrote:

Validimir,<= /span>

Thanks what version of Ca= ssandra?

-Roger

=C2=A0

=C2=A0

From: Vladimir= Prudnikov [mailto:v.prudnikov@gmail.com]
Sent: Monday, January 13, 2014 11:57 AM
To: user
Subject: Problem inserting set when query contains IF NOT EXISTS.=

=C2=A0

Hi all,=C2=A0

I've spend a lot of time finding a bug in system= , but it turns out that the problem is in Cassandra.

=C2=A0

Here is how to reproduce.

=C2=A0

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

CREATE KEYSPACE IF NOT EXISTS test_set WITH REPLICAT= ION =3D { 'class' : 'SimpleStrategy', 'replication_fact= or' : 1 };

USE test_set;

=C2=A0

CREATE TABLE IF NOT EXISTS user (

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 key timeuuid PRIMARY KEY,

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 username text,

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 email text,

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 first_name text,

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 last_name text,

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 features set<text>,

) WITH caching=3D'all';

=C2=A0

=C2=A0

select * from user;

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=C2=A0

The problem here is that user.features is null inste= ad of set of 3 strings.

If you remove `IF NOT EXISTS` it executes correctly = and set of string will be inserted.

=C2=A0

I don't see any problem with the queries, seems = to be the problem with C*.

=C2=A0

--
Vladimir Prudnikov




--
Vladimir Pru= dnikov
--047d7b3a9cb087b63404efe0c017--