Bug 44522

Summary: IndexedDB needs to manually delete all objectStore data and indexes
Product: WebKit Reporter: Jeremy Orlow <jorlow>
Component: New BugsAssignee: Jeremy Orlow <jorlow>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, andreip, bulach, eric, steveblock, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch steveblock: review+

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)