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 15, 2022
1 parent 2e478a6 commit 38ff1fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 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 @@ -95,6 +95,13 @@ func buildMysqlConf(c *mysqlcluster.MysqlCluster) (string, error) {
if len(c.Spec.TlsSecretName) != 0 {
addKVConfigsToSection(sec, mysqlSSLConfigs)
}

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 38ff1fb

Please sign in to comment.