mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 00:03:02 +01:00
Misc.
This commit is contained in:
parent
2abf6778a4
commit
e5b1a902c7
@ -1304,7 +1304,7 @@ int gbak(Firebird::UtilSvc* uSvc)
|
||||
if (file->fil_fd != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
close_platf(file->fil_fd);
|
||||
|
||||
|
||||
if (exit_code != FINI_OK &&
|
||||
(tdgbl->action->act_action == ACT_backup_split || tdgbl->action->act_action == ACT_backup))
|
||||
{
|
||||
|
@ -1731,8 +1731,8 @@ bool set_diff_page(thread_db* tdbb, BufferDesc* bdb)
|
||||
|
||||
// At PAG_set_page_scn() below we could dirty SCN page and thus acquire
|
||||
// nbackup state lock recursively. Since RWLock allows it, we are safe.
|
||||
// Else we should release just taken state lock before call of
|
||||
// PAG_set_page_scn() and acquire it again. If current SCN changes meanwile
|
||||
// Else we should release just taken state lock before call of
|
||||
// PAG_set_page_scn() and acquire it again. If current SCN changes meanwhile
|
||||
// we should repeat whole process again...
|
||||
|
||||
win window(bdb->bdb_page);
|
||||
@ -4988,7 +4988,9 @@ static bool write_page(thread_db* tdbb, BufferDesc* bdb, FbStatusVector* const s
|
||||
|
||||
static void clear_dirty_flag_and_nbak_state(thread_db* tdbb, BufferDesc* bdb)
|
||||
{
|
||||
const AtomicCounter::counter_type oldFlags = bdb->bdb_flags.exchangeBitAnd(~(BDB_dirty | BDB_nbak_state_lock));
|
||||
const AtomicCounter::counter_type oldFlags = bdb->bdb_flags.exchangeBitAnd(
|
||||
~(BDB_dirty | BDB_nbak_state_lock));
|
||||
|
||||
if (oldFlags & BDB_nbak_state_lock)
|
||||
{
|
||||
NBAK_TRACE(("unlock state for dirty page %d:%06d",
|
||||
|
@ -119,7 +119,7 @@ void NBackupStateLock::blockingAstHandler(thread_db* tdbb)
|
||||
NBAK_TRACE_AST(("database FLUSHED"));
|
||||
}
|
||||
|
||||
{
|
||||
{ // scope
|
||||
Firebird::MutexUnlockGuard counterGuard(counterMutex, FB_FUNCTION);
|
||||
backup_manager->stateBlocking = !backup_manager->localStateLock.tryBeginWrite(FB_FUNCTION);
|
||||
if (backup_manager->stateBlocking)
|
||||
|
@ -502,7 +502,7 @@ private:
|
||||
bool shutDown;
|
||||
bool allocIsValid; // true, if alloc table cache is completely read from disk
|
||||
bool master; // this instance performs current begin\end backup process
|
||||
bool stateBlocking; // blolcking AST handler doesn't released stateLock
|
||||
bool stateBlocking; // blocking AST handler doesn't released stateLock
|
||||
|
||||
NBackupStateLock* stateLock;
|
||||
Firebird::RWLock localStateLock; // must be acquired before global stateLock
|
||||
|
@ -5562,7 +5562,8 @@ static void replace_record(thread_db* tdbb,
|
||||
}
|
||||
|
||||
|
||||
static void refresh_fk_fields(thread_db* tdbb, Record* old_rec, record_param* cur_rpb, record_param* new_rpb)
|
||||
static void refresh_fk_fields(thread_db* tdbb, Record* old_rec, record_param* cur_rpb,
|
||||
record_param* new_rpb)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -5571,7 +5572,7 @@ static void refresh_fk_fields(thread_db* tdbb, Record* old_rec, record_param* cu
|
||||
**************************************
|
||||
*
|
||||
* Functional description
|
||||
* Update new_rpb with foreign key fields values changed by cascade triggers.
|
||||
* Update new_rpb with foreign key fields values changed by cascade triggers.
|
||||
* Consider self-referenced foreign keys only.
|
||||
*
|
||||
* old_rec - old record before modify
|
||||
@ -5604,7 +5605,7 @@ static void refresh_fk_fields(thread_db* tdbb, Record* old_rec, record_param* cu
|
||||
idx.idx_id = idx_invalid;
|
||||
|
||||
if (BTR_lookup(tdbb, relation, (*relation->rel_foreign_refs.frgn_reference_ids)[i],
|
||||
&idx, relPages))
|
||||
&idx, relPages))
|
||||
{
|
||||
fb_assert(idx.idx_flags & idx_foreign);
|
||||
|
||||
@ -5629,7 +5630,7 @@ static void refresh_fk_fields(thread_db* tdbb, Record* old_rec, record_param* cu
|
||||
const bool flag_old = EVL_field(relation, old_rec, fld, &desc1);
|
||||
const bool flag_new = EVL_field(relation, new_rpb->rpb_record, fld, &desc2);
|
||||
|
||||
// If field was not changed by user - pick up possible modification by
|
||||
// If field was not changed by user - pick up possible modification by
|
||||
// system cascade trigger
|
||||
if (flag_old == flag_new &&
|
||||
(!flag_old || flag_old && MOV_compare(&desc1, &desc2) == 0))
|
||||
|
Loading…
Reference in New Issue
Block a user