From 2e5283b8d3ad85954c29aacee0c1683e1a180cc3 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:34:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20Mysql=20=E7=89=B9?= =?UTF-8?q?=E5=AE=9A=E7=89=88=E6=9C=AC=E5=BF=BD=E7=95=A5=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E5=A4=B1=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98=20(#6800)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs https://github.com/1Panel-dev/1Panel/issues/6796 --- backend/app/service/app_utils.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backend/app/service/app_utils.go b/backend/app/service/app_utils.go index 677df9ea3..b1d7c1b2a 100644 --- a/backend/app/service/app_utils.go +++ b/backend/app/service/app_utils.go @@ -1342,6 +1342,18 @@ func handleInstalled(appInstallList []model.AppInstall, updated bool, sync bool) continue } lastVersion := versions[0] + if app.Key == constant.AppMysql { + for _, version := range versions { + majorVersion := getMajorVersion(installed.Version) + if !strings.HasPrefix(version, majorVersion) { + continue + } else { + lastVersion = version + break + } + } + } + if common.IsCrossVersion(installed.Version, lastVersion) { installDTO.CanUpdate = app.CrossVersionUpdate } else {