serg,
This is something for you to decide, I'm not sure what would be a better (or less bad) fix.
The logic which mixes up slave identificators and option names doesn't look great, but since we've let it reach GA, I guess it will have to stay (I really don't remember how it made it there).
The logic which replaces '_' with '-' in mysqld_safe is intentional, it was introduced by the following revision:
revision-id: guilhem@mysql.com-20091118203617-3jfudef971r7bf2y
|
committer: Guilhem Bichot <guilhem@mysql.com>
|
branch nick: mysql-next-mr-bugfixing
|
timestamp: Wed 2009-11-18 21:36:17 +0100
|
message:
|
Backport of the fix for BUG#40368 "mysqld_safe not honouring underscore same as dash on server options" from 6.0
|
(revision-id:guilhem@mysql.com-20090505113602-l12kxupeatve18dh).
|
Such bug led "mysqld_safe --core_file_size=#" to not work because mysqld_safe wouldn't recognize
|
that "ulimit -c" is needed; only --core-file-size=# worked. Same for --open_files_limit and other
|
options with _ where mysqld_safe needs to do something more than passing to mysqld.
|
Original fix by Erik Ljungstrom erik at ibiblio dot org ; slightly modified here.
|
Tested on all internally accessible Unix.
|
So, while technically it's primitive to remove the conversion, probably we'll need to re-do core_file_size and the others. Since the "other options" are not listed, we might have to do that for every option which has special logic in mysqld_safe, and then it might make sense to do it a different way, e.g. to make a local copy of options for mysqld_safe's tampering, but keep the original ones to pass to mysqld, but it makes the change rather big. Or maybe you'll come up with a better idea, I don't like any of those.
Hi,
Could you please specify how exactly it does not get loaded – i.e. attach your cnf file and paste the error that you are getting (or, if it's not an error but the value is just ignored, paste the output of SHOW SLAVE '<main_connection>' STATUS;.
This works just fine for me (no quoting at all):
cat 1.cnf
[mysqld]
main_connection.replicate_do_db=main_database
show slave 'main_connection' status \G
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: 127.0.0.1
Master_User: root
Master_Port: 3308
Connect_Retry: 60
Master_Log_File:
Read_Master_Log_Pos: 4
Relay_Log_File: wheezy-64-relay-bin-main_connection.000001
Relay_Log_Pos: 4
Relay_Master_Log_File:
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_Do_DB: main_database
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 0
Relay_Log_Space: 1316
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 0
Master_SSL_Crl:
Master_SSL_Crlpath:
Using_Gtid: No
Gtid_IO_Pos: