Updated Branches: refs/heads/cassandra-1.2 a4166496f -> db7759a2c
CQL3 shouldn't lowercase DC names for NTS patch by slebresne; reviewed by jbellis for CASSANDRA-5292 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/db7759a2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/db7759a2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/db7759a2 Branch: refs/heads/cassandra-1.2 Commit: db7759a2cac76d86a9f5b1ca82f7e08cc358c28d Parents: a416649 Author: Sylvain Lebresne <sylv...@datastax.com> Authored: Wed Feb 27 15:43:24 2013 +0100 Committer: Sylvain Lebresne <sylv...@datastax.com> Committed: Wed Feb 27 15:46:17 2013 +0100 ---------------------------------------------------------------------- CHANGES.txt | 1 + NEWS.txt | 18 +++++++++++++++ .../apache/cassandra/cql3/PropertyDefinitions.java | 7 +----- 3 files changed, 20 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/db7759a2/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index b19b092..85e283a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,7 @@ 1.2.3 * Avoid allocating SSTableBoundedScanner during repair when the range does not intersect the sstable (CASSANDRA-5249) + * Don't lowercase property map keys (this breaks NTS) (CASSANDRA-5292) Merged from 1.1: * nodetool: ability to repair specific range (CASSANDRA-5280) * Fix possible assertion triggered in SliceFromReadCommand (CASSANDRA-5284) http://git-wip-us.apache.org/repos/asf/cassandra/blob/db7759a2/NEWS.txt ---------------------------------------------------------------------- diff --git a/NEWS.txt b/NEWS.txt index 5b4f478..01db820 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -8,6 +8,24 @@ upgrade, just in case you need to roll back to the previous version. (Cassandra version X + 1 will always be able to read data files created by version X, but the inverse is not necessarily the case.) +1.2.3 +===== + +Upgrading +--------- + - CQL3 uses to be case-insensitive for property map key in ALTER and CREATE + statements. In other words: + CREATE KEYSPACE test WITH replication = { 'CLASS' : 'SimpleStrategy', + 'REPLICATION_FACTOR' : '1' } + was allowed. However, this was not consistent with the fact that string + literal are case sensitive in every other places and more importantly this + break NetworkTopologyStrategy for which DC names are case sensitive. Those + property map key are now case sensitive. So the statement above should be + changed to: + CREATE KEYSPACE test WITH replication = { 'class' : 'SimpleStrategy', + 'replication_factor' : '1' } + + 1.2.2 ===== http://git-wip-us.apache.org/repos/asf/cassandra/blob/db7759a2/src/java/org/apache/cassandra/cql3/PropertyDefinitions.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/cql3/PropertyDefinitions.java b/src/java/org/apache/cassandra/cql3/PropertyDefinitions.java index 3db84fa..ba83e45 100644 --- a/src/java/org/apache/cassandra/cql3/PropertyDefinitions.java +++ b/src/java/org/apache/cassandra/cql3/PropertyDefinitions.java @@ -38,12 +38,7 @@ public class PropertyDefinitions public void addProperty(String name, Map<String, String> value) throws SyntaxException { - // Lowercase the map keys to be nice to users - Map<String, String> lowerCased = new HashMap<String, String>(value.size()); - for (Map.Entry<String, String> entry : value.entrySet()) - lowerCased.put(entry.getKey().toLowerCase(), entry.getValue()); - - if (properties.put(name, lowerCased) != null) + if (properties.put(name, value) != null) throw new SyntaxException(String.format("Multiple definition for property '%s'", name)); }