cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/3] git commit: Fix thrift validation when inserting in CQL3 tables
Date Wed, 21 Aug 2013 07:04:05 GMT
Updated Branches:
  refs/heads/trunk a380cd1d0 -> 1bb1ffbc0


Fix thrift validation when inserting in CQL3 tables

Fixup for #5138


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

Branch: refs/heads/trunk
Commit: 7a300c2a5e84cc39d1ac7e97dbf2f16a5e0013bc
Parents: 667ec27
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Aug 20 18:40:14 2013 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Aug 21 09:00:08 2013 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                | 1 +
 src/java/org/apache/cassandra/thrift/ThriftValidation.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a300c2a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index cdb2ddef..3cae204 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.0
+ * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138)
 Merged from 1.2:
  * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900)
  * Don't announce schema version until we've loaded the changes locally

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a300c2a/src/java/org/apache/cassandra/thrift/ThriftValidation.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/ThriftValidation.java b/src/java/org/apache/cassandra/thrift/ThriftValidation.java
index ec3bb00..6f6a5eb 100644
--- a/src/java/org/apache/cassandra/thrift/ThriftValidation.java
+++ b/src/java/org/apache/cassandra/thrift/ThriftValidation.java
@@ -242,7 +242,7 @@ public class ThriftValidation
                 int columnIndex = composite.types.size() - (cfDef.hasCollections ? 2 : 1);
                 ByteBuffer CQL3ColumnName = components[columnIndex];
                 ColumnIdentifier columnId = new ColumnIdentifier(CQL3ColumnName, composite.types.get(columnIndex));
-                if (cfDef.columns.get(columnId) == null)
+                if (cfDef.metadata.get(columnId) == null)
                     throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format("Invalid
cell for CQL3 table %s. The CQL3 column component (%s) does not correspond to a defined CQL3
column",
                                                                                         
           metadata.cfName, columnId));
 


Mime
View raw message