You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by st...@apache.org on 2016/11/11 03:03:20 UTC

[01/10] cassandra git commit: cqlsh COPY: unprotected pk values before converting them if not using prepared statements

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 ca85bec1d -> 2e21cac34
  refs/heads/cassandra-3.0 77eee181c -> 14b52bca3
  refs/heads/cassandra-3.X 699fa9a9d -> 574ca2e2d
  refs/heads/trunk 7c0d161b9 -> dba908017


cqlsh COPY: unprotected pk values before converting them if not using prepared statements

patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-12863


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

Branch: refs/heads/cassandra-2.2
Commit: 2e21cac342750d1bf1426bd72e14fd3dfd094fb1
Parents: ca85bec
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Mon Oct 31 09:20:19 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Fri Nov 11 10:55:25 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt                |  1 +
 pylib/cqlshlib/copyutil.py | 11 +++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e21cac3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b550885..98c1839 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
  * Fix Util.spinAssertEquals (CASSANDRA-12283)
  * Fix potential NPE for compactionstats (CASSANDRA-12462)
  * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e21cac3/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index aee2920..0c11636 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -1778,15 +1778,18 @@ class ImportConversion(object):
                                                          where_clause)
         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):
         """
         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
         for more details.
         """
-        def unprotect(v):
-            if v is not None:
-                return CqlRuleSet.dequote_value(v)
+        unprotect = self.unprotect
 
         def convert(t, v):
             v = unprotect(v)
@@ -2028,7 +2031,7 @@ class ImportConversion(object):
             return self.cqltypes[n].serialize(v, self.proto_version)
 
         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
         serialize = serialize_value_prepared if self.use_prepared_statements else serialize_value_not_prepared


[08/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.X

Posted by st...@apache.org.
Merge branch 'cassandra-3.0' into cassandra-3.X


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

Branch: refs/heads/cassandra-3.X
Commit: 574ca2e2ddcf785f8cb607953a60d70218ed54e2
Parents: 699fa9a 14b52bc
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Fri Nov 11 11:01:41 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Fri Nov 11 11:01:41 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt                |  1 +
 pylib/cqlshlib/copyutil.py | 11 +++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/574ca2e2/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index e765a9c,1b2b61f..2468da5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -147,6 -37,6 +147,7 @@@ Merged from 3.0
   * Correct log message for statistics of offheap memtable flush (CASSANDRA-12776)
   * Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
  Merged from 2.2:
++ * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
   * Fix Util.spinAssertEquals (CASSANDRA-12283)
   * Fix potential NPE for compactionstats (CASSANDRA-12462)
   * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/574ca2e2/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------


[03/10] cassandra git commit: cqlsh COPY: unprotected pk values before converting them if not using prepared statements

Posted by st...@apache.org.
cqlsh COPY: unprotected pk values before converting them if not using prepared statements

patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-12863


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

Branch: refs/heads/cassandra-3.X
Commit: 2e21cac342750d1bf1426bd72e14fd3dfd094fb1
Parents: ca85bec
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Mon Oct 31 09:20:19 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Fri Nov 11 10:55:25 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt                |  1 +
 pylib/cqlshlib/copyutil.py | 11 +++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e21cac3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b550885..98c1839 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
  * Fix Util.spinAssertEquals (CASSANDRA-12283)
  * Fix potential NPE for compactionstats (CASSANDRA-12462)
  * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e21cac3/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index aee2920..0c11636 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -1778,15 +1778,18 @@ class ImportConversion(object):
                                                          where_clause)
         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):
         """
         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
         for more details.
         """
-        def unprotect(v):
-            if v is not None:
-                return CqlRuleSet.dequote_value(v)
+        unprotect = self.unprotect
 
         def convert(t, v):
             v = unprotect(v)
@@ -2028,7 +2031,7 @@ class ImportConversion(object):
             return self.cqltypes[n].serialize(v, self.proto_version)
 
         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
         serialize = serialize_value_prepared if self.use_prepared_statements else serialize_value_not_prepared


[02/10] cassandra git commit: cqlsh COPY: unprotected pk values before converting them if not using prepared statements

Posted by st...@apache.org.
cqlsh COPY: unprotected pk values before converting them if not using prepared statements

patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-12863


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

Branch: refs/heads/cassandra-3.0
Commit: 2e21cac342750d1bf1426bd72e14fd3dfd094fb1
Parents: ca85bec
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Mon Oct 31 09:20:19 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Fri Nov 11 10:55:25 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt                |  1 +
 pylib/cqlshlib/copyutil.py | 11 +++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e21cac3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b550885..98c1839 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
  * Fix Util.spinAssertEquals (CASSANDRA-12283)
  * Fix potential NPE for compactionstats (CASSANDRA-12462)
  * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e21cac3/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index aee2920..0c11636 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -1778,15 +1778,18 @@ class ImportConversion(object):
                                                          where_clause)
         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):
         """
         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
         for more details.
         """
-        def unprotect(v):
-            if v is not None:
-                return CqlRuleSet.dequote_value(v)
+        unprotect = self.unprotect
 
         def convert(t, v):
             v = unprotect(v)
@@ -2028,7 +2031,7 @@ class ImportConversion(object):
             return self.cqltypes[n].serialize(v, self.proto_version)
 
         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
         serialize = serialize_value_prepared if self.use_prepared_statements else serialize_value_not_prepared


[10/10] cassandra git commit: Merge branch 'cassandra-3.X' into trunk

Posted by st...@apache.org.
Merge branch 'cassandra-3.X' into trunk


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

Branch: refs/heads/trunk
Commit: dba9080178fdf31c1193510395663a5213b64873
Parents: 7c0d161 574ca2e
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Fri Nov 11 11:02:06 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Fri Nov 11 11:02:06 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt                |  1 +
 pylib/cqlshlib/copyutil.py | 11 +++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dba90801/CHANGES.txt
----------------------------------------------------------------------


[05/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

Posted by st...@apache.org.
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.X
Commit: 14b52bca30e74b8fdadf723bd2c23d6cff7fe9dd
Parents: 77eee18 2e21cac
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Fri Nov 11 10:57:47 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Fri Nov 11 11:00:13 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt                |  3 ++-
 pylib/cqlshlib/copyutil.py | 11 +++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/14b52bca/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 7fd5101,98c1839..1b2b61f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,41 -1,5 +1,42 @@@
 -2.2.9
 - * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
 +3.0.11
 + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
 + * Pass root cause to CorruptBlockException when uncompression failed (CASSANDRA-12889)
 + * 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
 + * Batch with multiple conditional updates for the same partition causes AssertionError (CASSANDRA-12867)
 + * Make AbstractReplicationStrategy extendable from outside its package (CASSANDRA-12788)
 + * Fix CommitLogTest.testDeleteIfNotDirty (CASSANDRA-12854)
 + * Don't tell users to turn off consistent rangemovements during rebuild. (CASSANDRA-12296)
 + * Avoid deadlock due to materialized view lock contention (CASSANDRA-12689)
 + * Fix for KeyCacheCqlTest flakiness (CASSANDRA-12801)
 + * Include SSTable filename in compacting large row message (CASSANDRA-12384)
 + * Fix potential socket leak (CASSANDRA-12329, CASSANDRA-12330)
 + * Fix ViewTest.testCompaction (CASSANDRA-12789)
 + * Improve avg aggregate functions (CASSANDRA-12417)
 + * Preserve quoted reserved keyword column names in MV creation (CASSANDRA-11803)
 + * nodetool stopdaemon errors out (CASSANDRA-12646)
 + * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
 + * mx4j does not work in 3.0.8 (CASSANDRA-12274)
 + * Abort cqlsh copy-from in case of no answer after prolonged period of time (CASSANDRA-12740)
 + * Avoid sstable corrupt exception due to dropped static column (CASSANDRA-12582)
 + * Make stress use client mode to avoid checking commit log size on startup (CASSANDRA-12478)
 + * Fix exceptions with new vnode allocation (CASSANDRA-12715)
 + * Unify drain and shutdown processes (CASSANDRA-12509)
 + * Fix NPE in ComponentOfSlice.isEQ() (CASSANDRA-12706)
 + * Fix failure in LogTransactionTest (CASSANDRA-12632)
 + * Fix potentially incomplete non-frozen UDT values when querying with the
 +   full primary key specified (CASSANDRA-12605)
 + * Skip writing MV mutations to commitlog on mutation.applyUnsafe() (CASSANDRA-11670)
 + * Establish consistent distinction between non-existing partition and NULL value for LWTs on static columns (CASSANDRA-12060)
 + * Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer (CASSANDRA-12516)
 + * Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) (CASSANDRA-12472)
 + * If CF has no clustering columns, any row cache is full partition cache (CASSANDRA-12499)
 + * Correct log message for statistics of offheap memtable flush (CASSANDRA-12776)
 + * Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
 +Merged from 2.2:
   * Fix Util.spinAssertEquals (CASSANDRA-12283)
   * Fix potential NPE for compactionstats (CASSANDRA-12462)
   * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/14b52bca/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------


