Lines 681-694
sub BatchCommitRecords {
Link Here
|
681 |
ModAuthority($recordid, $marc_record, GuessAuthTypeCode($marc_record)); |
681 |
ModAuthority($recordid, $marc_record, GuessAuthTypeCode($marc_record)); |
682 |
$query = "UPDATE import_auths SET matched_authid = ? WHERE import_record_id = ?"; |
682 |
$query = "UPDATE import_auths SET matched_authid = ? WHERE import_record_id = ?"; |
683 |
} |
683 |
} |
684 |
my $sth = $dbh->prepare_cached("UPDATE import_records SET marcxml_old = ? WHERE import_record_id = ?"); |
684 |
# Combine xml update, SetImportRecordOverlayStatus, and SetImportRecordStatus updates into a single update for efficiency, especially in a transaction |
685 |
$sth->execute($oldxml, $rowref->{'import_record_id'}); |
685 |
my $sth = $dbh->prepare_cached("UPDATE import_records SET marcxml_old = ?, status = ?, overlay_status = ? WHERE import_record_id = ?"); |
|
|
686 |
$sth->execute($oldxml, 'imported', 'match_applied',, $rowref->{'import_record_id'}); |
686 |
$sth->finish(); |
687 |
$sth->finish(); |
687 |
my $sth2 = $dbh->prepare_cached($query); |
688 |
my $sth2 = $dbh->prepare_cached($query); |
688 |
$sth2->execute($recordid, $rowref->{'import_record_id'}); |
689 |
$sth2->execute($recordid, $rowref->{'import_record_id'}); |
689 |
$sth2->finish(); |
690 |
$sth2->finish(); |
690 |
SetImportRecordOverlayStatus($rowref->{'import_record_id'}, 'match_applied'); |
|
|
691 |
SetImportRecordStatus($rowref->{'import_record_id'}, 'imported'); |
692 |
} elsif ($record_result eq 'ignore') { |
691 |
} elsif ($record_result eq 'ignore') { |
693 |
$recordid = $record_match; |
692 |
$recordid = $record_match; |
694 |
$num_ignored++; |
693 |
$num_ignored++; |
695 |
- |
|
|