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

Function VAL_validate

src/jrd/validation.cpp:656–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

654
655
656bool VAL_validate(thread_db* tdbb, USHORT switches)
657{
658/**************************************
659 *
660 * V A L _ v a l i d a t e
661 *
662 **************************************
663 *
664 * Functional description
665 * Validate a database.
666 *
667 **************************************/
668
669 SET_TDBB(tdbb);
670 Attachment* att = tdbb->getAttachment();
671
672 if (!att->att_validation)
673 att->att_validation = FB_NEW_POOL (*att->att_pool) Validation(tdbb);
674
675 USHORT flags = 0;
676 if (switches & isc_dpb_records)
677 flags |= Validation::VDR_records;
678
679 if (switches & isc_dpb_repair)
680 flags |= Validation::VDR_repair;
681
682 if (!(switches & isc_dpb_no_update))
683 flags |= Validation::VDR_update;
684
685 return att->att_validation->run(tdbb, flags);
686}
687
688
689static int validate(Firebird::UtilSvc* svc)

Callers 1

internalAttachMethod · 0.85

Calls 4

SET_TDBBFunction · 0.85
ValidationClass · 0.70
getAttachmentMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected