]> git.koha-community.org Git - koha.git/commit
Bug 18651: Do no LOCK/UNLOCK the table
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 21 Jun 2017 17:14:09 +0000 (14:14 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 22 Jun 2017 07:43:17 +0000 (09:43 +0200)
commita486fcf4de6ed1b54289f93542258df2f0f20d97
treec25916d2ce5c5a20f142d0e09556d987211fcd85
parentc3fb7e80a9f38b6714b5c27660add9f9a47c805d
Bug 18651: Do no LOCK/UNLOCK the table

We cannot LOCK the old_issues table here, other tables are accessed and DBIx::Class rename it with "me":
DBD::mysql::st execute failed: Table 'me' was not locked with LOCK
TABLES [for Statement "SELECT `me`.`issue_id`, `me`.`borrowernumber`,
`me`.`itemnumber`, `me`.`date_due`, `me`.`branchcode`,
`me`.`returndate`, `me`.`lastreneweddate`, `me`.`renewals`,
`me`.`auto_renew`, `me`.`auto_renew_error`, `me`.`timestamp`,
`me`.`issuedate`, `me`.`onsite_checkout`, `me`.`note`, `me`.`notedate`
FROM `old_issues` `me` WHERE ( `me`.`issue_id` = ? )" with ParamValues:
0='2'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

Consequence: We could have a checkin refused if there is a race, but
this is the simplest and safest way to fix it.

(cherry picked from commit 905572910b3af03d86fdbd3e52c72614f41c978b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Circulation.pm