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

Dropping non existent table using IF EXISTS throws Exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Duplicate
    • None
    • Legacy/CQL
    • None
    • Ubuntu 12.0.4 with 8+ GB RAM and 40GB hard disk for data directory.

    • Low

    Description

      When using cqlsh console and dropping a non existent table, an exception is thrown although the IF EXISTS condition was given. Also when using the Java driver, an InvalidQueryException is thrown in such a situation. This is very misleading in applications that suppose such requests to be valid. In earlier versions it was a no-op call in that case. This is cqlsh output using Cassandra 2.0.5 version:

      [cqlsh 4.1.1 | Cassandra 2-0-5 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
      Use HELP for help.
      cqlsh> USE mwerrch;
      cqlsh:mwerrch> DESC TABLES;
      cql3test
      cqlsh:mwerrch> DROP TABLE IF EXISTS noexist;
      Bad Request: unconfigured columnfamily noexist
      cqlsh:mwerrch>
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              awerrch Christoph Werres
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: