]> git.koha-community.org Git - koha.git/commit
Bug 10961: Error in GetMarcBiblio can cause severe data loss
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 27 Sep 2013 16:53:39 +0000 (12:53 -0400)
committerMason James <mtj@kohaaloha.com>
Fri, 28 Aug 2015 02:55:24 +0000 (14:55 +1200)
commit5a6a263d8f2482074fe187b124af6a4008924a3a
tree266eb8f2da6f1bbe61c4d4cc2523ef11b7603ab5
parent34e69a4a9eb8449c400cf928d9c3701cc8eab45f
Bug 10961: Error in GetMarcBiblio can cause severe data loss

A bug in GetMarcBiblio can cause severe data loss if your database has
records where the biblionumber and biblioitemnumber do not match and the
script misc/batchRebuildBiblioTables.pl is run.

The Biblio::GetMarcBiblio makes a kall to
C4::Biblio::_koha_marc_update_bib_ids which passes the biblionumber as
both the biblionumber *and the biblioitemnumber*.

Thus, if your biblio and biblioitem numbers are not always equal, you
will end up with a record where the biblioitemnumber is incorrect in the
record!

This is usually not a severe issue, but since batchRebuildBiblioTables
uses that record to update the database tables, it ends up updating the
wrong biblioitem row!

NOTE: What a horrible, horrible typo that was. Tested this with the
      second patch.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit 298c4c76a5f231d9cc0935b6f14a5f191b727804)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
C4/Biblio.pm