Fix bug with some IN queries missing results

patch by slebresne; reviewed by thobbs for CASSANDRA-7105
This commit is contained in:
Sylvain Lebresne 2014-05-29 12:48:06 +02:00
parent a37482144f
commit 7bbeb5aa2d
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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