cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [3/6] git commit: Fix CQL3 token() function when used with strings
Date Tue, 11 Dec 2012 07:55:04 GMT
Fix CQL3 token() function when used with strings

patch by tjake; reviewed by slebresne for CASSANDRA-5050


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

Branch: refs/heads/trunk
Commit: a399a5644397be6663990a2793bd629f755cd869
Parents: 183b552
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Dec 11 08:53:32 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Dec 11 08:53:32 2012 +0100

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../cassandra/cql3/statements/SelectStatement.java |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a399a564/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ae784e5..115ee45 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,7 @@
  * Fix message when trying to alter a clustering key type (CASSANDRA-5012)
  * Update IAuthenticator to match the new IAuthorizer (CASSANDRA-5003)
  * Fix inserting only a key in CQL3 (CASSANDRA-5040)
+ * Fix CQL3 token() function when used with strings (CASSANDRA-5050)
 Merged from 1.1
  * reduce log spam from invalid counter shards (CASSANDRA-5026)
  * Improve schema propagation performance (CASSANDRA-5025)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a399a564/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 4951998..b41659c 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -370,7 +370,7 @@ public class SelectStatement implements CQLStatement
         if (t == null)
             return p.getMinimumToken();
 
-        if (t.getType() == Term.Type.STRING)
+        if (t.getType() == Term.Type.STRING && !t.isToken)
         {
             try
             {


Mime
View raw message