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

Function print_description

src/alice/tdr.cpp:497–628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495//
496
497static void print_description(const tdr* trans)
498{
499 AliceGlobals* tdgbl = AliceGlobals::getSpecific();
500
501 if (!trans)
502 return;
503
504 if (!tdgbl->uSvc->isService())
505 ALICE_print(92); // msg 92: Multidatabase transaction:
506
507 bool prepared_seen = false;
508 for (const tdr* ptr = trans; ptr; ptr = ptr->tdr_next)
509 {
510 const auto host_site = ptr->tdr_host_site.nullStr();
511 if (host_site)
512 {
513 if (!tdgbl->uSvc->isService())
514 {
515 // msg 93: Host Site: %s
516 ALICE_print(93, SafeArg() << host_site);
517 }
518 tdgbl->uSvc->putLine(isc_spb_tra_host_site, host_site);
519 }
520
521 if (ptr->tdr_id)
522 {
523 if (!tdgbl->uSvc->isService())
524 {
525 // msg 94: Transaction %ld
526 ALICE_print(94, SafeArg() << ptr->tdr_id);
527 }
528 if (ptr->tdr_id > TraNumber(MAX_SLONG))
529 tdgbl->uSvc->putSInt64(isc_spb_tra_id_64, ptr->tdr_id);
530 else
531 tdgbl->uSvc->putSLong(isc_spb_tra_id, (SLONG) ptr->tdr_id);
532 }
533
534 switch (ptr->tdr_state)
535 {
536 case TRA_limbo:
537 if (!tdgbl->uSvc->isService())
538 {
539 ALICE_print(95); // msg 95: has been prepared.
540 }
541 tdgbl->uSvc->putChar(isc_spb_tra_state, isc_spb_tra_state_limbo);
542 prepared_seen = true;
543 break;
544
545 case TRA_commit:
546 if (!tdgbl->uSvc->isService())
547 {
548 ALICE_print(96); // msg 96: has been committed.
549 }
550 tdgbl->uSvc->putChar(isc_spb_tra_state, isc_spb_tra_state_commit);
551 break;
552
553 case TRA_rollback:
554 if (!tdgbl->uSvc->isService())

Callers 2

TDR_list_limboFunction · 0.85
TDR_reconnect_multipleFunction · 0.85

Calls 9

ALICE_printFunction · 0.85
TDR_analyzeFunction · 0.85
SafeArgClass · 0.50
isServiceMethod · 0.45
nullStrMethod · 0.45
putLineMethod · 0.45
putSInt64Method · 0.45
putSLongMethod · 0.45
putCharMethod · 0.45

Tested by

no test coverage detected