cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefa...@apache.org
Subject [2/6] cassandra git commit: Fix authentication problem when invoking clqsh copy from a SOURCE command
Date Thu, 22 Sep 2016 01:03:56 GMT
Fix authentication problem when invoking clqsh copy from a SOURCE command

Patch by Adam Holmberg; reviewed by Stefania Alborghetti for CASSANDRA-12642


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

Branch: refs/heads/cassandra-3.0
Commit: 50726e77804360f6cf8aeba02bb8bb4088965032
Parents: 38ff407
Author: Adam Holmberg <Adam.Holmberg@datastax.com>
Authored: Wed Sep 21 15:46:11 2016 +0800
Committer: Stefania Alborghetti <stefania.alborghetti@datastax.com>
Committed: Thu Sep 22 08:57:47 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt  |  1 +
 bin/cqlsh.py | 18 ++++++++++++------
 2 files changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/50726e77/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 96f97f4..ee4015e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.8
+ * Fix authentication problem when invoking clqsh copy from a SOURCE command (CASSANDRA-12642)
  * Decrement pending range calculator jobs counter in finally block
   (CASSANDRA-12554)
  * Add local address entry in PropertyFileSnitch (CASSANDRA-11332)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/50726e77/bin/cqlsh.py
----------------------------------------------------------------------
diff --git a/bin/cqlsh.py b/bin/cqlsh.py
index b631450..514fada 100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@ -1903,15 +1903,21 @@ class Shell(cmd.Cmd):
         except IOError, e:
             self.printerr('Could not open %r: %s' % (fname, e))
             return
-        subshell = Shell(self.hostname, self.port,
-                         color=self.color, encoding=self.encoding, stdin=f,
-                         tty=False, use_conn=self.conn, cqlver=self.cql_version,
-                         keyspace=self.current_keyspace,
+        username = self.auth_provider.username if self.auth_provider else None
+        password = self.auth_provider.password if self.auth_provider else None
+        subshell = Shell(self.hostname, self.port, color=self.color,
+                         username=username, password=password,
+                         encoding=self.encoding, stdin=f, tty=False, use_conn=self.conn,
+                         cqlver=self.cql_version, keyspace=self.current_keyspace,
+                         tracing_enabled=self.tracing_enabled,
+                         display_nanotime_format=self.display_nanotime_format,
                          display_timestamp_format=self.display_timestamp_format,
                          display_date_format=self.display_date_format,
-                         display_nanotime_format=self.display_nanotime_format,
                          display_float_precision=self.display_float_precision,
-                         max_trace_wait=self.max_trace_wait)
+                         display_timezone=self.display_timezone,
+                         max_trace_wait=self.max_trace_wait, ssl=self.ssl,
+                         request_timeout=self.session.default_timeout,
+                         connect_timeout=self.conn.connect_timeout)
         subshell.cmdloop()
         f.close()
 


Mime
View raw message