Commit 6264950c authored by Anel Husakovic's avatar Anel Husakovic Committed by Andrew Hutchings

Small cleanup of replication code (log.cc)

- Remove single/trivial call of function MYSQL_BIN_LOG::init() and remove function
- Remove single jump to label end2 and use code instead
- Remove label end2
parent 0802e5a7
...@@ -3574,16 +3574,6 @@ void MYSQL_BIN_LOG::cleanup() ...@@ -3574,16 +3574,6 @@ void MYSQL_BIN_LOG::cleanup()
} }
/* Init binlog-specific vars */
void MYSQL_BIN_LOG::init(ulong max_size_arg)
{
DBUG_ENTER("MYSQL_BIN_LOG::init");
max_size= max_size_arg;
DBUG_PRINT("info",("max_size: %lu", max_size));
DBUG_VOID_RETURN;
}
void MYSQL_BIN_LOG::init_pthread_objects() void MYSQL_BIN_LOG::init_pthread_objects()
{ {
MYSQL_LOG::init_pthread_objects(); MYSQL_LOG::init_pthread_objects();
...@@ -3775,7 +3765,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name, ...@@ -3775,7 +3765,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
DBUG_RETURN(1); /* all warnings issued */ DBUG_RETURN(1); /* all warnings issued */
} }
init(max_size_arg); max_size= max_size_arg;
open_count++; open_count++;
...@@ -5409,10 +5399,8 @@ int MYSQL_BIN_LOG::new_file_impl() ...@@ -5409,10 +5399,8 @@ int MYSQL_BIN_LOG::new_file_impl()
*/ */
if (unlikely((error= generate_new_name(new_name, name, 0)))) if (unlikely((error= generate_new_name(new_name, name, 0))))
{ {
#ifdef ENABLE_AND_FIX_HANG mysql_mutex_unlock(&LOCK_index);
close_on_error= TRUE; DBUG_RETURN(error);
#endif
goto end2;
} }
new_name_ptr=new_name; new_name_ptr=new_name;
...@@ -5520,7 +5508,6 @@ int MYSQL_BIN_LOG::new_file_impl() ...@@ -5520,7 +5508,6 @@ int MYSQL_BIN_LOG::new_file_impl()
last_used_log_number--; last_used_log_number--;
} }
end2:
if (delay_close) if (delay_close)
{ {
clear_inuse_flag_when_closing(old_file); clear_inuse_flag_when_closing(old_file);
......
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