8
0
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:
hvlad 2012-03-19 08:02:54 +00:00
parent af7d0384b8
commit b97c3fb3ce
3 changed files with 15 additions and 1 deletions

View File

@ -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);
}

View File

@ -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),

View File

@ -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();