<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>11094</bug_id>
          
          <creation_ts>2010-10-19 13:47:36 +0000</creation_ts>
          <short_desc>[IndexedDB] IDBIndex.get* don&apos;t define which item is returned in the case of duplicates</short_desc>
          <delta_ts>2010-11-08 11:34:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>Indexed Database API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jeremy Orlow">jorlow</reporter>
          <assigned_to name="Jonas Sicking (Not reading bugmail)">jonas</assigned_to>
          <cc>jonas</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>41549</commentid>
    <comment_count>0</comment_count>
    <who name="Jeremy Orlow">jorlow</who>
    <bug_when>2010-10-19 13:47:36 +0000</bug_when>
    <thetext>It&apos;s possible for indexes to be non-unique in which case IDBIndex.get* may lookup one of several entries. We should specify which is returned in a deterministic way. It should probably be connected to the order in which cursors return duplicates as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41592</commentid>
    <comment_count>1</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2010-10-19 23:47:31 +0000</bug_when>
    <thetext>I recall discussing this on the list.

Like you point out, the same issue exists when using a cursor created using IDBIndex.createObjectCursor. Here we need to define which order duplicates are iterated in.

IMO the order should be the key order in the objectStore. I.e. items in indexes are first ordered by their keyPath value, then by the objectStores key value.

get* functions should return the first item according to this order.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41910</commentid>
    <comment_count>2</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2010-11-01 04:53:16 +0000</bug_when>
    <thetext>Working at rewriting cursor handling, especially related to indexes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42254</commentid>
    <comment_count>3</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2010-11-08 11:34:57 +0000</bug_when>
    <thetext>Should be fixed by http://dvcs.w3.org/hg/IndexedDB/rev/8716288a4fe1

Would be great if someone could check that it looks correct.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>