<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 - IDBIndex.openCursor() matches indexes on other stores"
   href="https://bugs.webkit.org/show_bug.cgi?id=158833">158833</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>IDBIndex.openCursor() matches indexes on other stores
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>Safari Technology Preview
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>OS X 10.11
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>Major
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>david.fahlander&#64;gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When having multiple object stores and querying an index of one store, you will also get matches for indexes on other stores. cursor.key shows values from the index of another store. cursor.value shows some duplicate values from the store you are querying.

Basically, if you have objectStores 'students' with an index 'name' and 'schools' with an index 'city', and you query the 'name' index on 'students' with no range specified (or WITH a range - it doesnt matter), you will get a cursor that iterates a mix of student names and cities. Each onsuccess callback from the cursor will have a key that sometimes is a student name and sometimes a city. The value though is always a student and some students are shown multiple times - one time with the name key and another time with a city key.

This issue was detected when running the [unit-test suite for Dexie.js](<a href="https://cdn.rawgit.com/dfahlander/Dexie.js/v1.4.0-rc.1/test/run-unit-tests.html">https://cdn.rawgit.com/dfahlander/Dexie.js/v1.4.0-rc.1/test/run-unit-tests.html</a>). That suite has over 1000 assertions and all works perfectly on chrome, opera and firefox. Please use it as a compatibility test if you like. In the latest technical preview for Safari, all but 10 assertings succeed, so you're defenitely on the way to completenes :)

David</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>