Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-sun-star committed Sep 19, 2023
1 parent 737ea9c commit f08b46a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pkg/oceanbase/operation/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,6 @@ func preparedSQLForAddUnitConfigV4(unitConfigV4 *model.UnitConfigV4SQLParam) (st
return fmt.Sprintf(sql.AddUnitConfigV4, unitConfigV4.UnitConfigName, optionSql), params
}

func preparedSQLForAlterPool(poolSQLParam model.PoolSQLParam) (string, []any) {
params := make([]any, 0)
params = append(params, poolSQLParam.UnitName, poolSQLParam.UnitNum, poolSQLParam.ZoneList)
return fmt.Sprintf(sql.AddPool, poolSQLParam.PoolName), params
}

func preparedSQLForAddPool(poolSQLParam model.PoolSQLParam) (string, []interface{}) {
params := make([]interface{}, 0)
params = append(params, poolSQLParam.UnitName, poolSQLParam.UnitNum, poolSQLParam.ZoneList)
Expand Down Expand Up @@ -427,7 +421,7 @@ func preparedSQLForSetUnitConfigV4(unitConfigV4 *model.UnitConfigV4SQLParam) (st
return fmt.Sprintf(sql.SetUnitConfigV4, unitConfigV4.UnitConfigName, alterItemStr), params
}

func prepareSqlForSetPool(param *model.PoolParam) (string, []any) {
func prepareSQLForAlterPool(param *model.PoolParam) (string, []any) {
poolProperties := make([]string, 0)
args := make([]any, 0)
if len(param.ZoneList) > 0 {
Expand All @@ -440,7 +434,7 @@ func prepareSqlForSetPool(param *model.PoolParam) (string, []any) {
}

func (m *OceanbaseOperationManager) AlterPool(poolParam *model.PoolParam) error {
sql, args := prepareSqlForSetPool(poolParam)
sql, args := prepareSQLForAlterPool(poolParam)
if sql != "" {
return m.ExecWithDefaultTimeout(sql, args...)
}
Expand Down

0 comments on commit f08b46a

Please sign in to comment.