diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2019-08-06 13:04:18 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2019-08-22 13:20:30 +0400 |
commit | e976d9561463eb50a46f174c9fbf62c5cd4786a6 (patch) | |
tree | ff1cdfbd07883ed34487aa12d60c715c67b552b3 | |
parent | 1d58e62d5bb6069722118568311f58848c57c1d8 (diff) | |
download | mariadb-git-e976d9561463eb50a46f174c9fbf62c5cd4786a6.tar.gz |
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().
-rw-r--r-- | sql/log.cc | 32 | ||||
-rw-r--r-- | sql/log.h | 15 |
2 files changed, 8 insertions, 39 deletions
diff --git a/sql/log.cc b/sql/log.cc index 78c1debcb4d..31ef26db1b4 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2590,24 +2590,14 @@ end: } -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. diff --git a/sql/log.h b/sql/log.h index 52bab149381..deaaed6eb86 100644 --- a/sql/log.h +++ b/sql/log.h @@ -305,13 +305,6 @@ public: 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 @@ public: /** 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; |