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 0B8CD18F17 for ; Tue, 29 Sep 2015 09:57:40 +0000 (UTC) Received: (qmail 19101 invoked by uid 500); 29 Sep 2015 09:57:05 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 19064 invoked by uid 500); 29 Sep 2015 09:57:05 -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 19047 invoked by uid 99); 29 Sep 2015 09:57:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Sep 2015 09:57:05 +0000 Date: Tue, 29 Sep 2015 09:57:05 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-10369) cqlsh prompt includes name of keyspace after failed `use` statement MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-10369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14934936#comment-14934936 ] Sylvain Lebresne commented on CASSANDRA-10369: ---------------------------------------------- [~snazy] mentions above that this affects 2.2 but the fix version doesn't seem to agree. Which one is it? > cqlsh prompt includes name of keyspace after failed `use` statement > ------------------------------------------------------------------- > > Key: CASSANDRA-10369 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10369 > Project: Cassandra > Issue Type: Bug > Reporter: Jim Witschey > Assignee: Robert Stupp > Priority: Minor > Labels: cqlsh > Fix For: 3.0.0 rc2 > > > I found this while addressing CASSANDRA-10289. > In cqlsh, if the user enters {{USE ks}}, but there is no keyspace named {{ks}}, the prompt will read {{cqlsh:ks>}}. It should just read {{cqlsh>}}, since the underlying session did not actually switch to use {{ks}}. > I believe the bug is in cqlsh and not, e.g., the driver, because the statement, as expected, raises an {{InvalidRequest}} error. > The behavior shows in a test in the cqlshlib nosetests here: > https://github.com/apache/cassandra/blob/03f556ffa8718754fe4eb329af2002d83ffc7147/pylib/cqlshlib/test/test_cqlsh_output.py#L545 > An example failure on CassCI is here: > http://cassci.datastax.com/job/scratch_mambocab-fix_cqlsh/11/testReport/cqlshlib.test.test_cqlsh_output/TestCqlshOutput/test_prompt/ > You can also reproduce it trivially in ccm, or however you choose to run clusters locally: > {code} > ccm create cqlsh -v git:trunk -n 1 ; ccm start --wait-for-binary-proto ; ccm node1 cqlsh > http://git-wip-us.apache.org/repos/asf/cassandra.git git:trunk > Fetching Cassandra updates... > Current cluster is now: cqlsh > Connected to cqlsh at 127.0.0.1:9042. > [cqlsh 5.0.1 | Cassandra 3.0.0-beta2-SNAPSHOT | CQL spec 3.3.1 | Native protocol v4] > Use HELP for help. > cqlsh> use nonexistentkeyspace; > InvalidRequest: code=2200 [Invalid query] message="Keyspace 'nonexistentkeyspace' does not exist" > cqlsh:nonexistentkeyspace> > {code} > That last line should read {{cqlsh>}} instead. -- This message was sent by Atlassian JIRA (v6.3.4#6332)