Bug #42879 CHANGE MASTER RELAY_LOG_FILE=path fails on windows
Submitted: 16 Feb 2009 12:37 Modified: 18 Jan 2011 11:03
Reporter: Andrei Elkin Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0+ OS:Windows
Assigned to: CPU Architecture:Any
Tags: disabled, relay_log_file path

[16 Feb 2009 12:37] Andrei Elkin
Description:
Having similar configurations

   CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE=''

succeeds on linux but does not on windows.

$ ./mysql -h localhost -P 12501 -uroot test -e "change master TO MASTER_HOST='d
ummy.localdomain',RELAY_LOG_FILE='.\slave-relay-bin.000004', relay_log_pos=4; s
how slave status \G"
ERROR 1380 (HY000) at line 1: Failed initializing relay log position: Could not
find target log during relay log initialization

The absolute path format or removal the heading `.\' fail as well.

There is no `change master RELAY_LOG_FILE=' tests in mysql-test suite that allows to think of the artifact as archaic.

How to repeat:
On a windows:
./mysql-test-run rpl_alter --start

[client 2 slave]

# create a relay log for the next step
reset slave; change master to master_host='127.0.0.1', master_port=12500, master_user='root'; start slave;

show slave status \G # to report: Relay_Log_File: slave-relay-bin.000002

stop slave;
# the following passes on Linux (notice './'!) with
# RELAY_LOG_FILE='./slave-relay-bin.000002'
# It fails on windows with all three possible prefixes to the relay-log file name
# a. empty, b. the abs director name c. the relative to @@datadir as below:
CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='.\slave-relay-bin.000002';
[16 Feb 2009 12:43] Andrei Elkin
To the fixer.

Re-enable rpl_cross_version to run on windows upon fixing the current issue.
[16 Feb 2009 12:44] Magnus BlÄudd
Have you tried manually with the normal mysql client? With both forward and backward slashes?

mysql> CHANGE MASTER RELAY_LOG_FILE="c:\tmp\t.log";
or 
mysql> CHANGE MASTER RELAY_LOG_FILE="c:\\tmp\\t.log";
[16 Feb 2009 12:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/66480

2803 Andrei Elkin	2009-02-16
      commenting windows disable for rpl_cross_version to relate to Bug #42879
[19 Feb 2009 13:03] Bugs System
Pushed into 6.0.10-alpha (revid:sergey.glukhov@sun.com-20090218125737-5y5b2xo3duo1wlvo) (version source revid:sergey.glukhov@sun.com-20090216145310-eo8xpvq2je0m3jkv) (merge vers: 6.0.10-alpha) (pib:6)
[13 Mar 2009 19:02] Bugs System
Pushed into 5.1.33 (revid:joro@sun.com-20090313111355-7bsi1hgkvrg8pdds) (version source revid:vvaintroub@mysql.com-20090218093153-sjzxf01i4ezte0xp) (merge vers: 5.1.33) (pib:6)
[9 May 2009 16:39] Bugs System
Pushed into 5.1.34-ndb-6.2.18 (revid:jonas@mysql.com-20090508185236-p9b3as7qyauybefl) (version source revid:jonas@mysql.com-20090508100057-30ote4xggi4nq14v) (merge vers: 5.1.33-ndb-6.2.18) (pib:6)
[9 May 2009 17:36] Bugs System
Pushed into 5.1.34-ndb-6.3.25 (revid:jonas@mysql.com-20090509063138-1u3q3v09wnn2txyt) (version source revid:jonas@mysql.com-20090508175813-s6yele2z3oh6o99z) (merge vers: 5.1.33-ndb-6.3.25) (pib:6)
[9 May 2009 18:34] Bugs System
Pushed into 5.1.34-ndb-7.0.6 (revid:jonas@mysql.com-20090509154927-im9a7g846c6u1hzc) (version source revid:jonas@mysql.com-20090509073226-09bljakh9eppogec) (merge vers: 5.1.33-ndb-7.0.6) (pib:6)
[17 Jan 2011 8:15] Zhenxing He
I think the problem should not exist after the fix of BUG#12190, after which, the argument for relay_log_file will only need the log file name, does not included the directory path.
[17 Jan 2011 10:12] Davi Arnaut
After tweaking the test to run on Windows, it passes fine now.
[17 Jan 2011 18:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/128999

3260 Luis Soares	2011-01-17
      BUG#42879: CHANGE MASTER RELAY_LOG_FILE=path fails on windows
      
      Re-enabling the test case on windows since BUG#12190 has fixed
      the issue.
[17 Jan 2011 19:00] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:luis.soares@oracle.com-20110117185804-9z9v2q49jwjzr273) (version source revid:luis.soares@oracle.com-20110117185639-7g42rzm6eyzf3x10) (merge vers: 5.6.2) (pib:24)
[17 Jan 2011 19:00] Bugs System
Pushed into mysql-5.5 5.5.10 (revid:luis.soares@oracle.com-20110117185101-zhm6zj89s6v00jbh) (version source revid:luis.soares@oracle.com-20110117185101-zhm6zj89s6v00jbh) (merge vers: 5.5.10) (pib:24)