cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Stop accepting CQL version 3.0.0-beta1 (in favor of 3.0.0)
Date Tue, 25 Sep 2012 12:37:42 GMT
Updated Branches:
  refs/heads/trunk f177d8e59 -> 2a0389ee0


Stop accepting CQL version 3.0.0-beta1 (in favor of 3.0.0)

patch by slebresne; reviewed by pcannon for CASSANDRA-4649


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

Branch: refs/heads/trunk
Commit: 2a0389ee08843953e20e9d2fa1f2cfc4c6f42636
Parents: f177d8e
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Sep 25 14:35:58 2012 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Sep 25 14:37:33 2012 +0200

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../org/apache/cassandra/cql3/QueryProcessor.java  |    2 +-
 .../org/apache/cassandra/service/ClientState.java  |    7 +++++++
 3 files changed, 9 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a0389ee/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 70b9ae6..c53e556 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 1.2-beta2
  * adjust blockFor calculation to account for pending ranges due to node 
    movement (CASSANDRA-833)
+ * Change CQL version to 3.0.0 and stop accepting 3.0.0-beta1 (CASSANDRA-4649)
 
 1.2-beta1
  * add atomic_batch_mutate (CASSANDRA-4542, -4635)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a0389ee/src/java/org/apache/cassandra/cql3/QueryProcessor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index 0943029..146f775 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -38,7 +38,7 @@ import org.apache.cassandra.utils.SemanticVersion;
 
 public class QueryProcessor
 {
-    public static final SemanticVersion CQL_VERSION = new SemanticVersion("3.0.0-beta1");
+    public static final SemanticVersion CQL_VERSION = new SemanticVersion("3.0.0");
 
     private static final Logger logger = LoggerFactory.getLogger(QueryProcessor.class);
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a0389ee/src/java/org/apache/cassandra/service/ClientState.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/ClientState.java b/src/java/org/apache/cassandra/service/ClientState.java
index 00b6039..ef640af 100644
--- a/src/java/org/apache/cassandra/service/ClientState.java
+++ b/src/java/org/apache/cassandra/service/ClientState.java
@@ -346,6 +346,13 @@ public class ClientState
         SemanticVersion cql = org.apache.cassandra.cql.QueryProcessor.CQL_VERSION;
         SemanticVersion cql3 = org.apache.cassandra.cql3.QueryProcessor.CQL_VERSION;
 
+        // We've made some backward incompatible changes between CQL3 beta1 and the final.
+        // It's ok because it was a beta, but it still mean we don't support 3.0.0-beta1
so reject it.
+        SemanticVersion cql3Beta = new SemanticVersion("3.0.0-beta1");
+        if (version.equals(cql3Beta))
+            throw new InvalidRequestException(String.format("There has been a few syntax
breaking changes between 3.0.0-beta1 and 3.0.0 "
+                                                           + "(mainly the syntax for options
of CREATE KEYSPACE and CREATE TABLE). 3.0.0-beta1 "
+                                                           + " is not supported; please upgrade
to 3.0.0"));
         if (version.isSupportedBy(cql))
             cqlVersion = cql;
         else if (version.isSupportedBy(cql3))


Mime
View raw message