You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mi...@apache.org on 2014/12/18 00:51:40 UTC
[2/3] cassandra git commit: cqlsh doesn't handle LIST statements
correctly.
cqlsh doesn't handle LIST statements correctly.
patch by Sam Tunnicliffe; reviewed by Mikhail Stepura for CASSANDRA-8370
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f1e2fed8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f1e2fed8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f1e2fed8
Branch: refs/heads/trunk
Commit: f1e2fed8ddbb77530cc69c8d753fd313b9e1fa35
Parents: 6f98c6c
Author: Sam Tunnicliffe <sa...@beobal.com>
Authored: Wed Dec 17 15:50:59 2014 -0800
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Wed Dec 17 15:50:59 2014 -0800
----------------------------------------------------------------------
CHANGES.txt | 1 +
bin/cqlsh | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1e2fed8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9ec3585..ecb592e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.1.3
+ * (cqlsh) Fixed the handling of LIST statements (CASSANDRA-8370)
* Make sstablescrub check leveled manifest again (CASSANDRA-8432)
* Check first/last keys in sstable when giving out positions (CASSANDRA-8458)
* Disable mmap on Windows (CASSANDRA-6993)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1e2fed8/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index 250fc06..033eb37 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -987,8 +987,12 @@ class Shell(cmd.Cmd):
self.printerr(traceback.format_exc())
return False
- if statement.query_string[:6].lower() == 'select' or statement.query_string.lower().startswith("list"):
+ if statement.query_string[:6].lower() == 'select':
self.print_result(rows, self.parse_for_table_meta(statement.query_string))
+ elif statement.query_string.lower().startswith("list users"):
+ self.print_result(rows, self.get_table_meta('system_auth','users'))
+ elif statement.query_string.lower().startswith("list"):
+ self.print_result(rows, self.get_table_meta('system_auth','permissions'))
elif rows:
# CAS INSERT/UPDATE
self.writeresult("")