File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -4095,9 +4095,13 @@ static void scan_relation(thread_db* tdbb, jrd_rel* relation)
40954095 AutoCacheRequest request(tdbb, irq_r_fields, IRQ_REQUESTS);
40964096 CompilerScratch* csb = NULL;
40974097
4098+ bool found = false;
4099+
40984100 FOR(REQUEST_HANDLE request)
40994101 REL IN RDB$RELATIONS WITH REL.RDB$RELATION_ID EQ relation->rel_id
41004102 {
4103+ found = true;
4104+
41014105 // Pick up relation level stuff
41024106 relation->rel_current_fmt = REL.RDB$FORMAT;
41034107 vec<jrd_fld*>* vector = relation->rel_fields =
@@ -4371,6 +4375,27 @@ static void scan_relation(thread_db* tdbb, jrd_rel* relation)
43714375
43724376 delete csb;
43734377
4378+ if (!found && !(relation->rel_flags & REL_scanned))
4379+ {
4380+ // Relation was not found in RDB$RELATIONS. It could be system virtual relation
4381+ // defined in INI.
4382+
4383+ if (relation->isSystem() && relation->isVirtual())
4384+ {
4385+ relation->rel_flags |= REL_scanned;
4386+ }
4387+ else
4388+ {
4389+ fb_assert(false);
4390+
4391+ string name(relation->rel_name);
4392+ if (name.isEmpty())
4393+ name.printf("<ID = %u>", relation->rel_id);
4394+
4395+ ERR_post(Arg::Gds(isc_relnotdef) << Arg::Str(name));
4396+ }
4397+ }
4398+
43744399 // We have just loaded the triggers onto the local vector triggers.
43754400 // It's now time to place them at their rightful place inside the relation block.
43764401
You can’t perform that action at this time.
0 commit comments