cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [13/13] git commit: (CLI) properly handle quotes in create/update keyspace commands patch by Pavel Yaskevich; reviewed by Jonathan Ellis (CASSANDRA-4129)
Date Fri, 06 Apr 2012 22:31:34 GMT
(CLI) properly handle quotes in create/update keyspace commands
patch by Pavel Yaskevich; reviewed by Jonathan Ellis (CASSANDRA-4129)


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

Branch: refs/heads/cassandra-1.1
Commit: 17d6354f65592de48525764da4817d03c1e0da1d
Parents: 40515ed
Author: Pavel Yaskevich <xedin@apache.org>
Authored: Fri Apr 6 17:45:25 2012 +0300
Committer: Pavel Yaskevich <xedin@apache.org>
Committed: Fri Apr 6 19:41:25 2012 +0300

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 src/java/org/apache/cassandra/cli/CliClient.java   |    2 +-
 src/java/org/apache/cassandra/cli/CliCompiler.java |    2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/17d6354f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 579b3a5..5a00cb6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
 1.0.10
  * cqlsh: guess correct version of Python for Arch Linux (CASSANDRA-4090)
+ * (CLI) properly handle quotes in create/update keyspace commands (CASSANDRA-4129)
 
 
 1.0.9

http://git-wip-us.apache.org/repos/asf/cassandra/blob/17d6354f/src/java/org/apache/cassandra/cli/CliClient.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java
index dfbcb68..cb91934 100644
--- a/src/java/org/apache/cassandra/cli/CliClient.java
+++ b/src/java/org/apache/cassandra/cli/CliClient.java
@@ -991,7 +991,7 @@ public class CliClient
             return;
         
         // first value is the keyspace name, after that it is all key=value
-        String keyspaceName = statement.getChild(0).getText();
+        String keyspaceName = CliUtils.unescapeSQLString(statement.getChild(0).getText());
         KsDef ksDef = new KsDef(keyspaceName, DEFAULT_PLACEMENT_STRATEGY, new LinkedList<CfDef>());
 
         try

http://git-wip-us.apache.org/repos/asf/cassandra/blob/17d6354f/src/java/org/apache/cassandra/cli/CliCompiler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cli/CliCompiler.java b/src/java/org/apache/cassandra/cli/CliCompiler.java
index d07e408..de43890 100644
--- a/src/java/org/apache/cassandra/cli/CliCompiler.java
+++ b/src/java/org/apache/cassandra/cli/CliCompiler.java
@@ -125,7 +125,7 @@ public class CliCompiler
 
     public static String getKeySpace(Tree statement, List<KsDef> keyspaces)
     {
-        return getKeySpace(statement.getChild(0).getText(), keyspaces);
+        return getKeySpace(CliUtils.unescapeSQLString(statement.getChild(0).getText()), keyspaces);
     }
 
     public static String getKeySpace(String ksName, List<KsDef> keyspaces)


Mime
View raw message