cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Fix validation of collections in TriggerExecutor
Date Mon, 20 Oct 2014 23:30:59 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 0be66837e -> fd63d2ae2


Fix validation of collections in TriggerExecutor

patch by Sam Tunnicliffe; reviewed by Aleksey Yeschenko for
CASSANDRA-8146


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

Branch: refs/heads/trunk
Commit: ec866fa164755466a49dbebc200bf8919e471f10
Parents: be3b380
Author: Sam Tunnicliffe <sam@beobal.com>
Authored: Tue Oct 21 02:18:35 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Oct 21 02:18:35 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 src/java/org/apache/cassandra/triggers/TriggerExecutor.java | 7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec866fa1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4e5cd24..815bce1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.1
+ * Fix validation of collections in TriggerExecutor (CASSANDRA-8146)
  * Fix IllegalArgumentException when a list of IN values containing tuples
    is passed as a single arg to a prepared statement with the v1 or v2
    protocol (CASSANDRA-8062)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec866fa1/src/java/org/apache/cassandra/triggers/TriggerExecutor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/triggers/TriggerExecutor.java b/src/java/org/apache/cassandra/triggers/TriggerExecutor.java
index 4416a57..001529d 100644
--- a/src/java/org/apache/cassandra/triggers/TriggerExecutor.java
+++ b/src/java/org/apache/cassandra/triggers/TriggerExecutor.java
@@ -27,9 +27,8 @@ import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
 import org.apache.cassandra.config.TriggerDefinition;
-import org.apache.cassandra.cql.QueryProcessor;
+import org.apache.cassandra.cql3.QueryProcessor;
 import org.apache.cassandra.db.*;
-import org.apache.cassandra.db.composites.CellName;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.exceptions.InvalidRequestException;
 import org.apache.cassandra.utils.FBUtilities;
@@ -163,8 +162,8 @@ public class TriggerExecutor
         {
             QueryProcessor.validateKey(mutation.key());
             for (ColumnFamily tcf : mutation.getColumnFamilies())
-                for (CellName tName : tcf.getColumnNames())
-                    QueryProcessor.validateColumn(tcf.metadata(), tName, tcf.getColumn(tName).value());
+                for (Cell cell : tcf)
+                    cell.validateFields(tcf.metadata());
         }
     }
 


Mime
View raw message