diff --git a/scripts/bash_lib.sh b/scripts/bash_lib.sh index 2cbb8aa7..35108094 100644 --- a/scripts/bash_lib.sh +++ b/scripts/bash_lib.sh @@ -462,8 +462,7 @@ upgrade_test_type() { ;; "major") major=${major_version%.*} - # intentionally twice, 11.5.3 has minor of 5. - minor=${major_version##*.} + # 11.5 has minor of 5 and major of 11 minor=${major_version##*.} # with the earliest supported 11.X version # and make this the upgrade from 10.11 @@ -477,7 +476,20 @@ upgrade_test_type() { exit 1 fi else - prev_major_version="$major.$((minor - 1))" + case $major_version in + "10.11") + prev_major_version="10.6" + ;; + "11.4") + prev_major_version="10.11" + ;; + "11.8") + prev_major_version="11.4" + ;; + *) + prev_major_version="$major.$((minor - 1))" + ;; + esac fi ;; "distro") diff --git a/scripts/rpm-upgrade.sh b/scripts/rpm-upgrade.sh index 0dc5b254..5a4b2366 100755 --- a/scripts/rpm-upgrade.sh +++ b/scripts/rpm-upgrade.sh @@ -138,26 +138,6 @@ if [[ $package_version == "$old_version" ]]; then exit fi -# ------------------------------------------------------------------------------ -# -- MDBF-1121 / MDEV-33459 -- -# ------------------------------------------------------------------------------ - -# Major upgrades within the same family (>10) and vendor (!=distro) -# should work without removing old packages first. - -old_family=$(echo "$prev_major_version" | sed -n -e 's,^\([1-9][0-9]*\)\..*$,\1,p') -new_family=$(echo "$major_version" | sed -n -e 's,^\([1-9][0-9]*\)\..*$,\1,p') - -if [[ "$test_type" == "distro" || - ( "$old_family" -lt 11 && "$test_type" != "minor" ) || - "$old_family" -ne "$new_family" ]]; then - bb_log_info "remove old packages for major upgrade" - packages_to_remove=$(rpm -qa | grep -E '^(MariaDB|mariadb)-' | awk -F'-' '{print $1"-"$2}') - echo "$packages_to_remove" | xargs sudo "$pkg_cmd" "$pkg_cmd_options" remove - rpm -qa | grep -iE 'maria|mysql' || true -fi -# ------------------------------------------------------------------------------ - rpm_setup_bb_galera_artifacts_mirror rpm_setup_bb_artifacts_mirror if [[ "$test_type" =~ ^(major|distro)$ ]]; then