1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG#28796: CHANGE MASTER TO MASTER_HOST="" leads to invalid master.info

NOTE: this is the backport to next-mr.
                
This patch addresses the bug reported by checking wether 
host argument is an empty string or not. If empty, an error is
reported to the client, otherwise continue normally.
                       
This commit is based on the originally proposed patch and adds 
a test case as requested during review as well as refines comments, 
and makes test case result file less verbose (compared to previous patch).
This commit is contained in:
Luis Soares
2009-09-29 15:09:46 +01:00
parent 01cdba58ba
commit b43d30e43a
3 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1,16 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
STOP SLAVE;
Master_Host = '127.0.0.1' (expected '127.0.0.1')
CHANGE MASTER TO MASTER_HOST="";
ERROR HY000: Incorrect arguments to MASTER_HOST
Master_Host = '127.0.0.1' (expected '127.0.0.1')
CHANGE MASTER TO MASTER_HOST="foo";
Master_Host = 'foo' (expected 'foo')
CHANGE MASTER TO MASTER_HOST="127.0.0.1";
Master_Host = '127.0.0.1' (expected '127.0.0.1')
START SLAVE;