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

Difference in behaviour between prepared and direct create [primary] index statements

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.1.0
    • 4.5.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      We should standardise the behaviour of the various create and drop index statements: for example

      create index a on default(a);
      create index a on default(a)

      fails with 4300

      create primary index on default;
      create primary index on default;

      fails with 5000. should fail with 4300 (or suitable execution error, see later)

      create index a on default(a);
      prepare ci from create index a on default(a);
      drop index default.a;
      execute ci;

      fails with 4300 on the prepare.
      given that it is a legal sequence of requests, it should succeed, much like the following do:

      create primary index on default;
      prepare cpi from create primary index on default;
      drop primary index on default;
      execute cpi;

      (no index a exists)
      prepare st from drop index default.a;
      create index a on default(a);
      execute st;

      (no primary index exists on default)
      prepare dpi from drop primary index on default;
      create primary index on default;
      execute dpi;

      Error 4300 should probably be in the execution error range instead.

      Attachments

        Issue Links

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

          Activity

            People

              ajay.bhullar Ajay Bhullar
              marco.greco Marco Greco (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty