diff --git a/CHANGES.txt b/CHANGES.txt index 00cf087b2a..1ef2b93aca 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,12 +15,6 @@ * Fix potentially repairing with wrong nodes (CASSANDRA-6808) * Change caching option syntax (CASSANDRA-6745) Merged from 2.0: - * Fix saving triggers to schema (CASSANDRA-6789) - * Fix trigger mutations when base mutation list is immutable (CASSANDRA-6790) - * Fix accounting in FileCacheService to allow re-using RAR (CASSANDRA-6838) - * Fix static counter columns (CASSANDRA-6827) - * Restore expiring->deleted (cell) compaction optimization (CASSANDRA-6844) - * Fix CompactionManager.needsCleanup (CASSANDRA-6845) * Avoid race-prone second "scrub" of system keyspace (CASSANDRA-6797) * Pool CqlRecordWriter clients by inetaddress rather than Range (CASSANDRA-6665) @@ -61,6 +55,13 @@ Merged from 2.0: * Fix CQLSStableWriter.addRow(Map) (CASSANDRA-6526) * Fix HSHA server introducing corrupt data (CASSANDRA-6285) * Fix CAS conditions for COMPACT STORAGE tables (CASSANDRA-6813) + * Fix saving triggers to schema (CASSANDRA-6789) + * Fix trigger mutations when base mutation list is immutable (CASSANDRA-6790) + * Fix accounting in FileCacheService to allow re-using RAR (CASSANDRA-6838) + * Fix static counter columns (CASSANDRA-6827) + * Restore expiring->deleted (cell) compaction optimization (CASSANDRA-6844) + * Fix CompactionManager.needsCleanup (CASSANDRA-6845) + * Correctly compare BooleanType values other than 0 and 1 (CASSANDRA-6779) 2.1.0-beta1 diff --git a/src/java/org/apache/cassandra/db/marshal/BooleanType.java b/src/java/org/apache/cassandra/db/marshal/BooleanType.java index 3a9fdfae88..ca11cc2518 100644 --- a/src/java/org/apache/cassandra/db/marshal/BooleanType.java +++ b/src/java/org/apache/cassandra/db/marshal/BooleanType.java @@ -37,7 +37,12 @@ public class BooleanType extends AbstractType if ((o2 == null) || (o2.remaining() != 1)) return 1; - return o1.compareTo(o2); + // False is 0, True is anything else, makes False sort before True. + byte b1 = o1.get(); + byte b2 = o2.get(); + if (b1 == 0) + return b2 == 0 ? 0 : -1; + return b2 == 0 ? 1 : 0; } public ByteBuffer fromString(String source) throws MarshalException