cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xe...@apache.org
Subject svn commit: r1209782 - in /cassandra/branches/cassandra-1.0: CHANGES.txt src/java/org/apache/cassandra/cql/QueryProcessor.java src/java/org/apache/cassandra/thrift/ThriftValidation.java
Date Fri, 02 Dec 2011 23:42:18 GMT
Author: xedin
Date: Fri Dec  2 23:42:18 2011
New Revision: 1209782

URL: http://svn.apache.org/viewvc?rev=1209782&view=rev
Log:
(CQL) Proper ColumnFamily metadata validation on CREATE COLUMNFAMILY
patch by Jonathan Ellis; reviewed by Pavel Yaskevich for CASSANDRA-3565

Modified:
    cassandra/branches/cassandra-1.0/CHANGES.txt
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/cql/QueryProcessor.java
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/thrift/ThriftValidation.java

Modified: cassandra/branches/cassandra-1.0/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/CHANGES.txt?rev=1209782&r1=1209781&r2=1209782&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/CHANGES.txt (original)
+++ cassandra/branches/cassandra-1.0/CHANGES.txt Fri Dec  2 23:42:18 2011
@@ -12,6 +12,7 @@
  * fix default value validation usage in CLI SET command (CASSANDRA-3553)
  * Optimize componentsFor method for compaction and startup time
    (CASSANDRA-3532)
+ * (CQL) Proper ColumnFamily metadata validation on CREATE COLUMNFAMILY (CASSANDRA-3565)
 Merged from 0.8:
  * use cannonical host for local node in nodetool info (CASSANDRA-3556)
 

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/cql/QueryProcessor.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/cql/QueryProcessor.java?rev=1209782&r1=1209781&r2=1209782&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/cql/QueryProcessor.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/cql/QueryProcessor.java
Fri Dec  2 23:42:18 2011
@@ -783,10 +783,12 @@ public class QueryProcessor
                 CreateColumnFamilyStatement createCf = (CreateColumnFamilyStatement)statement.statement;
                 clientState.hasColumnFamilySchemaAccess(Permission.WRITE);
                 validateSchemaAgreement();
-                
+                CFMetaData cfmd = createCf.getCFMetaData(keyspace);
+                ThriftValidation.validateCfDef(cfmd.toThrift(), null);
+
                 try
                 {
-                    applyMigrationOnStage(new AddColumnFamily(createCf.getCFMetaData(keyspace)));
+                    applyMigrationOnStage(new AddColumnFamily(cfmd));
                 }
                 catch (ConfigurationException e)
                 {

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/thrift/ThriftValidation.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/thrift/ThriftValidation.java?rev=1209782&r1=1209781&r2=1209782&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/thrift/ThriftValidation.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/thrift/ThriftValidation.java
Fri Dec  2 23:42:18 2011
@@ -587,7 +587,7 @@ public class ThriftValidation
                     if (cf_def.key_alias.equals(columnDef.name))
                         throw new InvalidRequestException("Invalid column name: "
                                                           + AsciiType.instance.compose(cf_def.key_alias)
-                                                          + ", because it equals to the key_alias.");
+                                                          + ", because it equals the key_alias");
                 }
             }
 



Mime
View raw message