If due to a failure during previous transaction a rollback journal is
generated, the original legacy database has to be restored to the
original state before it can be dumped. However, it can't be done
unless the database is opened in R/W mode.
Change-Id: Icc455f4e820a5be8b0628e95895680e9cbb14eb6
sqlite3 *db;
- int rc = sqlite3_open_v2(dbPath, &db, SQLITE_OPEN_READONLY, 0);
+ int rc = sqlite3_open_v2(dbPath, &db, SQLITE_OPEN_READWRITE, 0);
if (!rc && !(rc = sqlite3_key(db, pass, passSize)) && !(rc = sqlite3_exec(db, "PRAGMA cipher_compatibility=2", 0, 0, 0)))
rc = sqlite3_db_dump(db, ssout, (void*)&out);