Commit e976d956 authored by Sergey Vojtovich's avatar Sergey Vojtovich

Cleanup MYSQL_LOG

Embed MYSQL_LOG::init().
Reduce visibility of MYSQL_LOG::init_and_set_log_file_name().
Cleanup unused mysql_bin_log_file_name() and mysql_bin_log_file_pos().
parent 1d58e62d
......@@ -2590,24 +2590,14 @@ Please consider archiving some logs.", next, (MAX_LOG_UNIQUE_FN_EXT - next));
}
void MYSQL_LOG::init(enum_log_type log_type_arg,
enum cache_type io_cache_type_arg)
{
DBUG_ENTER("MYSQL_LOG::init");
log_type= log_type_arg;
io_cache_type= io_cache_type_arg;
DBUG_PRINT("info",("log_type: %d", log_type));
DBUG_VOID_RETURN;
}
bool MYSQL_LOG::init_and_set_log_file_name(const char *log_name,
const char *new_name,
ulong next_log_number,
enum_log_type log_type_arg,
enum cache_type io_cache_type_arg)
{
init(log_type_arg, io_cache_type_arg);
log_type= log_type_arg;
io_cache_type= io_cache_type_arg;
if (new_name)
{
......@@ -10438,24 +10428,6 @@ MYSQL_BIN_LOG::do_binlog_recovery(const char *opt_name, bool do_xa_recovery)
#ifdef INNODB_COMPATIBILITY_HOOKS
/**
Get the file name of the MySQL binlog.
@return the name of the binlog file
*/
extern "C"
const char* mysql_bin_log_file_name(void)
{
return mysql_bin_log.get_log_fname();
}
/**
Get the current position of the MySQL binlog.
@return byte offset from the beginning of the binlog
*/
extern "C"
ulonglong mysql_bin_log_file_pos(void)
{
return (ulonglong) mysql_bin_log.get_log_file()->pos_in_file;
}
/*
Get the current position of the MySQL binlog for transaction currently being
committed.
......
......@@ -305,13 +305,6 @@ class MYSQL_LOG
enum_log_type log_type,
const char *new_name, ulong next_file_number,
enum cache_type io_cache_type_arg);
bool init_and_set_log_file_name(const char *log_name,
const char *new_name,
ulong next_log_number,
enum_log_type log_type_arg,
enum cache_type io_cache_type_arg);
void init(enum_log_type log_type_arg,
enum cache_type io_cache_type_arg);
void close(uint exiting);
inline bool is_open() { return log_state != LOG_CLOSED; }
const char *generate_name(const char *log_name,
......@@ -335,7 +328,12 @@ class MYSQL_LOG
/** Instrumentation key to use for file io in @c log_file */
PSI_file_key m_log_file_key;
#endif
/* for documentation of mutexes held in various places in code */
bool init_and_set_log_file_name(const char *log_name,
const char *new_name,
ulong next_log_number,
enum_log_type log_type_arg,
enum cache_type io_cache_type_arg);
};
/* Tell the io thread if we can delay the master info sync. */
......@@ -414,7 +412,6 @@ struct wait_for_commit;
class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
{
private:
#ifdef HAVE_PSI_INTERFACE
/** The instrumentation key to use for @ LOCK_index. */
PSI_mutex_key m_key_LOCK_index;
......
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