mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 07:23: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:
parent
c7bff1082f
commit
e4e437eb3b
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user