diff --git a/backend/app/dto/database.go b/backend/app/dto/database.go index 1d590aa0e..4cf540e46 100644 --- a/backend/app/dto/database.go +++ b/backend/app/dto/database.go @@ -84,8 +84,8 @@ type MysqlVariables struct { } type MysqlVariablesUpdate struct { - Param string `json:"param"` - Value int64 `json:"value"` + Param string `json:"param"` + Value interface{} `json:"value"` } type MysqlConfUpdateByFile struct { MysqlName string `json:"mysqlName" validate:"required"` diff --git a/backend/app/service/database_mysql.go b/backend/app/service/database_mysql.go index cd48f87dd..5ec038c25 100644 --- a/backend/app/service/database_mysql.go +++ b/backend/app/service/database_mysql.go @@ -433,7 +433,11 @@ func (u *MysqlService) UpdateVariables(updatas []dto.MysqlVariablesUpdate) error } } - files = updateMyCnf(files, group, info.Param, loadSizeUnit(info.Value)) + if _, ok := info.Value.(int64); ok { + files = updateMyCnf(files, group, info.Param, loadSizeUnit(info.Value.(int64))) + } else { + files = updateMyCnf(files, group, info.Param, info.Value) + } } file, err := os.OpenFile(path, os.O_WRONLY|os.O_TRUNC, 0666) if err != nil { diff --git a/frontend/src/components/confirm-dialog/index.vue b/frontend/src/components/confirm-dialog/index.vue index 3e646573f..3dcdbe568 100644 --- a/frontend/src/components/confirm-dialog/index.vue +++ b/frontend/src/components/confirm-dialog/index.vue @@ -15,7 +15,7 @@