Bug #31030 rpl000015.test fails if $MYSQL_TCP_PORT != 3306
Submitted: 14 Sep 2007 13:31 Modified: 11 Dec 2007 19:57
Reporter: Ingo Strüwing Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:4.1.24 OS:Any
Assigned to: Matthias Leich CPU Architecture:Any

[14 Sep 2007 13:31] Ingo Strüwing
Description:
This is high priority as it makes the test suite fail for me. I cannot use automatic scripts any more.

In my environment I set MYSQL_TCP_PORT=57040.
In rpl000015.test we have:
--replace_result $MASTER_MYPORT MASTER_PORT $MYSQL_TCP_PORT MASTER_PORT

The result of:
change master to master_host='127.0.0.1'
seems to be that the port is set to 3306 and not to $MYSQL_TCP_PORT.

rpl000015                      [ fail ]

Errors are (from /home/mydev/testdir-4.1-axmrg-2/mysql-test/var/log/mysqltest-time) :
mysqltest: Result length mismatch
(the last lines may be the most important ones)
Below are the diffs between actual and expected results:
-------------------------------------------------------
*** r/rpl000015.result	2006-10-19 11:54:21.000000000 +0300
--- r/rpl000015.reject	2007-09-14 11:27:09.475585886 +0300
***************
*** 8,14 ****
  change master to master_host='127.0.0.1';
  show slave status;
  Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
! #	127.0.0.1	test	MASTER_PORT	7		4	#	#		No	No							0		0	0	#	None		0	No						#
  change master to master_host='127.0.0.1',master_user='root',
  master_password='',master_port=MASTER_PORT;
  show slave status;
--- 8,14 ----
  change master to master_host='127.0.0.1';
  show slave status;
  Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
! #	127.0.0.1	test	3306	7		4	#	#		No	No							0		0	0	#	None		0	No						#
  change master to master_host='127.0.0.1',master_user='root',
  master_password='',master_port=MASTER_PORT;
  show slave status;
-------------------------------------------------------
Please follow the instructions outlined at
h

How to repeat:
bk clone bk-internal.mysql.com:/home/bk/mysql-4.1 mysql-4.1
cd mysql-4.1
BUILD/compile-pentium-debug-max --with-debug=full --prefix="/home/mydev/install-4.1"
cd mysql-test
export MYSQL_TCP_PORT=57040
./mysql-test-run --force   rpl000015

Suggested fix:
Either let the statement "change master to master_host='127.0.0.1'" (without port specification) use port $MYSQL_TCP_PORT,

or add " 3306 MASTER_PORT" to the "--replace_result" line,

whichever is the correct (or wanted) behaviour of "change master".
[2 Nov 2007 9:11] 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/36955

ChangeSet@1.2690, 2007-11-02 10:11:26+01:00, istruewing@stella.local +1 -0
  Bug#31030 - rpl000015.test fails if $MYSQL_TCP_PORT != 3306
  Preliminarily disabled test case
[2 Nov 2007 9:13] Ingo Strüwing
Preliminarily disabling the test case. Please reenable after fixing.
[2 Nov 2007 9:17] Ingo Strüwing
Oops, the patch was not meant to fix the bug. Back to verified.
[14 Nov 2007 9:41] Bugs System
Pushed into 6.0.4-alpha
[14 Nov 2007 9:45] Bugs System
Pushed into 5.1.23-rc
[14 Nov 2007 9:49] Bugs System
Pushed into 5.0.52
[14 Nov 2007 9:55] Bugs System
Pushed into 4.1.24
[29 Nov 2007 11:15] 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/38810

ChangeSet@1.2697, 2007-11-29 12:15:21+01:00, mleich@four.local.lan +3 -0
  Fix for
     Bug#31030 rpl000015.test fails if $MYSQL_TCP_PORT != 3306
[30 Nov 2007 17:06] 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/38996

ChangeSet@1.2697, 2007-11-30 18:06:28+01:00, mleich@four.local.lan +3 -0
  Fix for
     Bug#31030 rpl000015.test fails if $MYSQL_TCP_PORT != 3306
  Note:
    This bug does not occur in MySQL 5.0 and up, because
    ChangeSet 1.2328.2.1 2006/11/27 for MySQL 5.0 prevents this.
    The 5.0 fix uses the environment variable DEFAULT_MASTER_PORT
    which is set by mysql-test-run.pl.
    mysql-test-run.pl in 4.1 does not set this variable.
    There are two alternatives:
    1) Backport the 5.0 fix for this test including modifications
       to mysql-test-run.pl and mysql-test-run-shell.
       This is a not acceptable impact on an old MySQL version.
    2) Fix the problem different than in 5.0 like in the current
       ChangeSet + do not apply these changes when upmerging to 5.0
[30 Nov 2007 19:44] Matthias Leich
Pushed to
mysql-4.1-build
mysql-5.0-build
mysql-5.1-build
mysql-6.0-build
[11 Dec 2007 14:50] Bugs System
Pushed into 4.1.24
[11 Dec 2007 14:50] Bugs System
Pushed into 5.0.52
[11 Dec 2007 14:51] Bugs System
Pushed into 5.1.23-rc
[11 Dec 2007 14:51] Bugs System
Pushed into 6.0.5-alpha
[11 Dec 2007 19:57] Paul DuBois
Test case change. No changelog entry needed.