mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 06:43:03 +01:00
Fixed bug CORE-3812 : Connection lost to database during massive dropping and altering primary keys of tables
This commit is contained in:
parent
db53636033
commit
d408de8899
@ -2401,8 +2401,7 @@ void CMP_decrement_prc_use_count(thread_db* tdbb, jrd_prc* procedure)
|
|||||||
( (*tdbb->getDatabase()->dbb_procedures)[procedure->prc_id] != procedure)) // &procedure->prc_header))
|
( (*tdbb->getDatabase()->dbb_procedures)[procedure->prc_id] != procedure)) // &procedure->prc_header))
|
||||||
{
|
{
|
||||||
if (procedure->prc_request) {
|
if (procedure->prc_request) {
|
||||||
CMP_release(tdbb, procedure->prc_request);
|
MET_release_procedure_request(tdbb, procedure);
|
||||||
procedure->prc_request = NULL;
|
|
||||||
}
|
}
|
||||||
procedure->prc_flags &= ~PRC_being_altered;
|
procedure->prc_flags &= ~PRC_being_altered;
|
||||||
MET_remove_procedure(tdbb, procedure->prc_id, procedure);
|
MET_remove_procedure(tdbb, procedure->prc_id, procedure);
|
||||||
|
@ -3639,8 +3639,7 @@ static bool delete_procedure(thread_db* tdbb,
|
|||||||
Arg::Gds(isc_obj_in_use) << Arg::Str(work->dfw_name));
|
Arg::Gds(isc_obj_in_use) << Arg::Str(work->dfw_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
CMP_release(tdbb, procedure->prc_request);
|
MET_release_procedure_request(tdbb, procedure);
|
||||||
procedure->prc_request = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* delete dependency lists */
|
/* delete dependency lists */
|
||||||
@ -5085,8 +5084,7 @@ static bool modify_procedure(thread_db* tdbb,
|
|||||||
|
|
||||||
/* release the request */
|
/* release the request */
|
||||||
|
|
||||||
CMP_release(tdbb, procedure->prc_request);
|
MET_release_procedure_request(tdbb, procedure);
|
||||||
procedure->prc_request = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* delete dependency lists */
|
/* delete dependency lists */
|
||||||
|
@ -575,8 +575,8 @@ void MET_clear_cache(thread_db* tdbb)
|
|||||||
procedure->prc_int_use_count >= 0 &&
|
procedure->prc_int_use_count >= 0 &&
|
||||||
procedure->prc_use_count == procedure->prc_int_use_count )
|
procedure->prc_use_count == procedure->prc_int_use_count )
|
||||||
{
|
{
|
||||||
CMP_release(tdbb, procedure->prc_request);
|
MET_release_procedure_request(tdbb, procedure);
|
||||||
procedure->prc_request = NULL;
|
|
||||||
LCK_release(tdbb, procedure->prc_existence_lock);
|
LCK_release(tdbb, procedure->prc_existence_lock);
|
||||||
procedure->prc_existence_lock = NULL;
|
procedure->prc_existence_lock = NULL;
|
||||||
procedure->prc_flags |= PRC_obsolete;
|
procedure->prc_flags |= PRC_obsolete;
|
||||||
@ -678,6 +678,15 @@ bool MET_procedure_in_use(thread_db* tdbb, jrd_prc* proc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MET_release_procedure_request(thread_db* tdbb, jrd_prc* procedure)
|
||||||
|
{
|
||||||
|
CMP_release(tdbb, procedure->prc_request);
|
||||||
|
procedure->prc_request = NULL;
|
||||||
|
procedure->prc_input_fmt = procedure->prc_output_fmt = NULL;
|
||||||
|
procedure->prc_flags &= ~PRC_scanned;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MET_activate_shadow(thread_db* tdbb)
|
void MET_activate_shadow(thread_db* tdbb)
|
||||||
{
|
{
|
||||||
/**************************************
|
/**************************************
|
||||||
@ -3311,8 +3320,7 @@ jrd_prc* MET_procedure(thread_db* tdbb, int id, bool noscan, USHORT flags)
|
|||||||
catch (const Firebird::Exception&)
|
catch (const Firebird::Exception&)
|
||||||
{
|
{
|
||||||
if (procedure->prc_request) {
|
if (procedure->prc_request) {
|
||||||
CMP_release(tdbb, procedure->prc_request);
|
MET_release_procedure_request(tdbb, procedure);
|
||||||
procedure->prc_request = NULL;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dbb->deletePool(csb_pool);
|
dbb->deletePool(csb_pool);
|
||||||
|
@ -116,6 +116,7 @@ void MET_verify_cache(Jrd::thread_db*);
|
|||||||
#endif
|
#endif
|
||||||
void MET_clear_cache(Jrd::thread_db*);
|
void MET_clear_cache(Jrd::thread_db*);
|
||||||
bool MET_procedure_in_use(Jrd::thread_db*, Jrd::jrd_prc*);
|
bool MET_procedure_in_use(Jrd::thread_db*, Jrd::jrd_prc*);
|
||||||
|
void MET_release_procedure_request(Jrd::thread_db*, Jrd::jrd_prc*);
|
||||||
void MET_remove_procedure(Jrd::thread_db*, int, Jrd::jrd_prc*);
|
void MET_remove_procedure(Jrd::thread_db*, int, Jrd::jrd_prc*);
|
||||||
void MET_revoke(Jrd::thread_db*, Jrd::jrd_tra*, const TEXT*, const TEXT*, const TEXT*);
|
void MET_revoke(Jrd::thread_db*, Jrd::jrd_tra*, const TEXT*, const TEXT*, const TEXT*);
|
||||||
void MET_scan_relation(Jrd::thread_db*, Jrd::jrd_rel*);
|
void MET_scan_relation(Jrd::thread_db*, Jrd::jrd_rel*);
|
||||||
|
Loading…
Reference in New Issue
Block a user