cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Witschey (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-10369) cqlsh prompt includes name of keyspace after failed `use` statement
Date Thu, 17 Sep 2015 21:11:04 GMT
Jim Witschey created CASSANDRA-10369:

             Summary: cqlsh prompt includes name of keyspace after failed `use` statement
                 Key: CASSANDRA-10369
             Project: Cassandra
          Issue Type: Bug
            Reporter: Jim Witschey
            Priority: Minor

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:

An example failure on CassCI is here:

You can also reproduce it trivially in ccm, or however you choose to run clusters locally:

ccm create cqlsh -v git:trunk -n 1 ; ccm start --wait-for-binary-proto ; ccm node1 cqlsh git:trunk
Fetching Cassandra updates...
Current cluster is now: cqlsh
Connected to cqlsh at
[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

That last line should read {{cqlsh>}} instead.

This message was sent by Atlassian JIRA

View raw message