This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Consider an objectStore, with keyPath "id", containing the following objects: { id: 1, name: "foo", flags: ["hi", "low"] } { id: 2, name: "foo", flags: ["apple", "orange"] } { id: 3, name: "goo", flags: ["fahrvergnügen"] } And an index keyed on the "name" property. What should the following code alert? results = []; db.objectStore("myObjectStore").index("nameIndex").openCursor().onsuccess = function(e) { cursor = e.result; if (!cursor) { alert(results); } results.push(cursor.value); cursor.continue(); }; Possible imaginable results are: "1,2,3" "2,1,3" In order to keep results consistent and predictable we should define that one of these results are correct, and define which one that is. I would recommend that indexes with duplicate values should be defined to be ordered by the key order in the objectStore. I.e. in this case "1,2,3" would be defined as the correct result.
Working at rewriting cursor handling, especially related to indexes.
Should be fixed by http://dvcs.w3.org/hg/IndexedDB/rev/8716288a4fe1 Would be great if someone could check that it looks correct.