cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/4] git commit: Fix bug with some IN queries missing results
Date Thu, 29 May 2014 10:55:00 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 56c2f0ab1 -> af593090b


Fix bug with some IN queries missing results

patch by slebresne; reviewed by thobbs for CASSANDRA-7105


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

Branch: refs/heads/trunk
Commit: 7bbeb5aa2d1064281589b98306f950550bd47e60
Parents: a374821
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Thu May 29 12:48:06 2014 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu May 29 12:48:42 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7bbeb5aa/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e7d7028..619c219 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -24,6 +24,7 @@
  * raise streaming phi convict threshold level (CASSANDRA-7063)
  * reduce garbage creation in calculatePendingRanges (CASSANDRA-7191)
  * exit CQLSH with error status code if script fails (CASSANDRA-6344)
+ * Fix bug with some IN queries missig results (CASSANDRA-7105)
 
 
 1.2.16

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7bbeb5aa/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 e058cff..02833e7 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -626,7 +626,7 @@ public class SelectStatement implements CQLStatement, MeasurableForPreparedCache
                             throw new InvalidRequestException(String.format("Invalid null
clustering key part %s", name));
                         ColumnNameBuilder copy = builder.copy().add(val);
                         // See below for why this
-                        s.add((b == Bound.END && copy.remainingCount() > 0) ?
copy.buildAsEndOfRange() : copy.build());
+                        s.add((eocBound == Bound.END && copy.remainingCount() >
0) ? copy.buildAsEndOfRange() : copy.build());
                     }
                     return new ArrayList<ByteBuffer>(s);
                 }
@@ -652,7 +652,7 @@ public class SelectStatement implements CQLStatement, MeasurableForPreparedCache
         // with 2ndary index is done, and with the the partition provided with an EQ, we'll
end up here, and in that
         // case using the eoc would be bad, since for the random partitioner we have no guarantee
that
         // builder.buildAsEndOfRange() will sort after builder.build() (see #5240).
-        return Collections.singletonList((bound == Bound.END && builder.remainingCount()
> 0) ? builder.buildAsEndOfRange() : builder.build());
+        return Collections.singletonList((eocBound == Bound.END && builder.remainingCount()
> 0) ? builder.buildAsEndOfRange() : builder.build());
     }
 
     private List<ByteBuffer> getRequestedBound(Bound b, List<ByteBuffer> variables)
throws InvalidRequestException


Mime
View raw message