--- client/mysqldump.c.orig 2015-02-19 23:34:00.629104876 +0100 +++ client/mysqldump.c 2015-02-19 23:34:10.537363747 +0100 @@ -142,6 +142,7 @@ static uint my_end_arg; static char * opt_mysql_unix_port=0; static int first_error=0; +static int did_stop_slave=0; /* multi_source is 0 if old server or 2 if server that support multi source This is choosen this was as multi_source has 2 extra columns first in @@ -1611,7 +1612,7 @@ if (ignore_errors) return; ignore_errors= 1; /* don't want to recurse, if something fails below */ - if (opt_slave_data) + if (opt_slave_data && did_stop_slave) do_start_slave_sql(mysql); if (mysql) mysql_close(mysql); @@ -5052,6 +5053,7 @@ mysql_free_result(slave); return 1; } + did_stop_slave=1; } } } @@ -6015,7 +6017,7 @@ */ err: /* if --dump-slave , start the slave sql thread */ - if (opt_slave_data) + if (opt_slave_data && did_stop_slave) do_start_slave_sql(mysql); #ifdef HAVE_SMEM