From 88d236358426b90a567ac16374b8eb642e1f3b78 Mon Sep 17 00:00:00 2001 From: Petro Vashchuk Date: Tue, 27 Apr 2021 12:50:56 +0300 Subject: [PATCH] Bug 11175: (follow-up) make atomic update idempotent Atomic update tries to insert line into system preferences even if it's already there. This patch fixes that by adding 'IGNORE' to the query, making it idempotent. Signed-off-by: Martin Renvoize Signed-off-by: Andrew Nugged --- installer/data/mysql/atomicupdate/bug_11175.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_11175.perl b/installer/data/mysql/atomicupdate/bug_11175.perl index 889a8163311..3f56e7e2c45 100644 --- a/installer/data/mysql/atomicupdate/bug_11175.perl +++ b/installer/data/mysql/atomicupdate/bug_11175.perl @@ -1,6 +1,6 @@ $DBversion = 'XXX'; # will be replaced by the RM if( CheckVersion( $DBversion ) ) { - $dbh->do("INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('ShowComponentRecords', 'nowhere', 'nowhere|staff|opac|both','In which record detail pages to show list of the component records, as linked via 773','Choice')"); + $dbh->do("INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('ShowComponentRecords', 'nowhere', 'nowhere|staff|opac|both','In which record detail pages to show list of the component records, as linked via 773','Choice')"); SetVersion( $DBversion ); print "Upgrade to $DBversion done (Bug 11175: Show component records in detail views)\n"; } -- 2.25.1