Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12874

Ensure index does not properly update index with case mismatch

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.6.0-rc0
    • Fix Version/s: None
    • Component/s: Indexing
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      Run the two lines of ensure index above and view the resulting indexes.

      Show
      Run the two lines of ensure index above and view the resulting indexes.

      Description

      Running the following code on 2.6 rc0:

      db.bug.ensureIndex({'isactive': 1}, {name: 'find_active'});
      db.bug.ensureIndex({'IsActive': 1}, {name: 'find_active'});

      Results in the bug collection with an index for:

      {'isactive': 1}

      NOT an index for

      {'IsActive': 1}

      My expectation is the second index would either replace or co-exist with the first. It is not that the first index is kept and the second statement is ignored.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: