From 4e0fccc3ed1fded5ad72dfdfcad37a5ccdfc9a24 Mon Sep 17 00:00:00 2001 From: "Dinesh A. Joshi" Date: Mon, 17 Feb 2020 16:38:28 -0800 Subject: [PATCH] Fix missing Keyspaces in cqlsh describe output Patch by Dinesh Joshi; reviewed by Jon Haddad and David Capwell for CASSANDRA-15576 --- CHANGES.txt | 1 + bin/cqlsh.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1da82a5f55..f3d0fdaf8a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 4.0-alpha4 + * Fix missing Keyspaces in cqlsh describe output (CASSANDRA-15576) * Fix multi DC nodetool status output (CASSANDRA-15305) * Added documentation covering new Netty based internode messaging (CASSANDRA-15478) * Add documentation of hints (CASSANDRA-15491) diff --git a/bin/cqlsh.py b/bin/cqlsh.py index 6fc5fed9ef..cb07df0c42 100644 --- a/bin/cqlsh.py +++ b/bin/cqlsh.py @@ -619,7 +619,7 @@ class Shell(cmd.Cmd): result, = self.session.execute("select * from system.local where key = 'local'") vers = { 'build': result['release_version'], - 'protocol': result['native_protocol_version'], + 'protocol': self.conn.protocol_version, 'cql': result['cql_version'], } self.connection_versions = vers @@ -628,7 +628,7 @@ class Shell(cmd.Cmd): # TODO remove after virtual tables are added to connection metadata if self.virtual_keyspaces is None: self.init_virtual_keyspaces_meta() - return list(map(str, list(self.conn.metadata.keyspaces.keys()))) + return list(map(str, list(self.conn.metadata.keyspaces.keys()) + list(self.virtual_keyspaces.keys()))) def get_columnfamily_names(self, ksname=None): if ksname is None: