Refuse counters as map keys

patch by michaeledge; reviewed by slebresne for CASSANDRA-10760
This commit is contained in:
Michael Edge 2015-11-26 10:36:33 +01:00 committed by Sylvain Lebresne
parent 3d99418cfd
commit cdf0485b23
2 changed files with 3 additions and 0 deletions

View File

@ -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)

View File

@ -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);
}