Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-16652

"desc" on cqlsh 6.0.0 not working with a Cassandra 3.x server

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.0-rc2, 4.0
    • CQL/Interpreter
    • None

    Description

      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
        ~ $ docker create --name cassandra3 cassandra:3.11.10
        5d903e48e0661e39080198de5e8752356a5a666132211a500ea38af0fc2a0356
        ~ $ docker start cassandra3
        cassandra3
        ~ $ docker exec -ti cassandra3 bash
        
      • Inside the docker container, try the default cqlsh version, make sure everything is working correctly
        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
        
      • 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
        root@5d903e48e066:/# apt-get update -qq && apt-get install -qq git python3-six
        ...... [truncated]
        
      • Clone the Cassandra repository and checkout the cassandra-4.0-rc1 tag
        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]
        
      • Run the cqlsh from the Git repository, and then repeat all the cqlsh statements above
        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#
        

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

      Attachments

        Activity

          People

            e.dimitrova Ekaterina Dimitrova
            Bowen Song Bowen Song
            Ekaterina Dimitrova
            Adam Holmberg, Benjamin Lerer
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: