mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-2.0' into cassandra-2.1
Conflicts: CHANGES.txt bin/cqlsh
This commit is contained in:
commit
7a1b6b40f7
|
|
@ -13,6 +13,8 @@
|
|||
* Configurable client timeout for cqlsh (CASSANDRA-7516)
|
||||
* Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
|
||||
Merged from 2.0:
|
||||
* (cqlsh) cqlsh should automatically disable tracing when selecting
|
||||
from system_traces (CASSANDRA-7641)
|
||||
* (Hadoop) Add CqlOutputFormat (CASSANDRA-6927)
|
||||
* Don't depend on cassandra config for nodetool ring (CASSANDRA-7508)
|
||||
* (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703)
|
||||
|
|
|
|||
|
|
@ -887,11 +887,16 @@ class Shell(cmd.Cmd):
|
|||
self.current_keyspace = ksname.lower()
|
||||
|
||||
def do_select(self, parsed):
|
||||
tracing_was_enabled = self.tracing_enabled
|
||||
ksname = parsed.get_binding('ksname')
|
||||
stop_tracing = ksname == 'system_traces' or (ksname is None and self.current_keyspace == 'system_traces')
|
||||
self.tracing_enabled = self.tracing_enabled and not stop_tracing
|
||||
statement = parsed.extract_orig()
|
||||
with_default_limit = parsed.get_binding('limit') is None
|
||||
if with_default_limit:
|
||||
statement = "%s LIMIT %d;" % (statement[:-1], DEFAULT_SELECT_LIMIT)
|
||||
self.perform_statement(statement, with_default_limit=with_default_limit)
|
||||
self.tracing_enabled = tracing_was_enabled
|
||||
|
||||
def perform_statement(self, statement, with_default_limit=False):
|
||||
stmt = SimpleStatement(statement, consistency_level=self.consistency_level)
|
||||
|
|
|
|||
Loading…
Reference in New Issue