You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ty...@apache.org on 2014/07/25 20:05:33 UTC
git commit: Fix cqlsh deserialization of blobs
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.1.0 557156914 -> 5001b382e
Fix cqlsh deserialization of blobs
Patch by Tyler Hobbs; review by Aleksey Yeschenko for CASSANDRA-7603
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5001b382
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5001b382
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5001b382
Branch: refs/heads/cassandra-2.1.0
Commit: 5001b382ed7a1c9696830336ac84cb5ffaf20037
Parents: 5571569
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Fri Jul 25 13:05:02 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Fri Jul 25 13:05:02 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 3 ++-
bin/cqlsh | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5001b382/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7a26fa6..e940931 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,11 +2,12 @@
* Fix native protocol drop user type notification (CASSANDRA-7571)
* Give read access to system.schema_usertypes to all authenticated users
(CASSANDRA-7578)
- * Fix cqlsh display when zero rows are returned (CASSANDRA-7580)
+ * (cqlsh) Fix cqlsh display when zero rows are returned (CASSANDRA-7580)
* Get java version correctly when JAVA_TOOL_OPTIONS is set (CASSANDRA-7572)
* Fix NPE when dropping index from non-existent keyspace, AssertionError when
dropping non-existent index with IF EXISTS (CASSANDRA-7590)
* Fix sstablelevelresetter hang (CASSANDRA-7614)
+ * (cqlsh) Fix deserialization of blobs (CASSANDRA-7603)
Merged from 2.0:
* Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
* Always merge ranges owned by a single node (CASSANDRA-6930)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5001b382/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index fb6fb5f..2d83034 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -548,8 +548,8 @@ class Shell(cmd.Cmd):
self.stdin = stdin
self.query_out = sys.stdout
self.consistency_level = cassandra.ConsistencyLevel.ONE
- #Python driver returns BLOBs as string, but we expect them as buffer()
- cassandra.cqltypes.BytesType.deserialize = staticmethod(cassandra.cqltypes.BytesType.validate)
+ # the python driver returns BLOBs as string, but we expect them as bytearrays
+ cassandra.cqltypes.BytesType.deserialize = staticmethod(lambda byts, protocol_version: bytearray(byts))
cassandra.cqltypes.CassandraType.support_empty_values = True
auto_format_udts()