W3C home > Mailing lists > Public > public-webapps-bugzilla@w3.org > August 2012

[Bug 18558] New: [IndexedDB] Define error seen when key generator maximum value is reached

From: <bugzilla@jessica.w3.org>
Date: Tue, 14 Aug 2012 19:25:29 +0000
To: public-webapps-bugzilla@w3.org
Message-ID: <bug-18558-2532@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=18558

           Summary: [IndexedDB] Define error seen when key generator
                    maximum value is reached
           Product: WebAppsWG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Indexed Database API
        AssignedTo: dave.null@w3.org
        ReportedBy: jsbell@chromium.org
         QAContact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-webapps@w3.org


The spec says:

"When the current number of a key generator reaches above the value 2^53
(9007199254740992) any attempts to use the key generator to generate a new key
will result in an error."

.. but the specifics of the error and how it manifests is not defined.

The logical place would be at the point where the key generator is queried, in
the "Object Store Storage Operation":

"If store uses a key generator and key is undefined, set key to the next
generated key."

In the Chrome implementation, if the key generator results in an error, the
storage operation fails at this point with a DataError.

This can be exercised by:

store = db.createObjectStore('store', {autoIncrement: true});
store.put('a', 9007199254740992);
r = store.put('b');
r.onerror = function(e) { alert(e.target.error.name); };

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 14 August 2012 19:25:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 14 August 2012 19:25:32 GMT