Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
        CHANGES.txt
        src/java/org/apache/cassandra/db/marshal/TupleType.java


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

Branch: refs/heads/cassandra-2.2
Commit: afc509384c219f503211f1440479495d30c4ebb8
Parents: 3200d6c c233270
Author: Tyler Hobbs <tylerlho...@gmail.com>
Authored: Fri Jun 26 12:30:54 2015 -0500
Committer: Tyler Hobbs <tylerlho...@gmail.com>
Committed: Fri Jun 26 12:30:54 2015 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../apache/cassandra/db/marshal/TupleType.java  |  6 ++++-
 .../cql3/validation/entities/TupleTypeTest.java | 27 +++++++++++++++++++-
 3 files changed, 33 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/afc50938/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 8cac598,874c8ee..a4e348e
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,29 -1,18 +1,31 @@@
 -2.1.8
 +2.2
 + * Allow JMX over SSL directly from nodetool (CASSANDRA-9090)
 + * Update cqlsh for UDFs (CASSANDRA-7556)
 + * Change Windows kernel default timer resolution (CASSANDRA-9634)
 + * Deprected sstable2json and json2sstable (CASSANDRA-9618)
 + * Allow native functions in user-defined aggregates (CASSANDRA-9542)
 + * Don't repair system_distributed by default (CASSANDRA-9621)
 + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
 + * Rename class for DATE type in Java driver (CASSANDRA-9563)
 + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables & remove boot_without_jna option 
(CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and 
unixTimestampOf (CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction 
(CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
 + * Add logback metrics (CASSANDRA-9378)
 + * Update and refactor ant test/test-compression to run the tests in parallel 
(CASSANDRA-9583)
 +Merged from 2.1:
+  * Fix IndexOutOfBoundsException when inserting tuple with too many
+    elements using the string literal notation (CASSANDRA-9559)
 - * Allow JMX over SSL directly from nodetool (CASSANDRA-9090)
 - * Fix incorrect result for IN queries where column not found (CASSANDRA-9540)
   * Enable describe on indices (CASSANDRA-7814)
 + * Fix incorrect result for IN queries where column not found (CASSANDRA-9540)
   * ColumnFamilyStore.selectAndReference may block during compaction 
(CASSANDRA-9637)
 -Merged from 2.0
 -  * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
 -
 -
 -2.1.7
   * Fix bug in cardinality check when compacting (CASSANDRA-9580)
   * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour 
(CASSANDRA-9549)
 + * Make rebuild only run one at a time (CASSANDRA-9119)
  Merged from 2.0
 + * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
   * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
   * ArrivalWindow should use primitives (CASSANDRA-9496)
   * Periodically submit background compaction tasks (CASSANDRA-9592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/afc50938/src/java/org/apache/cassandra/db/marshal/TupleType.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/afc50938/test/unit/org/apache/cassandra/cql3/validation/entities/TupleTypeTest.java
----------------------------------------------------------------------
diff --cc 
test/unit/org/apache/cassandra/cql3/validation/entities/TupleTypeTest.java
index 362756b,177def7..0e7084f
--- a/test/unit/org/apache/cassandra/cql3/validation/entities/TupleTypeTest.java
+++ b/test/unit/org/apache/cassandra/cql3/validation/entities/TupleTypeTest.java
@@@ -97,22 -120,11 +120,24 @@@ public class TupleTypeTest extends CQLT
          createTable("CREATE TABLE %s (k int PRIMARY KEY, t frozen<tuple<int, 
text, double>>)");
  
          assertInvalidSyntax("INSERT INTO %s (k, t) VALUES (0, ())");
-         assertInvalid("INSERT INTO %s (k, t) VALUES (0, (2, 'foo', 3.1, 
'bar'))");
+ 
+         assertInvalidMessage("Invalid tuple literal for t: too many elements. 
Type tuple<int, text, double> expects 3 but got 4",
+                              "INSERT INTO %s (k, t) VALUES (0, (2, 'foo', 
3.1, 'bar'))");
      }
  
 +    @Test
 +    public void testTupleWithUnsetValues() throws Throwable
 +    {
 +        createTable("CREATE TABLE %s (k int PRIMARY KEY, t tuple<int, text, 
double>)");
 +        // invalid positional field substitution
 +        assertInvalidMessage("Invalid unset value for tuple field number 1",
 +                             "INSERT INTO %s (k, t) VALUES(0, (3, ?, 2.1))", 
unset());
 +
 +        createIndex("CREATE INDEX tuple_index ON %s (t)");
 +        // select using unset
 +        assertInvalidMessage("Invalid unset value for tuple field number 0", 
"SELECT * FROM %s WHERE k = ? and t = (?,?,?)", unset(), unset(), unset(), 
unset());
 +    }
 +      
      /**
       * Test the syntax introduced by #4851,
       * migrated from cql_tests.py:TestCQL.tuple_notation_test()

Reply via email to