mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 14:03:02 +01:00
Fixed CORE-4267: Server crashes while sweeping the database.
This commit is contained in:
parent
1e0956dd06
commit
679de0fb65
@ -154,6 +154,7 @@ enum irq_type_t
|
||||
irq_default_cs, // DSQL/METD: lookup the default charset
|
||||
irq_rel_ids, // DSQL/METD: check relation/field ids
|
||||
irq_comp_circ_dpd, // check computed circular dependencies
|
||||
irq_l_curr_format, // lookup table's current format
|
||||
|
||||
irq_MAX
|
||||
};
|
||||
|
@ -956,8 +956,29 @@ Format* MET_current(thread_db* tdbb, jrd_rel* relation)
|
||||
return relation->rel_current_format;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
Database* dbb = tdbb->getDatabase();
|
||||
|
||||
return relation->rel_current_format = MET_format(tdbb, relation, relation->rel_current_fmt);
|
||||
if (!(relation->rel_flags & REL_scanned))
|
||||
{
|
||||
jrd_req* request = CMP_find_request(tdbb, irq_l_curr_format, IRQ_REQUESTS);
|
||||
|
||||
FOR(REQUEST_HANDLE request)
|
||||
REL IN RDB$RELATIONS WITH REL.RDB$RELATION_ID EQ relation->rel_id
|
||||
{
|
||||
if (!REQUEST(irq_l_curr_format))
|
||||
REQUEST(irq_l_curr_format) = request;
|
||||
|
||||
relation->rel_current_fmt = REL.RDB$FORMAT;
|
||||
}
|
||||
END_FOR
|
||||
|
||||
if (!REQUEST(irq_l_curr_format))
|
||||
REQUEST(irq_l_curr_format) = request;
|
||||
}
|
||||
|
||||
relation->rel_current_format = MET_format(tdbb, relation, relation->rel_current_fmt);
|
||||
|
||||
return relation->rel_current_format;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user