8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 04:03:03 +01:00

Relation must be locked for any DPM access. As it's normally done after request optimization, I put an extra lock into the optimizer.

This is one of the possible reasons for CORE-1938 to appear.
This commit is contained in:
dimitr 2008-06-26 11:01:07 +00:00
parent c7bff1082f
commit e4e437eb3b

View File

@ -44,6 +44,7 @@
#include "../jrd/evl_proto.h"
#include "../jrd/exe_proto.h"
#include "../jrd/intl_proto.h"
#include "../jrd/met_proto.h"
#include "../jrd/mov_proto.h"
#include "../jrd/par_proto.h"
@ -602,7 +603,10 @@ double OPT_getRelationCardinality(thread_db* tdbb, jrd_rel* relation, const Form
return (double) 10000;
}
return DPM_cardinality(tdbb, relation, format);
MET_post_existence(tdbb, relation);
const double cardinality = DPM_cardinality(tdbb, relation, format);
MET_release_existence(tdbb, relation);
return cardinality;
}