[09/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.X

Posted by st...@apache.org.
Merge branch 'cassandra-3.0' into cassandra-3.X


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

Branch: refs/heads/trunk
Commit: 574ca2e2ddcf785f8cb607953a60d70218ed54e2
Parents: 699fa9a 14b52bc
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Fri Nov 11 11:01:41 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Fri Nov 11 11:01:41 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt                |  1 +
 pylib/cqlshlib/copyutil.py | 11 +++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/574ca2e2/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index e765a9c,1b2b61f..2468da5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -147,6 -37,6 +147,7 @@@ Merged from 3.0
   * Correct log message for statistics of offheap memtable flush (CASSANDRA-12776)
   * Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
  Merged from 2.2:
++ * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
   * Fix Util.spinAssertEquals (CASSANDRA-12283)
   * Fix potential NPE for compactionstats (CASSANDRA-12462)
   * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/574ca2e2/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------


[04/10] cassandra git commit: cqlsh COPY: unprotected pk values before converting them if not using prepared statements

Posted by st...@apache.org.
cqlsh COPY: unprotected pk values before converting them if not using prepared statements

patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-12863


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

Branch: refs/heads/trunk
Commit: 2e21cac342750d1bf1426bd72e14fd3dfd094fb1
Parents: ca85bec
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Mon Oct 31 09:20:19 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Fri Nov 11 10:55:25 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt                |  1 +
 pylib/cqlshlib/copyutil.py | 11 +++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e21cac3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b550885..98c1839 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
  * Fix Util.spinAssertEquals (CASSANDRA-12283)
  * Fix potential NPE for compactionstats (CASSANDRA-12462)
  * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e21cac3/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index aee2920..0c11636 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -1778,15 +1778,18 @@ class ImportConversion(object):
                                                          where_clause)
         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):
         """
         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
         for more details.
         """
-        def unprotect(v):
-            if v is not None:
-                return CqlRuleSet.dequote_value(v)
+        unprotect = self.unprotect
 
         def convert(t, v):
             v = unprotect(v)
@@ -2028,7 +2031,7 @@ class ImportConversion(object):
             return self.cqltypes[n].serialize(v, self.proto_version)
 
         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
         serialize = serialize_value_prepared if self.use_prepared_statements else serialize_value_not_prepared


[07/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

Posted by st...@apache.org.
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/trunk
Commit: 14b52bca30e74b8fdadf723bd2c23d6cff7fe9dd
Parents: 77eee18 2e21cac
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Fri Nov 11 10:57:47 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Fri Nov 11 11:00:13 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt                |  3 ++-
 pylib/cqlshlib/copyutil.py | 11 +++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/14b52bca/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 7fd5101,98c1839..1b2b61f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,41 -1,5 +1,42 @@@
 -2.2.9
 - * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
 +3.0.11
 + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
 + * Pass root cause to CorruptBlockException when uncompression failed (CASSANDRA-12889)
 + * 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
 + * Batch with multiple conditional updates for the same partition causes AssertionError (CASSANDRA-12867)
 + * Make AbstractReplicationStrategy extendable from outside its package (CASSANDRA-12788)
 + * Fix CommitLogTest.testDeleteIfNotDirty (CASSANDRA-12854)
 + * Don't tell users to turn off consistent rangemovements during rebuild. (CASSANDRA-12296)
 + * Avoid deadlock due to materialized view lock contention (CASSANDRA-12689)
 + * Fix for KeyCacheCqlTest flakiness (CASSANDRA-12801)
 + * Include SSTable filename in compacting large row message (CASSANDRA-12384)
 + * Fix potential socket leak (CASSANDRA-12329, CASSANDRA-12330)
 + * Fix ViewTest.testCompaction (CASSANDRA-12789)
 + * Improve avg aggregate functions (CASSANDRA-12417)
 + * Preserve quoted reserved keyword column names in MV creation (CASSANDRA-11803)
 + * nodetool stopdaemon errors out (CASSANDRA-12646)
 + * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
 + * mx4j does not work in 3.0.8 (CASSANDRA-12274)
 + * Abort cqlsh copy-from in case of no answer after prolonged period of time (CASSANDRA-12740)
 + * Avoid sstable corrupt exception due to dropped static column (CASSANDRA-12582)
 + * Make stress use client mode to avoid checking commit log size on startup (CASSANDRA-12478)
 + * Fix exceptions with new vnode allocation (CASSANDRA-12715)
 + * Unify drain and shutdown processes (CASSANDRA-12509)
 + * Fix NPE in ComponentOfSlice.isEQ() (CASSANDRA-12706)
 + * Fix failure in LogTransactionTest (CASSANDRA-12632)
 + * Fix potentially incomplete non-frozen UDT values when querying with the
 +   full primary key specified (CASSANDRA-12605)
 + * Skip writing MV mutations to commitlog on mutation.applyUnsafe() (CASSANDRA-11670)
 + * Establish consistent distinction between non-existing partition and NULL value for LWTs on static columns (CASSANDRA-12060)
 + * Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer (CASSANDRA-12516)
 + * Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) (CASSANDRA-12472)
 + * If CF has no clustering columns, any row cache is full partition cache (CASSANDRA-12499)
 + * Correct log message for statistics of offheap memtable flush (CASSANDRA-12776)
 + * Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
 +Merged from 2.2:
   * Fix Util.spinAssertEquals (CASSANDRA-12283)
   * Fix potential NPE for compactionstats (CASSANDRA-12462)
   * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/14b52bca/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------


