Bugzilla – Attachment 143025 Details for
Bug 14783
Allow patrons to change pickup location for non-waiting holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14783: (follow-up) MySQL doesn't like selecting from a table it is updating
0001-Bug-14783-Followup-MySQL-doesn-t-like-selecting-from.patch (text/plain), 1.52 KB, created by
Michael Hafen
on 2022-11-02 18:16:55 UTC
(
hide
)
Description:
Bug 14783: (follow-up) MySQL doesn't like selecting from a table it is updating
Filename:
MIME Type:
Creator:
Michael Hafen
Created:
2022-11-02 18:16:55 UTC
Size:
1.52 KB
patch
obsolete
>From 27e449dd7d73786e3d8ba4b51b7189ce43787bde Mon Sep 17 00:00:00 2001 >From: Michael Hafen <michael.hafen@washk12.org> >Date: Wed, 2 Nov 2022 12:14:19 -0600 >Subject: [PATCH] Bug 14783 Followup - MySQL doesn't like selecting from a > table it's updating >Content-Type: text/plain; charset="utf-8" > >The value has to be selected separately. >--- > installer/data/mysql/db_revs/220600064.pl | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/db_revs/220600064.pl b/installer/data/mysql/db_revs/220600064.pl >index afd6b73d88..e5fa6f9ec5 100755 >--- a/installer/data/mysql/db_revs/220600064.pl >+++ b/installer/data/mysql/db_revs/220600064.pl >@@ -12,11 +12,17 @@ return { > VALUES ('OPACAllowUserToChangeBranch','','Pending, In-Transit, Suspended','Allow users to change the library to pick up a hold for these statuses:','multiple'); > }); > >+ my ($value) = $dbh->selectrow_array(q{ >+ SELECT CASE WHEN value=1 THEN 'intransit' ELSE '' END >+ FROM systempreferences >+ WHERE variable='OPACInTransitHoldPickupLocationChange' >+ }); >+ > $dbh->do(q{ > UPDATE systempreferences >- SET value=(SELECT CASE WHEN value=1 THEN 'intransit' ELSE '' END FROM systempreferences WHERE variable='OPACInTransitHoldPickupLocationChange') >+ SET value=(?) > WHERE variable='OPACAllowUserToChangeBranch' >- }); >+ },undef,$value); > > say $out "Added new system preference 'OPACAllowUserToChangeBranch'"; > >-- >2.34.1 >
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 14783
:
118189
|
118241
|
123199
|
123271
|
123708
|
123709
|
127488
|
127490
|
127492
|
130344
|
130345
|
130346
|
130347
|
141499
|
141500
|
141501
|
141502
|
141727
|
141728
|
141729
|
141730
|
142009
|
142010
|
142011
|
142012
|
142013
|
142014
|
142015
| 143025