Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E774B1148E for ; Thu, 14 Aug 2014 22:17:40 +0000 (UTC) Received: (qmail 1263 invoked by uid 500); 14 Aug 2014 22:17:40 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 1234 invoked by uid 500); 14 Aug 2014 22:17:40 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 1222 invoked by uid 99); 14 Aug 2014 22:17:40 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Aug 2014 22:17:40 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 487629C3FBE; Thu, 14 Aug 2014 22:17:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mishail@apache.org To: commits@cassandra.apache.org Date: Thu, 14 Aug 2014 22:17:41 -0000 Message-Id: <7c224359e0d5492c95202456e0b81818@git.apache.org> In-Reply-To: <4e3e669d766240278a2f69bab87f5419@git.apache.org> References: <4e3e669d766240278a2f69bab87f5419@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/13] git commit: cqlsh should automatically disable tracing when selecting from system_traces cqlsh should automatically disable tracing when selecting from system_traces patch by Philip Thompson and Mikhail Stepura; reviewed by Mikhail Stepura for CASSANDRA-7641 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e7566609 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e7566609 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e7566609 Branch: refs/heads/trunk Commit: e7566609e232d2adee2e2879ad4811b7cce1f5d2 Parents: 44764c0 Author: Mikhail Stepura Authored: Thu Aug 14 13:11:34 2014 -0700 Committer: Mikhail Stepura Committed: Thu Aug 14 14:13:57 2014 -0700 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ bin/cqlsh | 4 ++++ 2 files changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7566609/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 1ac22f9..04902ad 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) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7566609/bin/cqlsh ---------------------------------------------------------------------- diff --git a/bin/cqlsh b/bin/cqlsh index 6a24753..6aa397e 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: