mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 04:03:03 +01:00
Final part of the solution for CORE-1938: fixed synchronization.
This commit is contained in:
parent
59743d0fdf
commit
ee312b0920
@ -3404,6 +3404,7 @@ static bool delete_relation(thread_db* tdbb, SSHORT phase, DeferredWork* work,
|
||||
}
|
||||
|
||||
relation->rel_flags &= ~REL_deleting;
|
||||
relation->rel_flags &= ~REL_check_existence;
|
||||
return false;
|
||||
|
||||
case 1:
|
||||
@ -3476,6 +3477,8 @@ static bool delete_relation(thread_db* tdbb, SSHORT phase, DeferredWork* work,
|
||||
isc_arg_string, ERR_cstring(work->dfw_name),
|
||||
isc_arg_end);
|
||||
}
|
||||
|
||||
relation->rel_flags |= REL_check_existence;
|
||||
return true;
|
||||
|
||||
case 3:
|
||||
@ -3573,6 +3576,7 @@ static bool delete_relation(thread_db* tdbb, SSHORT phase, DeferredWork* work,
|
||||
// Mark relation in the cache as dropped
|
||||
relation->rel_flags |= REL_deleted;
|
||||
relation->rel_flags &= ~REL_deleting;
|
||||
relation->rel_flags &= ~REL_check_existence;
|
||||
|
||||
// Release relation triggers
|
||||
MET_release_triggers(tdbb, &relation->rel_pre_store);
|
||||
|
@ -2951,9 +2951,11 @@ void MET_post_existence(thread_db* tdbb, jrd_rel* relation)
|
||||
**************************************/
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
if (++relation->rel_use_count == 1 &&
|
||||
!MET_lookup_relation_id(tdbb, relation->rel_id, false))
|
||||
relation->rel_use_count++;
|
||||
|
||||
if (!MET_lookup_relation_id(tdbb, relation->rel_id, false))
|
||||
{
|
||||
relation->rel_use_count--;
|
||||
ERR_post(isc_relnotdef, isc_arg_string, ERR_string(relation->rel_name), isc_arg_end);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user