[06/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

Posted by st...@apache.org.
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.0
Commit: 14b52bca30e74b8fdadf723bd2c23d6cff7fe9dd
Parents: 77eee18 2e21cac
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Fri Nov 11 10:57:47 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Fri Nov 11 11:00:13 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt                |  3 ++-
 pylib/cqlshlib/copyutil.py | 11 +++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/14b52bca/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 7fd5101,98c1839..1b2b61f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,41 -1,5 +1,42 @@@
 -2.2.9
 - * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
 +3.0.11
 + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
 + * Pass root cause to CorruptBlockException when uncompression failed (CASSANDRA-12889)
 + * 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
 + * Batch with multiple conditional updates for the same partition causes AssertionError (CASSANDRA-12867)
 + * Make AbstractReplicationStrategy extendable from outside its package (CASSANDRA-12788)
 + * Fix CommitLogTest.testDeleteIfNotDirty (CASSANDRA-12854)
 + * Don't tell users to turn off consistent rangemovements during rebuild. (CASSANDRA-12296)
 + * Avoid deadlock due to materialized view lock contention (CASSANDRA-12689)
 + * Fix for KeyCacheCqlTest flakiness (CASSANDRA-12801)
 + * Include SSTable filename in compacting large row message (CASSANDRA-12384)
 + * Fix potential socket leak (CASSANDRA-12329, CASSANDRA-12330)
 + * Fix ViewTest.testCompaction (CASSANDRA-12789)
 + * Improve avg aggregate functions (CASSANDRA-12417)
 + * Preserve quoted reserved keyword column names in MV creation (CASSANDRA-11803)
 + * nodetool stopdaemon errors out (CASSANDRA-12646)
 + * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
 + * mx4j does not work in 3.0.8 (CASSANDRA-12274)
 + * Abort cqlsh copy-from in case of no answer after prolonged period of time (CASSANDRA-12740)
 + * Avoid sstable corrupt exception due to dropped static column (CASSANDRA-12582)
 + * Make stress use client mode to avoid checking commit log size on startup (CASSANDRA-12478)
 + * Fix exceptions with new vnode allocation (CASSANDRA-12715)
 + * Unify drain and shutdown processes (CASSANDRA-12509)
 + * Fix NPE in ComponentOfSlice.isEQ() (CASSANDRA-12706)
 + * Fix failure in LogTransactionTest (CASSANDRA-12632)
 + * Fix potentially incomplete non-frozen UDT values when querying with the
 +   full primary key specified (CASSANDRA-12605)
 + * Skip writing MV mutations to commitlog on mutation.applyUnsafe() (CASSANDRA-11670)
 + * Establish consistent distinction between non-existing partition and NULL value for LWTs on static columns (CASSANDRA-12060)
 + * Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer (CASSANDRA-12516)
 + * Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) (CASSANDRA-12472)
 + * If CF has no clustering columns, any row cache is full partition cache (CASSANDRA-12499)
 + * Correct log message for statistics of offheap memtable flush (CASSANDRA-12776)
 + * Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
 +Merged from 2.2:
   * Fix Util.spinAssertEquals (CASSANDRA-12283)
   * Fix potential NPE for compactionstats (CASSANDRA-12462)
   * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/14b52bca/pylib/cqlshlib/copyutil.py
----------------------------------------------------------------------