Skip to content

go-ini/ini: MySQL configuration fails to start due to unnecessary backtick escaping in values with semicolons #933

@leeworker

Description

@leeworker

Description

When using go-ini/ini package to generate MySQL configuration files, the package automatically adds backticks to values containing semicolons. This causes MySQL server startup failures, particularly when setting values like sql-mode that commonly contain semicolons.

Impact

This issue affects MySQL configuration generation, causing the following problems:

  1. MySQL server fails to start due to invalid configuration format
  2. Values like plugin-load-add = semisync_master.so;semisync_slave.so are incorrectly escaped to plugin-load-add = `semisync_master.so;semisync_slave.so`

Current Behavior

Generated my.cnf:

[root@lxz ~]# kubectl get cm percona-mysql-test-mysql -n base -o yaml
apiVersion: v1
data:
my.cnf: |
[mysqld]
innodb-buffer-pool-instances = 4
innodb-buffer-pool-size = 4505M
innodb-log-file-size = 512M
innodb_buffer_pool_size = 4G
innodb_flush_log_at_trx_commit = 1
innodb_log_file_size = 1G
max-binlog-size = 1G
max_connections = 1000
plugin-load-add = semisync_master.so;semisync_slave.so

image
image
Related issues:#792

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