Skip to content
Commit 559d0645 authored by Jeff Brown's avatar Jeff Brown
Browse files

Refactor SQLiteOpenHelper.

Combine the code for opening readable and writable databases.
This improves the handling of the case where a database cannot
be opened because it cannot be upgraded.  Previously we would
open the database twice: first read-write, then read-only, each
time failing due to the version check.  Now only open it once.

Removed the goofy locking logic related to upgrading a read-only
database to read-write.  We now do it in place by reopening the
necessary connections in the connection pool.

Change-Id: I6deca3fb90e43f4ccb944d4715307fd6fc3e1383
parent 2437a4ab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment