Bugzilla – Attachment 3516 Details for
Bug 6001
batchRebuildBiblioTables.pl crashes when GetMarcBiblio fails.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-6001-batchRebuildBiblioTables.pl-doesn-t-crash-a.patch (text/plain), 1.60 KB, created by
Chris Cormack
on 2011-03-29 23:20:16 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-03-29 23:20:16 UTC
Size:
1.60 KB
patch
obsolete
>From 83229e3edcb80cb59ecfe2631f3f81ff419d9ad8 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Thu, 1 Apr 2010 16:07:25 +0200 >Subject: [PATCH] Bug 6001 : batchRebuildBiblioTables.pl doesn't crash anymore when GetMarcBiblio fails. > Unprocessed biblionumbers are displayed at the end of the execution instead. > >Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com> >--- > misc/batchRebuildBiblioTables.pl | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > >diff --git a/misc/batchRebuildBiblioTables.pl b/misc/batchRebuildBiblioTables.pl >index b15a91a..ae4f54e 100755 >--- a/misc/batchRebuildBiblioTables.pl >+++ b/misc/batchRebuildBiblioTables.pl >@@ -58,9 +58,14 @@ my $sth = $dbh->prepare("SELECT biblionumber FROM biblio"); > $sth->execute; > # my ($biblionumbermax) = $sth->fetchrow; > # warn "$biblionumbermax <<=="; >+my @errors; > while (my ($biblionumber)= $sth->fetchrow) { > #now, parse the record, extract the item fields, and store them in somewhere else. > my $record = GetMarcBiblio($biblionumber); >+ if (not defined $record) { >+ push @errors, $biblionumber; >+ next; >+ } > my @fields = $record->field($tagfield); > my @items; > my $nbitems=0; >@@ -82,6 +87,9 @@ while (my ($biblionumber)= $sth->fetchrow) { > # $dbh->do("unlock tables"); > my $timeneeded = time() - $starttime; > print "$i MARC record done in $timeneeded seconds\n"; >+if (scalar(@errors) > 0) { >+ print "Some biblionumber could not be processed though: ", join(" ", @errors); >+} > > # modified NEWmodbiblio to jump the MARC part of the biblio modif > # highly faster >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6001
:
3516
|
4019