Commit d8fedd0b authored by Venkatesh Duggirala's avatar Venkatesh Duggirala

BUG#16615117 MYSQLDUMP PRODUCES A CHANGE MASTER STATEMENT

WITH A PORT NUMBER ENCLOSED IN QUOTES

Problem: mysqldump --dump-slave --include-master-host-port
prints the CHANGE MASTER command in the generated logical
backup. The PORT number that is generated with this command
is a string and should be an integer.

Fix: Remove the Enclosed quotes for port number.
parent d052f069
...@@ -4747,7 +4747,7 @@ static int do_show_slave_status(MYSQL *mysql_con) ...@@ -4747,7 +4747,7 @@ static int do_show_slave_status(MYSQL *mysql_con)
if (row[1]) if (row[1])
fprintf(md_result_file, "MASTER_HOST='%s', ", row[1]); fprintf(md_result_file, "MASTER_HOST='%s', ", row[1]);
if (row[3]) if (row[3])
fprintf(md_result_file, "MASTER_PORT='%s', ", row[3]); fprintf(md_result_file, "MASTER_PORT=%s, ", row[3]);
} }
fprintf(md_result_file, fprintf(md_result_file,
"MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n", row[9], row[21]); "MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n", row[9], row[21]);
......
...@@ -9,6 +9,6 @@ STOP SLAVE; ...@@ -9,6 +9,6 @@ STOP SLAVE;
CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
START SLAVE; START SLAVE;
STOP SLAVE; STOP SLAVE;
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT='MASTER_MYPORT', MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
START SLAVE; START SLAVE;
include/rpl_end.inc include/rpl_end.inc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment