]> git.koha-community.org Git - koha.git/commit
Bug 27245: Replace AutoCommit=0 with txn_begin in bulkmarcimport.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 18 Dec 2020 13:41:12 +0000 (14:41 +0100)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Thu, 14 Jan 2021 17:10:02 +0000 (17:10 +0000)
commitd26a4df948456b6d001b87458791686b0898323e
tree4f94a350b2545bda411dcb3388b59f5e3945e0c5
parent1fe6f0e4f966f002ec92080862a5e3b50c1cb578
Bug 27245: Replace AutoCommit=0 with txn_begin in bulkmarcimport.pl

To prevent
DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1588, <GEN45> line 1.

Test plan:
1 - Export more than 100 records
2 - Use bulkmarcimport (with -commit=10) to import them
    perl misc/migration_tools/bulkmarcimport.pl -b -file testbmi.xml -v -m=MARCXML --commit=10
3 - Modify a record to make the import fail (for instance having a too long
lccn)
4 - Use bulkmarcimport (with -commit=10) to import them
    perl misc/migration_tools/bulkmarcimport.pl -b -file testbmi.xml -v -m=MARCXML --commit=10
5 - Notice that the import stops but that the imported record are imported (apart from the last batch of 10)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4a90c0b647fdfdb0a39b43f6b10adba3bca53215)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f0dadd169b08f3b486ea387cdbb7f93c13b8d3db)
misc/migration_tools/bulkmarcimport.pl