Skip to content

Commit

Permalink
fix(cluster): Remove the duplicate configuration parameters in mysql cm.
Browse files Browse the repository at this point in the history
  • Loading branch information
runkecheng committed Jun 14, 2022
1 parent cc09e5d commit 7296f86
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mysqlcluster/syncer/mysql_cm.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func buildMysqlConf(c *mysqlcluster.MysqlCluster) (string, error) {
addKVConfigsToSection(sec, mysql57Configs)
}

addKVConfigsToSection(sec, mysqlSysConfigs, mysqlCommonConfigs, mysqlStaticConfigs, c.Spec.MysqlOpts.MysqlConf)
addKVConfigsToSection(sec, mysqlSysConfigs, mysqlCommonConfigs, mysqlStaticConfigs)

if c.Spec.MysqlOpts.InitTokuDB {
addKVConfigsToSection(sec, mysqlTokudbConfigs)
Expand All @@ -93,6 +93,12 @@ func buildMysqlConf(c *mysqlcluster.MysqlCluster) (string, error) {
}
}

for _, para := range c.Spec.MysqlOpts.MysqlConf {
if sec.HasKey(para) {
sec.Key(para).SetValue(c.Spec.MysqlOpts.MysqlConf[para])
}
}

data, err := writeConfigs(cfg)
if err != nil {
return "", err
Expand Down

0 comments on commit 7296f86

Please sign in to comment.