[Webkit-unassigned] [Bug 158833] New: IDBIndex.openCursor() matches indexes on other stores

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 16 02:59:55 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158833

            Bug ID: 158833
           Summary: IDBIndex.openCursor() matches indexes on other stores
    Classification: Unclassified
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Macintosh
                OS: OS X 10.11
            Status: NEW
          Severity: Major
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: david.fahlander at gmail.com

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](https://cdn.rawgit.com/dfahlander/Dexie.js/v1.4.0-rc.1/test/run-unit-tests.html). 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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160616/9aa6a301/attachment.html>


More information about the webkit-unassigned mailing list