New issue
Advanced search Search tips
Starred by 80 users
Status: Fixed
Owner:
Closed: Aug 2012
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 129470

Blocking:
issue 64050
issue 92049

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment
Implement IDBOpenDBRequest.onupgradeneeded
Project Member Reported by ericbidelman@chromium.org, Dec 20 2011 Back to list
It's currently very difficult to write any code that works cross-browser.
Implementations are all over the place. One thing that's blocking us is
still having setVersion() and not IDBOpenDBRequest.onupgradeneeded.

http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html
 
Cc: kevinlim@chromium.org
Comment 2 by sethladd@google.com, Feb 23 2012
Is anyone working on this?
Comment 3 by jsb...@chromium.org, Feb 23 2012
Not actively. It's one of the Big Outstanding Issues we're tracking, though, after some stability and performance work.

This may be helpful:

http://groups.google.com/a/chromium.org/group/chromium-discuss/browse_thread/thread/5d96ca12c2d092b6


 Issue 115528  has been merged into this issue.
Thanks for merging my  issue 115528  - I did not see this one despite my search.

I have a workaround at present.

Because onupgradeneeded is called BEFORE onsuccess on browsers that implement it (ie Firefox) I moved my db upgrade code to a separate function.  in onupgradeneeded i call the function.  then in onsuccess i check the old and new versions of the db.  if the browser handled the onupgradeneeded the old and new versions in onsuccess are the same, and if the browser doesnt handle onupgradeneeded then i call setVersion which calls my db upgrade function.

not ideal but not a big work around.
Status: Available
Do we have a tentative timeline as to when onupgradeneeded will be supported by webkit? We are planning an application in near future, if we know this we can plan accordingly.
Guys, we're getting starting to fall behind the other browsers. Both FF and IE10 have updated implementations according to the spec. This issue also has 23 stars (fairly high for an issue. Can we prioritize this for M20 and raise to a P1?

http://blogs.msdn.com/b/ie/archive/2012/03/21/indexeddb-updates-for-ie10-and-metro-style-apps.aspx
Comment 9 by jsb...@chromium.org, Mar 27 2012
Yes, we're already planning to take this on in M20, along with the other places where we diverge from the latest version of the spec.
Comment 10 by jo...@ronomon.com, Apr 2 2012
Any progress? Is onupgradeneeded supported in Canary?
Cc: -kevinlim@chromium.org -jsb...@chromium.org
Owner: dgro...@chromium.org
Not in M20, hoping to get this in M21.

Blockedon: 129470
To implement the "roll back to previous values if version change transaction aborts" semantics from the spec, we may want to go ahead and implement  http://crbug.com/129470  sooner rather than later
Labels: Mstone-22
Blocking: chromium:92049
Project Member Comment 17 by bugdroid1@chromium.org, Jul 27 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=148673

------------------------------------------------------------------------
r148673 | dgrogan@chromium.org | 2012-07-27T00:21:02.257741Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/indexed_db/indexed_db_dispatcher.cc?r1=148673&r2=148672&pathrev=148673
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/indexed_db/indexed_db_dispatcher.h?r1=148673&r2=148672&pathrev=148673
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/indexed_db/indexed_db_messages.h?r1=148673&r2=148672&pathrev=148673
   M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/support/test_webkit_platform_support.cc?r1=148673&r2=148672&pathrev=148673
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/in_process_webkit/indexed_db_callbacks.cc?r1=148673&r2=148672&pathrev=148673
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/indexed_db/proxy_webidbdatabase_impl.cc?r1=148673&r2=148672&pathrev=148673
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/in_process_webkit/indexed_db_callbacks.h?r1=148673&r2=148672&pathrev=148673
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/indexed_db/proxy_webidbfactory_impl.cc?r1=148673&r2=148672&pathrev=148673
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/in_process_webkit/indexed_db_database_callbacks.cc?r1=148673&r2=148672&pathrev=148673
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc?r1=148673&r2=148672&pathrev=148673
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/indexed_db/proxy_webidbfactory_impl.h?r1=148673&r2=148672&pathrev=148673
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/in_process_webkit/indexed_db_database_callbacks.h?r1=148673&r2=148672&pathrev=148673

Chrome side changes for integer versions

BUG= 108223 
TEST=


Review URL: https://chromiumcodereview.appspot.com/10829013
------------------------------------------------------------------------
Project Member Comment 18 by bugdroid1@chromium.org, Aug 7 2012
Project Member Comment 19 by bugdroid1@chromium.org, Aug 7 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=150458

------------------------------------------------------------------------
r150458 | dgrogan@chromium.org | 2012-08-07T23:53:08.480675Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/indexeddb/common.js?r1=150458&r2=150457&pathrev=150458
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/indexeddb/migration_test.js?r1=150458&r2=150457&pathrev=150458
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/in_process_webkit/indexed_db_browsertest.cc?r1=150458&r2=150457&pathrev=150458
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/test/data/indexeddb/migration_test.html?r1=150458&r2=150457&pathrev=150458

IndexedDB browser test for migrating from leveldb schema v0 to v1.

It doesn't check that the integer version was actually added
to leveldb though, which is unfortunate.  It ensures that
opening a v0 database doesn't fail an assert, which is what
would happen if you opened an unmigrated database with code
that expects to find a stored integer version.

BUG= 108223 

Review URL: https://chromiumcodereview.appspot.com/10826159
------------------------------------------------------------------------
Blocking: chromium:64050
Blockedon: -chromium:129470 chromium:129470
Labels: -Mstone-22 Mstone-23
This feature is available on the dev channel. Please test it and file bugs as you find them.

We know of two shortcomings in the current implementation:
1) There's no bounds checking on the integer version parameter.
2) The spec dictates that if two databases with the same name and origin, but with different versions, are being opened at the same time, the one with the highest version will attempt to be opened first.  For now, chromium processes the requests in the order in which they were received.
Status: Fixed
Also, some notes I sent to the chromium-html5 mailing list (https://groups.google.com/a/chromium.org/forum/?fromgroups=#!msg/chromium-html5/7evv3rzOWWc/X2w11zyxYhMJ)

* setVersion is also supported and will be at least through chrome 23
* once a database has an integer version subsequent setVersion calls will fail
* if an existing database is opened with the new open method that takes an integer version parameter, upgradeneeded will be fired regardless of the existing database's string version
Project Member Comment 24 by bugdroid1@chromium.org, Oct 13 2012
Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Comment 25 by laforge@google.com, Oct 17 2012
Labels: -Feature-IndexedDB WebKit-Storage-IndexedDB
Project Member Comment 26 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-WebKit -Mstone-23 -WebKit-Storage-IndexedDB Cr-Content Cr-Content-Storage-IndexedDB M-23
Project Member Comment 27 by bugdroid1@chromium.org, Mar 14 2013
Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue
Project Member Comment 28 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content Cr-Blink
Project Member Comment 29 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content-Storage-IndexedDB Cr-Blink-Storage-IndexedDB
Sign in to add a comment