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

Method unloadCollation

src/jrd/intl.cpp:455–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453
454
455void CharSetContainer::unloadCollation(thread_db* tdbb, USHORT tt_id)
456{
457 const USHORT id = TTYPE_TO_COLLATION(tt_id);
458 fb_assert(id != 0);
459
460 if (id < charset_collations.getCount() && charset_collations[id] != NULL)
461 {
462 if (charset_collations[id]->useCount != 0)
463 {
464 ERR_post(Arg::Gds(isc_no_meta_update) <<
465 Arg::Gds(isc_obj_in_use) << Arg::Str(charset_collations[id]->name));
466 }
467
468 fb_assert(charset_collations[id]->existenceLock);
469
470 if (!charset_collations[id]->obsolete)
471 {
472 LCK_convert(tdbb, charset_collations[id]->existenceLock, LCK_EX, LCK_WAIT);
473 charset_collations[id]->obsolete = true;
474 LCK_release(tdbb, charset_collations[id]->existenceLock);
475 }
476 }
477 else
478 {
479 // signal other processes collation is gone
480 Lock* lock = CharSetContainer::createCollationLock(tdbb, tt_id);
481
482 LCK_lock(tdbb, lock, LCK_EX, LCK_WAIT);
483 LCK_release(tdbb, lock);
484
485 delete lock;
486 }
487}
488
489
490static void lookup_texttype(texttype* tt, const SubtypeInfo* info)

Callers 1

INTL_texttype_unloadFunction · 0.80

Calls 7

GdsClass · 0.85
StrClass · 0.85
LCK_convertFunction · 0.85
LCK_releaseFunction · 0.85
LCK_lockFunction · 0.85
ERR_postFunction · 0.70
getCountMethod · 0.45

Tested by

no test coverage detected