| 495 | // |
| 496 | |
| 497 | static 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()) |
no test coverage detected