Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3300

CREATE INDEX that matches an existing index succeeds with a 01504 warning but does not create the index.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 10.3.1.4, 10.3.2.1
    • None
    • SQL
    • Normal
    • Repro attached

    Description

      Since CREATE INDEX statement succeeds the index should be created, the warning is useful but doesn't imply the index was not created.
      Derby allows a single physical index to support multiple logical indexes so allowing the index to be created should be fine.

      ij> create table t(i int);
      0 rows inserted/updated/deleted
      ij> create index ti1 on t;
      0 rows inserted/updated/deleted
      ij> create index ti2 on t;
      0 rows inserted/updated/deleted
      WARNING 01504: The new index is a duplicate of an existing index: TI1.
      ij> drop index ti2;
      ERROR 42X65: Index 'TI2' does not exist.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              djd Daniel John Debrunner
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: