cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Fix binding null values inside UDT
Date Tue, 05 Aug 2014 08:37:55 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0 95d289b84 -> a3d8375a2


Fix binding null values inside UDT

patch by omichallat; reviewed by slebresne for CASSANDRA-7685


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

Branch: refs/heads/cassandra-2.1.0
Commit: a3d8375a2b9da5145fb413bb2314a1142fba6c46
Parents: 95d289b
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Aug 5 10:37:14 2014 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Aug 5 10:37:14 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt                                       | 1 +
 src/java/org/apache/cassandra/cql3/UserTypes.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3d8375a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a8c9ca4..98a0246 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
 2.1.0-final
  * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
+ * Fix binding null values inside UDT (CASSANDRA-7685)
 Merged from 2.0:
  * Update java driver (for hadoop) (CASSANDRA-7618)
  * Support connecting to ipv6 jmx with nodetool (CASSANDRA-7669)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3d8375a/src/java/org/apache/cassandra/cql3/UserTypes.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/UserTypes.java b/src/java/org/apache/cassandra/cql3/UserTypes.java
index bb6e7d0..9d66c16 100644
--- a/src/java/org/apache/cassandra/cql3/UserTypes.java
+++ b/src/java/org/apache/cassandra/cql3/UserTypes.java
@@ -171,7 +171,7 @@ public abstract class UserTypes
                 buffers[i] = values.get(i).bindAndGet(options);
                 // Inside UDT values, we must force the serialization of collections to v3
whatever protocol
                 // version is in use since we're going to store directly that serialized
value.
-                if (version < 3 && type.fieldType(i).isCollection())
+                if (version < 3 && type.fieldType(i).isCollection() &&
buffers[i] != null)
                     buffers[i] = ((CollectionType)type.fieldType(i)).getSerializer().reserializeToV3(buffers[i]);
             }
             return buffers;


Mime
View raw message