cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/5] cassandra git commit: Refuse counters as map keys
Date Thu, 26 Nov 2015 09:43:20 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 24f842a07 -> 811ffa7bf


Refuse counters as map keys

patch by michaeledge; reviewed by slebresne for CASSANDRA-10760


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

Branch: refs/heads/trunk
Commit: cdf0485b23de6d2b746393237da3cfea9d0dc4b9
Parents: 3d99418
Author: Michael Edge <edge.michael@gmail.com>
Authored: Thu Nov 26 10:36:33 2015 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu Nov 26 10:36:33 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cdf0485b/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3ede9b7..7978a56 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Properly reject counters as map keys (CASSANDRA-10760)
  * Fix the sstable-needs-cleanup check (CASSANDRA-10740)
  * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
  * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cdf0485b/src/java/org/apache/cassandra/cql3/CQL3Type.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/CQL3Type.java b/src/java/org/apache/cassandra/cql3/CQL3Type.java
index b656de8..db7fa5c 100644
--- a/src/java/org/apache/cassandra/cql3/CQL3Type.java
+++ b/src/java/org/apache/cassandra/cql3/CQL3Type.java
@@ -433,6 +433,8 @@ public interface CQL3Type
 
                 if (keys != null)
                 {
+                    if (keys.isCounter())
+                        throw new InvalidRequestException("Counters are not allowed inside
collections: " + this);
                     if (!frozen && keys.supportsFreezing() && !keys.frozen)
                         throw new InvalidRequestException("Non-frozen collections are not
allowed inside collections: " + this);
                 }


Mime
View raw message