@@ -115,7 +115,6 @@ static int blocking_ast_relation(void*);
115115static int partners_ast_relation(void*);
116116static int rescan_ast_relation(void*);
117117static ULONG get_rel_flags_from_FLAGS(USHORT);
118- static USHORT get_sysrel_ods(jrd_rel*);
119118static void get_trigger(thread_db*, jrd_rel*, bid*, bid*, TrigVector**, const TEXT*, FB_UINT64, SSHORT,
120119 USHORT, const MetaName&, const string&, const bid*, Nullable<bool> ssDefiner);
121120static bool get_type(thread_db*, USHORT*, const UCHAR*, const TEXT*);
@@ -4378,13 +4377,10 @@ static void scan_relation(thread_db* tdbb, jrd_rel* relation)
43784377
43794378 if (!found && !(relation->rel_flags & REL_scanned))
43804379 {
4381- // Relation was not found in RDB$RELATIONS. It could be system relation
4382- // defined in INI for latest supported ODS while database is in older ODS .
4380+ // Relation was not found in RDB$RELATIONS. It could be system virtual relation
4381+ // defined in INI.
43834382
4384- const USHORT dbbOds = ENCODE_ODS(dbb->dbb_ods_version, dbb->dbb_minor_version);
4385-
4386- if (relation->isSystem() && dbbOds < ODS_CURRENT_VERSION &&
4387- dbbOds < get_sysrel_ods(relation))
4383+ if (relation->isSystem() && relation->isVirtual())
43884384 {
43894385 relation->rel_flags |= REL_scanned;
43904386 }
@@ -4805,37 +4801,6 @@ ULONG MET_get_rel_flags_from_TYPE(USHORT type)
48054801}
48064802
48074803
4808- // Search system-defined list for given relation and return its ODS.
4809- // Return zero, if not found.
4810- static USHORT get_sysrel_ods(jrd_rel* relation)
4811- {
4812- if (relation->rel_id >= rel_MAX)
4813- return 0;
4814-
4815- #define RELATION(name, id, ods, type) id, ods,
4816- #define FIELD(symbol, name, id, update, ods)
4817- #define END_RELATION
4818-
4819- static const int rels[] =
4820- {
4821- #include "../jrd/relations.h"
4822- 0, 0
4823- };
4824-
4825- #undef RELATION
4826- #undef FIELD
4827- #undef END_RELATION
4828-
4829- for (int n = 0; n < FB_NELEM(rels); n += 2)
4830- {
4831- if (relation->rel_id == rels[n])
4832- return rels[n + 1];
4833- }
4834-
4835- return 0;
4836- }
4837-
4838-
48394804static void get_trigger(thread_db* tdbb, jrd_rel* relation,
48404805 bid* blob_id, bid* debug_blob_id, TrigVector** ptr,
48414806 const TEXT* name, FB_UINT64 type,
0 commit comments