Bug 44522 - IndexedDB needs to manually delete all objectStore data and indexes
Summary: IndexedDB needs to manually delete all objectStore data and indexes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Jeremy Orlow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-24 06:44 PDT by Jeremy Orlow
Modified: 2010-08-24 09:25 PDT (History)
6 users (show)

See Also:


Attachments
Patch (18.35 KB, patch)
2010-08-24 06:59 PDT, Jeremy Orlow
no flags Details | Formatted Diff | Diff
Patch (18.63 KB, patch)
2010-08-24 08:18 PDT, Jeremy Orlow
steveblock: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Orlow 2010-08-24 06:44:02 PDT
IndexedDB needs to manually delete all objectStore data and indexes
Comment 1 Jeremy Orlow 2010-08-24 06:59:54 PDT
Created attachment 65270 [details]
Patch
Comment 2 Andrei Popescu 2010-08-24 07:25:02 PDT
> doDelete(sqliteDatabase(), "DELETE FROM ObjectStores WHERE id = ?", objectStore->id());
>   doDelete(sqliteDatabase(), "DELETE FROM ObjectStoreData WHERE objectStoreId = ?", objectStore->id());
> doDelete(sqliteDatabase(), "DELETE FROM Indexes WHERE objectStoreId = ?", objectStore->id());

I think you should start a SQL transaction to run these in, as we want them to succeed or fail together. Going forward, these will execute in the setVersion() transaction but, for now, I think we should have a these in their own transaction.

LGTM otherwise.
Comment 3 Jeremy Orlow 2010-08-24 08:18:20 PDT
Created attachment 65274 [details]
Patch
Comment 4 Andrei Popescu 2010-08-24 08:25:28 PDT
LGTM
Comment 5 Steve Block 2010-08-24 08:30:21 PDT
Comment on attachment 65274 [details]
Patch

r=me
Comment 6 Jeremy Orlow 2010-08-24 08:44:27 PDT
Committed r65902: <http://trac.webkit.org/changeset/65902>
Comment 7 WebKit Review Bot 2010-08-24 09:25:03 PDT
http://trac.webkit.org/changeset/65902 might have broken Leopard Intel Release (Tests)