8
0
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:
dimitr 2013-11-15 15:12:51 +00:00
parent 1e0956dd06
commit 679de0fb65
2 changed files with 23 additions and 1 deletions

View File

@ -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
};

View File

@ -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;
}