diff --git a/dbm-services/mysql/db-partition/main.go b/dbm-services/mysql/db-partition/main.go index 56c50079df..595d0e7ad8 100644 --- a/dbm-services/mysql/db-partition/main.go +++ b/dbm-services/mysql/db-partition/main.go @@ -13,11 +13,10 @@ import ( "dbm-services/common/go-pubpkg/apm/metric" "dbm-services/common/go-pubpkg/apm/trace" - "dbm-services/mysql/db-partition/monitor" - "dbm-services/mysql/db-partition/assests" "dbm-services/mysql/db-partition/cron" "dbm-services/mysql/db-partition/model" + "dbm-services/mysql/db-partition/monitor" "dbm-services/mysql/db-partition/router" ) diff --git a/dbm-services/mysql/db-partition/service/manage_config.go b/dbm-services/mysql/db-partition/service/manage_config.go index a648609cd8..922173684d 100644 --- a/dbm-services/mysql/db-partition/service/manage_config.go +++ b/dbm-services/mysql/db-partition/service/manage_config.go @@ -75,6 +75,9 @@ func (m *QueryParititionsInput) GetPartitionsConfig() ([]*PartitionConfigWithLog slog.Error(vsql, "execute error", err) return nil, 0, err } + if m.Limit == -1 { + m.Limit = cnt.Count + } limitCondition := fmt.Sprintf("limit %d offset %d", m.Limit, m.Offset) if m.OrderBy == "" { diff --git a/dbm-services/mysql/db-partition/service/manage_config_object.go b/dbm-services/mysql/db-partition/service/manage_config_object.go index 1e288d205c..9757ec9657 100644 --- a/dbm-services/mysql/db-partition/service/manage_config_object.go +++ b/dbm-services/mysql/db-partition/service/manage_config_object.go @@ -45,7 +45,7 @@ type QueryParititionsInput struct { ImmuteDomains []string `json:"immute_domains"` DbLikes []string `json:"dblikes"` TbLikes []string `json:"tblikes"` - Limit int `json:"limit"` + Limit int64 `json:"limit"` Offset int `json:"offset"` OrderBy string `json:"order_by"` AscDesc string `json:"asc_desc"`