Closed Bug 1014988 Opened 11 years ago Closed 11 years ago

Use Context.MODE_ENABLE_WRITE_AHEAD_LOGGING when opening databases

Categories

(Firefox for Android Graveyard :: Data Providers, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 32

People

(Reporter: rnewman, Assigned: rnewman)

Details

Attachments

(1 file)

Added in API 16: http://developer.android.com/reference/android/content/Context.html#MODE_ENABLE_WRITE_AHEAD_LOGGING Much better than opening the DB then issuing a query to set up WAL! Faster, and probably safer, too.
This looks like the right approach. Note that SQLiteOpenHelper encapsulates the mode flag mechanism; this API call was also added in API 16.
Comment on attachment 8429787 [details] [diff] [review] Use Context.MODE_ENABLE_WRITE_AHEAD_LOGGING when opening databases. v1 Brian gets review on this, 'cos empty queue. Tested locally on a KitKat device.
Attachment #8429787 - Flags: review?(bnicholson)
Comment on attachment 8429787 [details] [diff] [review] Use Context.MODE_ENABLE_WRITE_AHEAD_LOGGING when opening databases. v1 Review of attachment 8429787 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/db/BrowserDatabaseHelper.java @@ +1729,1 @@ > db.setLockingEnabled(false); Since you added an API level 16 check, you can move this into it since this doesn't do anything on 16+.
Attachment #8429787 - Flags: review?(bnicholson) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 32
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: