Skip to content

duplicate fields cannot be defined in the mysqlConf of the MysqlCluster resource. #931

@usernameisnull

Description

@usernameisnull

MySQL allow duplicate field, likebinlog_do_db

[mysqld]
binlog_do_db            = db3
binlog_do_db            = db4
# other fields

in mysql we can get the result

mysql> show master status\G
*************************** 1. row ***************************
             File: binlog.000022
         Position: 157
     Binlog_Do_DB: db3,db4
 Binlog_Ignore_DB:
Executed_Gtid_Set:
1 row in set (0.00 sec)

but in MysqlCluster resource, mysqlConf field is a map[string]string, not allowed to do this, if in IDE will warn us

spec:
  backupRemoteDeletePolicy: delete
  image: docker.m.daocloud.io/library/mysql:5.7.31
  mysqlConf:
    binlog-format: ROW
    binlog_do_db: db3
    binlog_do_db: db4

image

if we apply this cr, in running mysql,only one value

mysql> show master status\G
*************************** 1. row ***************************
             File: mysql-bin.000003
         Position: 154
     Binlog_Do_DB: db4
 Binlog_Ignore_DB:
Executed_Gtid_Set:
1 row in set (0.00 sec)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions