mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 02:03:04 +01:00
Backport fix for bug CORE-3521 : Delta file contents is not flushed to disk
This commit is contained in:
parent
af7d0384b8
commit
b97c3fb3ce
@ -1443,6 +1443,13 @@ void CCH_flush(thread_db* tdbb, USHORT flush_flag, SLONG tra_number)
|
||||
{
|
||||
PIO_flush(dbb->dbb_shadow->sdw_file);
|
||||
}
|
||||
|
||||
BackupManager* bm = dbb->dbb_backup_manager;
|
||||
const int backup_state = bm->get_state();
|
||||
|
||||
if (backup_state == nbak_state_stalled || backup_state == nbak_state_merge)
|
||||
bm->flush_difference();
|
||||
|
||||
tdbb->bumpStats(RuntimeStatistics::FLUSHES);
|
||||
}
|
||||
|
||||
|
@ -741,7 +741,13 @@ bool BackupManager::read_difference(thread_db* tdbb, ULONG diff_page, Ods::pag*
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void BackupManager::flush_difference()
|
||||
{
|
||||
if (diff_file)
|
||||
PIO_flush(diff_file);
|
||||
}
|
||||
|
||||
BackupManager::BackupManager(thread_db* tdbb, Database* _database, int ini_state) :
|
||||
dbCreating(false), database(_database), diff_file(NULL), alloc_table(NULL),
|
||||
last_allocated_page(0), current_scn(0), diff_name(*_database->dbb_permanent),
|
||||
|
@ -260,6 +260,7 @@ public:
|
||||
// Must have ISC_STATUS because it is called from write_page
|
||||
bool write_difference(ISC_STATUS* status, ULONG diff_page, Ods::pag* page);
|
||||
bool read_difference(thread_db* tdbb, ULONG diff_page, Ods::pag* page);
|
||||
void flush_difference();
|
||||
|
||||
void openDelta();
|
||||
void closeDelta();
|
||||
|
Loading…
Reference in New Issue
Block a user