cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r1076500 - /cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java
Date Thu, 03 Mar 2011 02:20:42 GMT
Author: eevans
Date: Thu Mar  3 02:20:41 2011
New Revision: 1076500

URL: http://svn.apache.org/viewvc?rev=1076500&view=rev
Log:
CREATE KEYSPACE needs to be special-cased too

Patch by eevans

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java?rev=1076500&r1=1076499&r2=1076500&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java Thu Mar  3 02:20:41
2011
@@ -432,8 +432,8 @@ public class QueryProcessor
         parser.throwLastRecognitionError();
         String keyspace = null;
         
-        // Chicken-and-egg; No keyspace to get when we're setting one. 
-        if (statement.type != StatementType.USE)
+        // Chicken-and-egg; No keyspace to get when we're setting (or creating) one. 
+        if ((statement.type != StatementType.USE) && (statement.type != StatementType.CREATE_KEYSPACE))
             keyspace = clientState.getKeyspace();
         
         CqlResult avroResult = new CqlResult();



Mime
View raw message