mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 14:03:02 +01:00
Backported fix for CORE-2876: Wrong backup mode when using "alter database add difference file"
This commit is contained in:
parent
569200e719
commit
2519440c2b
@ -202,8 +202,6 @@ void BackupManager::beginBackup(thread_db* tdbb)
|
||||
|
||||
WIN window(HEADER_PAGE_NUMBER);
|
||||
|
||||
try
|
||||
{
|
||||
StateWriteGuard stateGuard(tdbb, &window);
|
||||
Ods::header_page* header = (Ods::header_page*) window.win_buffer;
|
||||
|
||||
@ -213,10 +211,21 @@ void BackupManager::beginBackup(thread_db* tdbb)
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Create file
|
||||
NBAK_TRACE(("Creating difference file %s", diff_name.c_str()));
|
||||
diff_file = PIO_create(database, diff_name, true, false, false);
|
||||
}
|
||||
catch (const Firebird::Exception&)
|
||||
{
|
||||
// no reasons to set it to unknown if we just failed to open difference file
|
||||
backup_state = nbak_state_normal;
|
||||
throw;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (database->dbb_flags & (DBB_force_write | DBB_no_fs_cache))
|
||||
{
|
||||
PIO_force_write(diff_file,
|
||||
|
Loading…
Reference in New Issue
Block a user