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

Function shutdown

src/jrd/shut.cpp:507–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505
506
507static bool shutdown(thread_db* tdbb, SSHORT flag, bool force)
508{
509/**************************************
510 *
511 * s h u t d o w n
512 *
513 **************************************
514 *
515 * Functional description
516 * Initiate database shutdown.
517 *
518 **************************************/
519 Database* const dbb = tdbb->getDatabase();
520
521 // Mark database and all active attachments as shutdown
522
523 dbb->dbb_ast_flags &= ~(DBB_shutdown | DBB_shutdown_single | DBB_shutdown_full);
524
525 switch (flag & isc_dpb_shut_mode_mask)
526 {
527 case isc_dpb_shut_normal:
528 break;
529 case isc_dpb_shut_multi:
530 dbb->dbb_ast_flags |= DBB_shutdown;
531 break;
532 case isc_dpb_shut_single:
533 dbb->dbb_ast_flags |= DBB_shutdown | DBB_shutdown_single;
534 break;
535 case isc_dpb_shut_full:
536 dbb->dbb_ast_flags |= DBB_shutdown | DBB_shutdown_full;
537 break;
538 default:
539 fb_assert(false);
540 }
541
542 if (force)
543 {
544 JRD_shutdown_attachments(dbb);
545 return true;
546 }
547
548 return false;
549}

Callers 14

abort_aux_connectionFunction · 0.85
disconnectFunction · 0.85
force_closeFunction · 0.85
select_multiFunction · 0.85
~XnetEndPointMethod · 0.85
SRVR_multi_threadFunction · 0.85
~TargetMethod · 0.85
~DsqlStatementCacheMethod · 0.85
shutdownMethod · 0.85
SHUT_blocking_astFunction · 0.85
SHUT_databaseFunction · 0.85
~MappingIpcMethod · 0.85

Calls 2

JRD_shutdown_attachmentsFunction · 0.85
getDatabaseMethod · 0.80

Tested by

no test coverage detected