mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-22 16:02:29 +02:00
#3135: Poco::Data::SQLite::Utility::fileToMemory unsuccessful if journal exists
This commit is contained in:
@@ -248,7 +248,9 @@ bool Utility::fileToMemory(sqlite3* pInMemory, const std::string& fileName)
|
||||
sqlite3* pFile;
|
||||
sqlite3_backup* pBackup;
|
||||
|
||||
rc = sqlite3_open_v2(fileName.c_str(), &pFile, SQLITE_OPEN_READONLY | SQLITE_OPEN_URI, NULL);
|
||||
// Note: SQLITE_OPEN_READWRITE is required to correctly handle an existing hot journal.
|
||||
// See #3135
|
||||
rc = sqlite3_open_v2(fileName.c_str(), &pFile, SQLITE_OPEN_READWRITE | SQLITE_OPEN_URI, NULL);
|
||||
if(rc == SQLITE_OK )
|
||||
{
|
||||
pBackup = sqlite3_backup_init(pInMemory, "main", pFile, "main");
|
||||
|
Reference in New Issue
Block a user