]> git.koha-community.org Git - koha.git/commit
Bug 17539: Fix Already in a transaction error
authorLari Taskula <lari.taskula@jns.fi>
Wed, 2 Nov 2016 13:05:28 +0000 (15:05 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 4 Nov 2016 11:13:03 +0000 (11:13 +0000)
commitc414e7608956ca04648aed1a15b79c5cd281fb3c
tree319dc750615fdafb71601a3b9d0effcaa6019045
parente0e88806fae409e6ec6e360f5e82f55a45ca0e96
Bug 17539: Fix Already in a transaction error

perl t/db_dependent/Reserves.t

1..72
ok 1 - use C4::Reserves;
ok 2 - CheckReserves Test 1
...
ok 52 - Reserve in waiting status cant be canceled
ok 53 - Reserving an ageRestricted Biblio without a borrower dateofbirth succeeds
DBD::mysql::db begin_work failed: Already in a transaction at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1489.
DBD::mysql::db begin_work failed: Already in a transaction at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1489.
at /usr/share/perl5/DBIx/Class/Schema.pm line 1080.
...
Koha::Object::store('Koha::Patron=HASH(0x9e43b20)') called at
/home/ubuntu/kohaclone/C4/Members.pm line 542
C4::Members::ModMember('borrowernumber', 658535, 'dateofbirth', '2001-11-02')
called at t/db_dependent/Reserves.t line 516

This patch fixes this issue by replacing dbh autocommit=0 with
txn_begin.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
t/db_dependent/Reserves.t