Bowen Song created CASSANDRA-16652:
--------------------------------------

             Summary: "desc" on cqlsh 6.0.0 not working with a Cassandra 3.x 
server
                 Key: CASSANDRA-16652
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16652
             Project: Cassandra
          Issue Type: Bug
          Components: CQL/Interpreter
            Reporter: Bowen Song


The "desc" statement on cqlsh 6.0.0 shipped with Cassandra 4.0 RC1 is not 
working correctly when it's connected to a Cassandra 3.x server.

Steps to reproduce:
 * Ensure you have docker installed and running
 * Run the following docker commands to create and start a Cassandra 3.11 
container
{code:java}
~ $ docker create --name cassandra3 cassandra:3.11.10
5d903e48e0661e39080198de5e8752356a5a666132211a500ea38af0fc2a0356
~ $ docker start cassandra3
cassandra3
~ $ docker exec -ti cassandra3 bash
{code}

 * Inside the docker container, try the default cqlsh version, make sure 
everything is working correctly
{code:java}
root@5d903e48e066:/# cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.11.10 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> desc keyspaces;

system_traces  system_schema  system_auth  system  system_distributed

cqlsh> use system_auth;
cqlsh:system_auth> desc tables;

resource_role_permissons_index  role_permissions  role_members  roles

cqlsh:system_auth> select * from roles;

 role      | can_login | is_superuser | member_of | salted_hash
-----------+-----------+--------------+-----------+--------------------------------------------------------------
 cassandra |      True |         True |      null | 
$2a$10$8UNyioBF41/OZfcCa2aqXOHvXiNXArBHKaUUhMyPAFKpfN8byXonm

(1 rows)
cqlsh:system_auth> exit
{code}

 * Okay, everything worked as expected. Now install {{git}} to clone the 
Cassandra 4.0 RC1 source code, and {{python3-six}}, which is a dependency of 
cqlsh
{code:java}
root@5d903e48e066:/# apt-get update -qq && apt-get install -qq git python3-six
...... [truncated]
{code}

* Clone the Cassandra repository and checkout the cassandra-4.0-rc1 tag
{code:java}
root@5d903e48e066:/# git clone -b cassandra-4.0-rc1 --depth 1 
https://github.com/apache/cassandra.git cassandra-4.0-rc1
Cloning into 'cassandra-4.0-rc1'...
...... [truncated]
{code}

* Run the cqlsh from the Git repository, and then repeat all the cqlsh 
statements above
{code:java}
root@5d903e48e066:/# cd cassandra-4.0-rc1/bin
root@5d903e48e066:/cassandra-4.0-rc1/bin# ./cqlsh
Connected to Test Cluster at 127.0.0.1:9042
[cqlsh 6.0.0 | Cassandra 3.11.10 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> desc keyspaces;

cqlsh> use system_auth;
cqlsh:system_auth> desc tables;

cqlsh:system_auth> select * from roles;

 role      | can_login | is_superuser | member_of | salted_hash
-----------+-----------+--------------+-----------+--------------------------------------------------------------
 cassandra |      True |         True |      null | 
$2a$10$8UNyioBF41/OZfcCa2aqXOHvXiNXArBHKaUUhMyPAFKpfN8byXonm

(1 rows)
cqlsh:system_auth> exit
root@5d903e48e066:/cassandra-4.0-rc1/bin#
{code}

"desc" did not work correctly, but "use" and "select" worked.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to