Bugzilla – Attachment 125925 Details for
Bug 29138
LoadSearchHistoryToTheFirstLoggedUser should save 0 instead of "no"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29138: (QA follow-up) Changes to UPDATE
Bug-29138-QA-follow-up-Changes-to-UPDATE.patch (text/plain), 1.40 KB, created by
Marcel de Rooy
on 2021-10-08 06:38:58 UTC
(
hide
)
Description:
Bug 29138: (QA follow-up) Changes to UPDATE
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-10-08 06:38:58 UTC
Size:
1.40 KB
patch
obsolete
>From b7684a9315acec8a9045593c671e4565e909970b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 8 Oct 2021 06:30:13 +0000 >Subject: [PATCH] Bug 29138: (QA follow-up) Changes to UPDATE >Content-Type: text/plain; charset=utf-8 > >Move the condition to the WHERE clause. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Tested on NULL, 0, 1, 2, no, yes. (2 and yes become 0 too. Fine.) >Replaced IFNULL by COALESCE. >--- > installer/data/mysql/atomicupdate/Bug_29138.pl | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/Bug_29138.pl b/installer/data/mysql/atomicupdate/Bug_29138.pl >index 731099f8ac..2c46340a64 100755 >--- a/installer/data/mysql/atomicupdate/Bug_29138.pl >+++ b/installer/data/mysql/atomicupdate/Bug_29138.pl >@@ -6,12 +6,9 @@ return { > up => sub { > my ($args) = @_; > my ($dbh, $out) = @$args{qw(dbh out)}; >- # Do you stuffs here > $dbh->do(q{ >- UPDATE systempreferences SET value= IF(value='no',0,1) >- WHERE variable = 'LoadSearchHistoryToTheFirstLoggedUser'; >- }); >- # Print useful stuff here >- say $out "LoadSearchHistoryToTheFirstLoggedUser updated"; >+ UPDATE systempreferences SET value=0 >+ WHERE variable='LoadSearchHistoryToTheFirstLoggedUser' AND COALESCE(value,0)<>1; >+ }); > }, > } >-- >2.20.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 29138
:
125462
|
125717
|
125856
|
125886
|
125922
|
125923
|
125924
|
125925
|
125992