Bugzilla – Attachment 64357 Details for
Bug 18651
Move of checkouts is still not correctly handled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18651: Use a READ and WRITE LOCK
Bug-18651-Use-a-READ-and-WRITE-LOCK.patch (text/plain), 1.50 KB, created by
Chris Cormack
on 2017-06-15 21:01:35 UTC
(
hide
)
Description:
Bug 18651: Use a READ and WRITE LOCK
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2017-06-15 21:01:35 UTC
Size:
1.50 KB
patch
obsolete
>From 5e769128f502ce1d246cce841163f98c45d65c5b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 24 May 2017 12:24:53 -0300 >Subject: [PATCH] Bug 18651: Use a READ and WRITE LOCK > >For more info, see: > commit be156d9ad9e5bcfadab34d44f90e04fd61e256ad > Bug 15854: Use a READ and WRITE LOCK on message_queue >and > commit b40456f7dd4b8a988f9c6a5718452936101cb8ff > Bug 18364: Do not LOCK/UNLOCK tables from tests > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > C4/Circulation.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 49827a86c9..62d6ed1c37 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2172,7 +2172,12 @@ sub MarkIssueReturned { > push @bind, $issue_id; > > # FIXME Improve the return value and handle it from callers >+ my $do_not_lock = ( exists $ENV{_} && $ENV{_} =~ m|prove| ) || $ENV{KOHA_NO_TABLE_LOCKS}; > $schema->txn_do(sub { >+ >+ C4::Context->dbh->do(q|LOCK TABLE message_queue READ|) unless $do_not_lock; >+ C4::Context->dbh->do(q|LOCK TABLE message_queue WRITE|) unless $do_not_lock; >+ > $dbh->do( $query, undef, @bind ); > > my $original_issue_id = $issue_id; >@@ -2209,6 +2214,8 @@ sub MarkIssueReturned { > my $patron = Koha::Patrons->find( $borrowernumber ); > $item->last_returned_by( $patron ); > } >+ >+ C4::Context->dbh->do(q|UNLOCK TABLES|) unless $do_not_lock; > }); > > return $issue_id; >-- >2.11.0
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 18651
:
63629
|
63630
|
63631
|
63632
|
63633
|
63634
|
63635
|
63636
|
63637
|
63654
|
63659
|
63706
|
64352
|
64353
|
64354
|
64355
|
64356
|
64357
|
64394
|
64395
|
64396
|
64397
|
64398
|
64399
|
64448
|
64449
|
64450
|
64451
|
64452
|
64453
|
64454
|
64455
|
64489
|
64490
|
64495
|
65134