| 654 | |
| 655 | |
| 656 | bool 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 | |
| 689 | static int validate(Firebird::UtilSvc* svc) |
no test coverage detected