From 790df84a135be986124e7491789146f36d00e70f Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 13 Mar 2023 12:17:32 +0000 Subject: [PATCH] Bug 30624: Make DB update idempotent Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_30624_add_userflag.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_30624_add_userflag.pl b/installer/data/mysql/atomicupdate/bug_30624_add_userflag.pl index c4b1d5c845..db13f6c7c8 100755 --- a/installer/data/mysql/atomicupdate/bug_30624_add_userflag.pl +++ b/installer/data/mysql/atomicupdate/bug_30624_add_userflag.pl @@ -13,7 +13,7 @@ return { my $IndependentBranches = C4::Context->preference('IndependentBranches'); unless ( $IndependentBranches ) { $dbh->do(q{ - UPDATE borrowers SET flags = flags + (1<<29) WHERE flags & 4; + UPDATE borrowers SET flags = flags + (1<<29) WHERE ( flags & 4 AND !(flags & 1<<29) ) ; }); } }, -- 2.39.5