From 73634e93fd044d68e6415601ebeab7dbcca5286e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 6 Jun 2024 07:30:37 +0100 Subject: [PATCH] Bug 36986: (follow-up) Ensure idempotency MySQL/MariaDB checks the primary key/unique constraint before WHERE clause when performing an UPDATE. As such, the lack of AutoLocation existing will not prevent a failure on a second run of the update. Signed-off-by: Martin Renvoize --- installer/data/mysql/db_revs/240600001.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/mysql/db_revs/240600001.pl b/installer/data/mysql/db_revs/240600001.pl index 1c9d611d20..a0e8f23122 100755 --- a/installer/data/mysql/db_revs/240600001.pl +++ b/installer/data/mysql/db_revs/240600001.pl @@ -10,7 +10,7 @@ return { $dbh->do( q{ - UPDATE systempreferences SET variable = "StaffLoginLibraryBasedOnIP" + UPDATE IGNORE systempreferences SET variable = "StaffLoginLibraryBasedOnIP" WHERE variable = "StaffLoginBranchBasedOnIP" } ) == 1 -- 2.39.5