forked from qt-creator/qt-creator
Sqlite: Locking the walCheckpointFull()
To call this function from a thread we have to lock it. There is no test because there is no reasonable way to doing it. Anyway, this code is very simple, so there no reason to see that there is an error in it. Change-Id: Ibe57ddf421bc60929993afedecbde8c8486eb4db Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -108,7 +108,11 @@ public:
|
||||
|
||||
int totalChangesCount() { return m_databaseBackend.totalChangesCount(); }
|
||||
|
||||
void walCheckpointFull() override { m_databaseBackend.walCheckpointFull(); }
|
||||
void walCheckpointFull() override
|
||||
{
|
||||
std::lock_guard<std::mutex> lock{m_databaseMutex};
|
||||
m_databaseBackend.walCheckpointFull();
|
||||
}
|
||||
|
||||
private:
|
||||
void deferredBegin() override;
|
||||
|
||||
Reference in New Issue
Block a user