cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [5/5] git commit: Fix inserting only keys in CQL3
Date Tue, 11 Dec 2012 07:54:30 GMT
Fix inserting only keys in CQL3

patch by slebresne; reviewed by jbellis for CASSANDRA-5040


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d6ccfb53
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d6ccfb53
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d6ccfb53

Branch: refs/heads/cassandra-1.2.0
Commit: d6ccfb53cf7a42bba4e49c7f7823bb8c6845f755
Parents: dbbca5e
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Dec 10 09:45:58 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Dec 10 09:45:58 2012 +0100

----------------------------------------------------------------------
 CHANGES.txt                              |    1 +
 src/java/org/apache/cassandra/cql3/Cql.g |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6ccfb53/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b92984d..98b0b1a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@
  * Don't generate UUID based on other node address (CASSANDRA-5002)
  * Fix message when trying to alter a clustering key type (CASSANDRA-5012)
  * Update IAuthenticator to match the new IAuthorizer (CASSANDRA-5003)
+ * Fix inserting only a key in CQL3 (CASSANDRA-5040)
 Merged from 1.1
  * reduce log spam from invalid counter shards (CASSANDRA-5026)
  * Improve schema propagation performance (CASSANDRA-5025)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6ccfb53/src/java/org/apache/cassandra/cql3/Cql.g
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g
index 98585c8..d9bd3e5 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -256,9 +256,9 @@ insertStatement returns [UpdateStatement expr]
         List<Operation> columnOperations = new ArrayList<Operation>();
     }
     : K_INSERT K_INTO cf=columnFamilyName
-          '(' c1=cident { columnNames.add(c1); }  ( ',' cn=cident { columnNames.add(cn);
} )+ ')'
+          '(' c1=cident { columnNames.add(c1); }  ( ',' cn=cident { columnNames.add(cn);
} )* ')'
         K_VALUES
-          '(' v1=set_operation { columnOperations.add(v1); } ( ',' vn=set_operation { columnOperations.add(vn);
} )+ ')'
+          '(' v1=set_operation { columnOperations.add(v1); } ( ',' vn=set_operation { columnOperations.add(vn);
} )* ')'
         ( usingClause[attrs] )?
       {
           $expr = new UpdateStatement(cf, attrs, columnNames, columnOperations);


Mime
View raw message