MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / CMP_post_resource

Function CMP_post_resource

src/jrd/cmp.cpp:365–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363
364
365void CMP_post_resource( ResourceList* rsc_ptr, void* obj, Resource::rsc_s type, USHORT id)
366{
367/**************************************
368 *
369 * C M P _ p o s t _ r e s o u r c e
370 *
371 **************************************
372 *
373 * Functional description
374 * Post a resource usage to the compiler scratch block.
375 *
376 **************************************/
377 // Initialize resource block
378 Resource resource(type, id, NULL, NULL, NULL);
379 switch (type)
380 {
381 case Resource::rsc_relation:
382 case Resource::rsc_index:
383 resource.rsc_rel = (jrd_rel*) obj;
384 break;
385 case Resource::rsc_procedure:
386 case Resource::rsc_function:
387 resource.rsc_routine = (Routine*) obj;
388 break;
389 case Resource::rsc_collation:
390 resource.rsc_coll = (Collation*) obj;
391 break;
392 default:
393 BUGCHECK(220); // msg 220 unknown resource
394 break;
395 }
396
397 // Add it into list if not present already
398 FB_SIZE_T pos;
399 if (!rsc_ptr->find(resource, pos))
400 rsc_ptr->insert(pos, resource);
401}
402
403
404void CMP_release(thread_db* tdbb, Request* request)

Callers 5

pass1Method · 0.85
pass1Method · 0.85
pass1StoreMethod · 0.85
pass1SourceMethod · 0.85
makeIndexScanNodeMethod · 0.85

Calls 2

findMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected