diff options
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 398ff443ad4..415007b38fa 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -27,11 +27,9 @@ extern const char* any_db; -#ifndef DBUG_OFF int max_binlog_dump_events = 0; // unlimited bool opt_sporadic_binlog_dump_fail = 0; static int binlog_dump_count = 0; -#endif int check_binlog_magic(IO_CACHE* log, const char** errmsg) { @@ -156,6 +154,7 @@ File open_binlog(IO_CACHE *log, const char *log_file_name, const char **errmsg) { File file; + DBUG_ENTER("open_binlog"); if ((file = my_open(log_file_name, O_RDONLY | O_BINARY, MYF(MY_WME))) < 0 || init_io_cache(log, file, IO_SIZE*2, READ_CACHE, 0, 0, @@ -166,7 +165,7 @@ File open_binlog(IO_CACHE *log, const char *log_file_name, } if (check_binlog_magic(log,errmsg)) goto err; - return file; + DBUG_RETURN(file); err: if (file >= 0) @@ -174,7 +173,7 @@ err: my_close(file,MYF(0)); end_io_cache(log); } - return -1; + DBUG_RETURN(-1); } @@ -630,7 +629,8 @@ int reset_slave(MASTER_INFO* mi) char fname[FN_REFLEN]; int restart_thread_mask = 0,error=0; const char* errmsg=0; - + DBUG_ENTER("reset_slave"); + lock_slave_threads(mi); init_thread_mask(&restart_thread_mask,mi,0 /* not inverse */); if ((error=terminate_slave_threads(mi,restart_thread_mask,1 /*skip lock*/)) @@ -651,14 +651,14 @@ int reset_slave(MASTER_INFO* mi) goto err; } if (restart_thread_mask) - error=start_slave_threads(0 /* mutex not needed*/, - 1 /* wait for start*/, - mi,master_info_file,relay_log_info_file, - restart_thread_mask); + error=start_slave_threads(0 /* mutex not needed */, + 1 /* wait for start*/, + mi,master_info_file,relay_log_info_file, + restart_thread_mask); // TODO: fix error messages so they get to the client err: unlock_slave_threads(mi); - return error; + DBUG_RETURN(error); } void kill_zombie_dump_threads(uint32 slave_server_id) |