Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-18853

N1QL: (Negative Testing): Using a bucketname in a query which does not exist on cluster gives wrong message.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Cheshire-Cat
    • 4.5.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      Query Issued:
      SELECT tb_H.* FROM (SELECT tb_O.* FROM (SELECT tb_M.* FROM ( SELECT t_5.* FROM simple_table_3 t_5 WHERE int_field1 IN (SELECT RAW int_field1 FROM simple_table_10 t_4 USE KEYS t_5.primary_key_id WHERE ((t_4.bool_field1 != true AND t_4.varchar_field1 IS NULL)) OR ((t_4.bool_field1 = true OR t_4.primary_key_id NOT BETWEEN "1" and "999")) ) ) tb_M) tb_O) tb_H ;

      There is no bucket named simple_table_10 in cluster but simple_table_3 is there.

      Result seen:
      {
      "requestID": "11dac69b-caaf-4c1a-aa31-9275f43330e7",
      "signature":

      { "*": "*" }

      ,
      "results": [
      ],
      "errors": [

      { "code": 10000, "msg": "Authorization Failed Keyspace simple_table_10 - cause: Authentication failure." }

      ],
      "status": "stopped",
      "metrics":

      { "elapsedTime": "15.975508ms", "executionTime": "15.850157ms", "resultCount": 0, "resultSize": 0, "errorCount": 1 }

      }

      while if I do a simple select from simple_table_10 which is not present, it gives correct error message:
      cbq> select * from simple_table_10;
      {
      "requestID": "1d31ce81-00b6-4be1-b3ca-35be2258cb48",
      "errors": [

      { "code": 12003, "msg": "Keyspace not found keyspace simple_table_10 - cause: No bucket named simple_table_10" }

      ],
      "status": "fatal",
      "metrics":

      { "elapsedTime": "470.886352ms", "executionTime": "470.804174ms", "resultCount": 0, "resultSize": 0, "errorCount": 1 }

      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Donald.haggart Donald Haggart
            Prerna.Manaktala Prerna Manaktala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty