cqlsh doesn't handle LIST statements correctly.

patch by Sam Tunnicliffe; reviewed by Mikhail Stepura for CASSANDRA-8370
This commit is contained in:
Sam Tunnicliffe 2014-12-17 15:50:59 -08:00 committed by Mikhail Stepura
parent 6f98c6c4ed
commit f1e2fed8dd
2 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -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("")