From 4c38a9337a58220ba9e574051c18d106b192602f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 23 Jan 2025 12:54:14 +0100 Subject: [PATCH] Bug 38794: say_success only if updated Signed-off-by: Jonathan Druart --- installer/data/mysql/atomicupdate/bug_38794.pl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_38794.pl b/installer/data/mysql/atomicupdate/bug_38794.pl index 4b027659eb3..443eccc4327 100755 --- a/installer/data/mysql/atomicupdate/bug_38794.pl +++ b/installer/data/mysql/atomicupdate/bug_38794.pl @@ -8,12 +8,15 @@ return { my ($args) = @_; my ( $dbh, $out ) = @$args{qw(dbh out)}; - # Do you stuffs here $dbh->do( - q{update authorised_values set lib = "Aggregated full text" where category = "ERM_PACKAGE_CONTENT_TYPE" and authorised_value = "AggregatedFullText" and lib = "Aggregated full"} - ); - - say_success( $out, "Updated description of authorized value AggregatedFullText" ); + q{ + UPDATE authorised_values + SET lib = "Aggregated full text" + WHERE category = "ERM_PACKAGE_CONTENT_TYPE" + AND authorised_value = "AggregatedFullText" + AND lib = "Aggregated full" + } + ) == 1 && say_success( $out, "Updated description of authorized value AggregatedFullText" ); }, }; -- 2.34.1