IndexedDB: Calling AddOrModify inserts duplicates into the database

RESOLVED FIXED

Status

()

Core
DOM: IndexedDB
RESOLVED FIXED
8 years ago
6 years ago

People

(Reporter: Ben Turner (not reading bugmail, use the needinfo flag!), Assigned: Ben Turner (not reading bugmail, use the needinfo flag!))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 455578 [details] [diff] [review]
Patch

We have our SQLite constraints wrong, and need to fix them. Plus we should try to UPDATE if INSERT fails.
Attachment #455578 - Flags: review?(sdwilsh)

Updated

8 years ago
Blocks: 553412

Updated

8 years ago
Attachment #455578 - Attachment is patch: true
Attachment #455578 - Attachment mime type: application/octet-stream → text/plain
Do you have a testcase for this?
Not really. I just figured it out by dumping the database
Comment on attachment 455578 [details] [diff] [review]
Patch

The only issue here is that all existing builds are going to have to be updated with their index, which means we need to look at the schemaVersion on the database and modify it accordingly.

r=sdwilsh with that fixed.
Attachment #455578 - Flags: review?(sdwilsh) → review+
http://hg.mozilla.org/mozilla-central/rev/a4493bf491ab
Assignee: nobody → bent.mozilla
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Component: DOM → DOM: IndexedDB
You need to log in before you can comment on or make changes to this bug.