Bugzilla – Attachment 125992 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.52 KB, created by
Marcel de Rooy
on 2021-10-09 14:48:37 UTC
(
hide
)
Description:
Bug 29138: (QA follow-up) Changes to UPDATE
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-10-09 14:48:37 UTC
Size:
1.52 KB
patch
obsolete
>From d21d8d46a4be942d34014a920459a4d267419281 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, using COALESCE to >prevent mysqlism (IFNULL) and strings for strict SQL. > >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.) >Tested strict sql mode: no truncated incorrect DOUBLE value-error anymore. >--- > 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..8261ce111b 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