From 85e274bf05342db7c469b17af4c292df246055de Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 16 Sep 2025 16:36:01 +0200 Subject: [PATCH] Bug 39526: Prevent other prefs to be renamed There is only one pref. It feel safer to rename this specific pref than other pref that might not be ES related. Other prefs starting with "ES" could be added, then this patch backported, etc. Signed-off-by: Jonathan Druart --- ...9526_unify_syspref_variable_names_for_elasticsearch.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_39526_unify_syspref_variable_names_for_elasticsearch.pl b/installer/data/mysql/atomicupdate/bug_39526_unify_syspref_variable_names_for_elasticsearch.pl index 0a9cb7e1489..a7dfc62ed19 100755 --- a/installer/data/mysql/atomicupdate/bug_39526_unify_syspref_variable_names_for_elasticsearch.pl +++ b/installer/data/mysql/atomicupdate/bug_39526_unify_syspref_variable_names_for_elasticsearch.pl @@ -8,11 +8,9 @@ return { my ($args) = @_; my ( $dbh, $out ) = @$args{qw(dbh out)}; - # Do you stuffs here $dbh->do( - q{update systempreferences set variable = REGEXP_REPLACE(variable, '^ES', 'Elasticsearch') where variable like 'ES%'} - ); - - say $out "Renamed system preference 'ES..' to 'Elasticsearch..'"; + q{UPDATE systempreferences SET variable = 'ElasticsearchPreventAutoTruncate' WHERE variable = 'ESPreventAutoTruncate'} + ) == 1 + && say $out "Renamed system preference 'ESPreventAutoTruncate' to 'ElasticsearchPreventAutoTruncate'"; }, }; -- 2.34.1