<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - IndexedDB does not throw ConstraintErrors for unique keys"
   href="https://bugs.webkit.org/show_bug.cgi?id=149107">149107</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>IndexedDB does not throw ConstraintErrors for unique keys
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Mac OS X 10.10
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nolan&#64;nolanlawson.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=261088" name="attach_261088" title="Reproducible test case">attachment 261088</a> <a href="attachment.cgi?id=261088&amp;action=edit" title="Reproducible test case">[details]</a></span>
Reproducible test case

(May be a dup of <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - IndexedDB index does not enforce uniqueness"
   href="show_bug.cgi?id=60720">https://bugs.webkit.org/show_bug.cgi?id=60720</a>, but it was marked as invalid because they didn't have a good reproducible test case.)

In WebKit Nightly 600.8.9 (as well as Safari 8.0.8), it is possible to put() two documents with the same key, even if that key is defined as a unique index.

I have a reproducible test case to demonstrate: <a href="http://bl.ocks.org/nolanlawson/28ff2db3f3cb386c8ecb">http://bl.ocks.org/nolanlawson/28ff2db3f3cb386c8ecb</a>. The same test is also attached to this bug.

If the bug has been successfully reproduced, then this HTML page will print &quot;There is a bug.&quot; Note that openKeyCursor() also returns the same key twice.

This bug cannot be reproduced in either Firefox or Chrome.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>