Need a way to recover corrupted databases (or at least try)

RESOLVED INACTIVE

Status

()

Toolkit
Storage
P5
normal
RESOLVED INACTIVE
10 years ago
2 months ago

People

(Reporter: sdwilsh, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
I'm thinking a JS component here or maybe add it on to mozIStorageConnection.  We can only do this on db's that open, but fail integrity or quick check.

From drh:
Maybe INSERT OR ABORT INTO db2.table SELECT * FROM db1.table;
Then if you hit a failure:
INSERT OR ABORT INTO db2.table SELECT * FROM db1.table ORDER BY rowid DESC;

drop all indices from db2.table first.  Do the INSERT.  Then recreate the indices.  Otherwise you might run into problems.

I dunno if what you suggest would work or not.  It is not something we have ever tried to do before.
Probably it would be safer to read and write using separate database connections.

Worth investigating at least.
(Reporter)

Comment 1

10 years ago
I'm not going to be able to get to this for a while.
Assignee: sdwilsh → nobody
Status: ASSIGNED → NEW
Mine, because, well, this sucks.
Assignee: nobody → mconnor
Back to the storage owner. :)
Assignee: mconnor → sdwilsh
(Reporter)

Updated

10 years ago
Assignee: sdwilsh → nobody
(Reporter)

Updated

10 years ago
Priority: -- → P4

Updated

2 years ago
Priority: P4 → P5

Comment 4

2 months ago
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Last Resolved: 2 months ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.