From 13b4bb41c7e35502ae36e4ec77252c5ec9a9945b Mon Sep 17 00:00:00 2001 From: Robert Stupp Date: Tue, 29 Sep 2015 13:22:21 +0200 Subject: [PATCH] cqlsh prompt includes name of keyspace after failed `use` statement patch by Robert Stupp; reviewed by Aleksey Yeschenko for CASSANDRA-10369 --- CHANGES.txt | 1 + bin/cqlsh.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 7e6f1e0d95..f3a6d440a3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.2 + * cqlsh prompt includes name of keyspace after failed `use` statement (CASSANDRA-10369) * Configurable page size in cqlsh (CASSANDRA-9855) * Defer default role manager setup until all nodes are on 2.2+ (CASSANDRA-9761) * Cancel transaction for sstables we wont redistribute index summary diff --git a/bin/cqlsh.py b/bin/cqlsh.py index 6ff3a963d1..e2691ccab1 100644 --- a/bin/cqlsh.py +++ b/bin/cqlsh.py @@ -1116,7 +1116,8 @@ class Shell(cmd.Cmd): def do_use(self, parsed): ksname = parsed.get_binding('ksname') - if self.perform_simple_statement(SimpleStatement(parsed.extract_orig())): + result, future = self.perform_simple_statement(SimpleStatement(parsed.extract_orig())) + if result: if ksname[0] == '"' and ksname[-1] == '"': self.current_keyspace = self.cql_unprotect_name(ksname) else: