diff --git a/CHANGES.txt b/CHANGES.txt index 1ac22f929a..04902add2a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * (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) diff --git a/bin/cqlsh b/bin/cqlsh index 6a24753956..6aa397e6c0 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -893,6 +893,9 @@ class Shell(cmd.Cmd): if ksname is not None: ksname = self.cql_unprotect_name(ksname) cfname = self.cql_unprotect_name(parsed.get_binding('cfname')) + tracing_was_enabled = self.tracing_enabled + 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: @@ -900,6 +903,7 @@ class Shell(cmd.Cmd): self.perform_statement(statement, decoder=ErrorHandlingSchemaDecoder, with_default_limit=with_default_limit) + self.tracing_enabled = tracing_was_enabled def perform_statement(self, statement, decoder=None, with_default_limit=False): if self.tracing_enabled: