mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-2.2' into cassandra-3.0
This commit is contained in:
commit
14b52bca30
|
|
@ -2,7 +2,8 @@
|
||||||
* Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
|
* Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
|
||||||
* Pass root cause to CorruptBlockException when uncompression failed (CASSANDRA-12889)
|
* Pass root cause to CorruptBlockException when uncompression failed (CASSANDRA-12889)
|
||||||
* Fix partition count log during compaction (CASSANDRA-12184)
|
* Fix partition count log during compaction (CASSANDRA-12184)
|
||||||
|
Merged from 2.2:
|
||||||
|
* cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
|
||||||
|
|
||||||
3.0.10
|
3.0.10
|
||||||
* Batch with multiple conditional updates for the same partition causes AssertionError (CASSANDRA-12867)
|
* Batch with multiple conditional updates for the same partition causes AssertionError (CASSANDRA-12867)
|
||||||
|
|
|
||||||
|
|
@ -1814,15 +1814,18 @@ class ImportConversion(object):
|
||||||
where_clause)
|
where_clause)
|
||||||
return parent.session.prepare(select_query)
|
return parent.session.prepare(select_query)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def unprotect(v):
|
||||||
|
if v is not None:
|
||||||
|
return CqlRuleSet.dequote_value(v)
|
||||||
|
|
||||||
def _get_converter(self, cql_type):
|
def _get_converter(self, cql_type):
|
||||||
"""
|
"""
|
||||||
Return a function that converts a string into a value the can be passed
|
Return a function that converts a string into a value the can be passed
|
||||||
into BoundStatement.bind() for the given cql type. See cassandra.cqltypes
|
into BoundStatement.bind() for the given cql type. See cassandra.cqltypes
|
||||||
for more details.
|
for more details.
|
||||||
"""
|
"""
|
||||||
def unprotect(v):
|
unprotect = self.unprotect
|
||||||
if v is not None:
|
|
||||||
return CqlRuleSet.dequote_value(v)
|
|
||||||
|
|
||||||
def convert(t, v):
|
def convert(t, v):
|
||||||
v = unprotect(v)
|
v = unprotect(v)
|
||||||
|
|
@ -2070,7 +2073,7 @@ class ImportConversion(object):
|
||||||
return self.cqltypes[n].serialize(v, self.proto_version)
|
return self.cqltypes[n].serialize(v, self.proto_version)
|
||||||
|
|
||||||
def serialize_value_not_prepared(n, v):
|
def serialize_value_not_prepared(n, v):
|
||||||
return self.cqltypes[n].serialize(self.converters[n](v), self.proto_version)
|
return self.cqltypes[n].serialize(self.converters[n](self.unprotect(v)), self.proto_version)
|
||||||
|
|
||||||
partition_key_indexes = self.partition_key_indexes
|
partition_key_indexes = self.partition_key_indexes
|
||||||
serialize = serialize_value_prepared if self.use_prepared_statements else serialize_value_not_prepared
|
serialize = serialize_value_prepared if self.use_prepared_statements else serialize_value_not_prepared
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue