8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 00:03: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:
hvlad 2012-04-12 10:48:02 +00:00
parent db53636033
commit d408de8899
4 changed files with 16 additions and 10 deletions

View File

@ -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))
{
if (procedure->prc_request) {
CMP_release(tdbb, procedure->prc_request);
procedure->prc_request = NULL;
MET_release_procedure_request(tdbb, procedure);
}
procedure->prc_flags &= ~PRC_being_altered;
MET_remove_procedure(tdbb, procedure->prc_id, procedure);

View File

@ -3639,8 +3639,7 @@ static bool delete_procedure(thread_db* tdbb,
Arg::Gds(isc_obj_in_use) << Arg::Str(work->dfw_name));
}
CMP_release(tdbb, procedure->prc_request);
procedure->prc_request = 0;
MET_release_procedure_request(tdbb, procedure);
}
/* delete dependency lists */
@ -5085,8 +5084,7 @@ static bool modify_procedure(thread_db* tdbb,
/* release the request */
CMP_release(tdbb, procedure->prc_request);
procedure->prc_request = 0;
MET_release_procedure_request(tdbb, procedure);
}
/* delete dependency lists */

View File

@ -575,8 +575,8 @@ void MET_clear_cache(thread_db* tdbb)
procedure->prc_int_use_count >= 0 &&
procedure->prc_use_count == procedure->prc_int_use_count )
{
CMP_release(tdbb, procedure->prc_request);
procedure->prc_request = NULL;
MET_release_procedure_request(tdbb, procedure);
LCK_release(tdbb, procedure->prc_existence_lock);
procedure->prc_existence_lock = NULL;
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)
{
/**************************************
@ -3311,8 +3320,7 @@ jrd_prc* MET_procedure(thread_db* tdbb, int id, bool noscan, USHORT flags)
catch (const Firebird::Exception&)
{
if (procedure->prc_request) {
CMP_release(tdbb, procedure->prc_request);
procedure->prc_request = NULL;
MET_release_procedure_request(tdbb, procedure);
}
else {
dbb->deletePool(csb_pool);

View File

@ -116,6 +116,7 @@ void MET_verify_cache(Jrd::thread_db*);
#endif
void MET_clear_cache(Jrd::thread_db*);
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_revoke(Jrd::thread_db*, Jrd::jrd_tra*, const TEXT*, const TEXT*, const TEXT*);
void MET_scan_relation(Jrd::thread_db*, Jrd::jrd_rel*);