Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
usernameisnull opened this issue Oct 10, 2024 · 0 comments

Comments

@usernameisnull
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant