List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:August 16 2007 6:52am
Subject:bk commit into 5.1 tree (mats:1.2560)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mats. When mats does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-08-16 08:52:50+02:00, mats@stripped +11 -0
  Renaming MASTER_INFO to Master_info in order to follow the coding
  standards (and help Doxygen generating good documentation).

  sql/ha_ndbcluster.cc@stripped, 2007-08-16 08:52:42+02:00, mats@stripped +1 -1
    Renaming MASTER_INFO to Master_info.

  sql/log_event.cc@stripped, 2007-08-16 08:52:42+02:00, mats@stripped +1 -1
    Renaming MASTER_INFO to Master_info.

  sql/repl_failsafe.cc@stripped, 2007-08-16 08:52:43+02:00, mats@stripped +3 -3
    Renaming MASTER_INFO to Master_info.

  sql/repl_failsafe.h@stripped, 2007-08-16 08:52:43+02:00, mats@stripped +2 -2
    Renaming MASTER_INFO to Master_info.

  sql/rpl_mi.cc@stripped, 2007-08-16 08:52:43+02:00, mats@stripped +6 -6
    Renaming MASTER_INFO to Master_info.

  sql/rpl_mi.h@stripped, 2007-08-16 08:52:43+02:00, mats@stripped +9 -9
    Renaming MASTER_INFO to Master_info.

  sql/rpl_rli.h@stripped, 2007-08-16 08:52:43+02:00, mats@stripped +2 -2
    Renaming MASTER_INFO to Master_info.

  sql/slave.cc@stripped, 2007-08-16 08:52:44+02:00, mats@stripped +42 -42
    Renaming MASTER_INFO to Master_info.

  sql/slave.h@stripped, 2007-08-16 08:52:44+02:00, mats@stripped +16 -16
    Renaming MASTER_INFO to Master_info.

  sql/sql_repl.cc@stripped, 2007-08-16 08:52:44+02:00, mats@stripped +4 -4
    Renaming MASTER_INFO to Master_info.

  sql/sql_repl.h@stripped, 2007-08-16 08:52:44+02:00, mats@stripped +5 -5
    Renaming MASTER_INFO to Master_info.

diff -Nrup a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
--- a/sql/ha_ndbcluster.cc	2007-07-30 17:34:00 +02:00
+++ b/sql/ha_ndbcluster.cc	2007-08-16 08:52:42 +02:00
@@ -4287,7 +4287,7 @@ THR_LOCK_DATA **ha_ndbcluster::store_loc
  */
 
 #ifdef HAVE_NDB_BINLOG
-extern MASTER_INFO *active_mi;
+extern Master_info *active_mi;
 static int ndbcluster_update_apply_status(THD *thd, int do_update)
 {
   Thd_ndb *thd_ndb= get_thd_ndb(thd);
diff -Nrup a/sql/log_event.cc b/sql/log_event.cc
--- a/sql/log_event.cc	2007-08-16 07:37:39 +02:00
+++ b/sql/log_event.cc	2007-08-16 08:52:42 +02:00
@@ -4462,7 +4462,7 @@ Slave_log_event::Slave_log_event(THD* th
   if (!rli->inited)				// QQ When can this happen ?
     DBUG_VOID_RETURN;
 
-  MASTER_INFO* mi = rli->mi;
+  Master_info* mi = rli->mi;
   // TODO: re-write this better without holding both locks at the same time
   pthread_mutex_lock(&mi->data_lock);
   pthread_mutex_lock(&rli->data_lock);
diff -Nrup a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
--- a/sql/repl_failsafe.cc	2007-05-10 11:59:28 +02:00
+++ b/sql/repl_failsafe.cc	2007-08-16 08:52:43 +02:00
@@ -492,7 +492,7 @@ bool show_new_master(THD* thd)
     0           success
  */
 
-int update_slave_list(MYSQL* mysql, MASTER_INFO* mi)
+int update_slave_list(MYSQL* mysql, Master_info* mi)
 {
   MYSQL_RES* res=0;
   MYSQL_ROW row;
@@ -679,7 +679,7 @@ bool show_slave_hosts(THD* thd)
 }
 
 
-int connect_to_master(THD *thd, MYSQL* mysql, MASTER_INFO* mi)
+int connect_to_master(THD *thd, MYSQL* mysql, Master_info* mi)
 {
   DBUG_ENTER("connect_to_master");
 
@@ -728,7 +728,7 @@ static inline void cleanup_mysql_results
 
 
 static int fetch_db_tables(THD *thd, MYSQL *mysql, const char *db,
-			   MYSQL_RES *table_res, MASTER_INFO *mi)
+			   MYSQL_RES *table_res, Master_info *mi)
 {
   MYSQL_ROW row;
   for (row = mysql_fetch_row(table_res); row;
diff -Nrup a/sql/repl_failsafe.h b/sql/repl_failsafe.h
--- a/sql/repl_failsafe.h	2006-12-30 21:02:07 +01:00
+++ b/sql/repl_failsafe.h	2007-08-16 08:52:43 +02:00
@@ -33,12 +33,12 @@ extern const char* rpl_role_type[], *rpl
 pthread_handler_t handle_failsafe_rpl(void *arg);
 void change_rpl_status(RPL_STATUS from_status, RPL_STATUS to_status);
 int find_recovery_captain(THD* thd, MYSQL* mysql);
-int update_slave_list(MYSQL* mysql, MASTER_INFO* mi);
+int update_slave_list(MYSQL* mysql, Master_info* mi);
 
 extern HASH slave_list;
 
 bool load_master_data(THD* thd);
-int connect_to_master(THD *thd, MYSQL* mysql, MASTER_INFO* mi);
+int connect_to_master(THD *thd, MYSQL* mysql, Master_info* mi);
 
 bool show_new_master(THD* thd);
 bool show_slave_hosts(THD* thd);
diff -Nrup a/sql/rpl_mi.cc b/sql/rpl_mi.cc
--- a/sql/rpl_mi.cc	2007-06-09 07:55:03 +02:00
+++ b/sql/rpl_mi.cc	2007-08-16 08:52:43 +02:00
@@ -27,7 +27,7 @@ int init_intvar_from_file(int* var, IO_C
 int init_strvar_from_file(char *var, int max_size, IO_CACHE *f,
 			  const char *default_val);
 
-MASTER_INFO::MASTER_INFO()
+Master_info::Master_info()
   :Slave_reporting_capability("I/O"),
    ssl(0), fd(-1),  io_thd(0), inited(0),
    abort_slave(0),slave_running(0),
@@ -45,7 +45,7 @@ MASTER_INFO::MASTER_INFO()
   pthread_cond_init(&stop_cond, NULL);
 }
 
-MASTER_INFO::~MASTER_INFO()
+Master_info::~Master_info()
 {
   pthread_mutex_destroy(&run_lock);
   pthread_mutex_destroy(&data_lock);
@@ -55,7 +55,7 @@ MASTER_INFO::~MASTER_INFO()
 }
 
 
-void init_master_info_with_options(MASTER_INFO* mi)
+void init_master_info_with_options(Master_info* mi)
 {
   DBUG_ENTER("init_master_info_with_options");
 
@@ -98,7 +98,7 @@ enum {
   LINES_IN_MASTER_INFO= LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT
 };
 
-int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
+int init_master_info(Master_info* mi, const char* master_info_fname,
                      const char* slave_info_fname,
                      bool abort_if_no_master_info_file,
                      int thread_mask)
@@ -338,7 +338,7 @@ err:
      1 - flush master info failed
      0 - all ok
 */
-int flush_master_info(MASTER_INFO* mi, bool flush_relay_log_cache)
+int flush_master_info(Master_info* mi, bool flush_relay_log_cache)
 {
   IO_CACHE* file = &mi->file;
   char lbuf[22];
@@ -392,7 +392,7 @@ int flush_master_info(MASTER_INFO* mi, b
 }
 
 
-void end_master_info(MASTER_INFO* mi)
+void end_master_info(Master_info* mi)
 {
   DBUG_ENTER("end_master_info");
 
diff -Nrup a/sql/rpl_mi.h b/sql/rpl_mi.h
--- a/sql/rpl_mi.h	2007-08-16 07:37:40 +02:00
+++ b/sql/rpl_mi.h	2007-08-16 08:52:43 +02:00
@@ -26,13 +26,13 @@
 
   Replication IO Thread
 
-  MASTER_INFO contains:
+  Master_info contains:
     - information about how to connect to a master
     - current master log name
     - current master log offset
     - misc control variables
 
-  MASTER_INFO is initialized once from the master.info file if such
+  Master_info is initialized once from the master.info file if such
   exists. Otherwise, data members corresponding to master.info fields
   are initialized with defaults specified by master-* options. The
   initialization is done through init_master_info() call.
@@ -55,11 +55,11 @@
 
 *****************************************************************************/
 
-class MASTER_INFO : public Slave_reporting_capability
+class Master_info : public Slave_reporting_capability
 {
  public:
-  MASTER_INFO();
-  ~MASTER_INFO();
+  Master_info();
+  ~Master_info();
 
   /* the variables below are needed because we can change masters on the fly */
   char master_log_name[FN_REFLEN];
@@ -102,13 +102,13 @@ class MASTER_INFO : public Slave_reporti
   long clock_diff_with_master;
 };
 
-void init_master_info_with_options(MASTER_INFO* mi);
-int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
+void init_master_info_with_options(Master_info* mi);
+int init_master_info(Master_info* mi, const char* master_info_fname,
 		     const char* slave_info_fname,
 		     bool abort_if_no_master_info_file,
 		     int thread_mask);
-void end_master_info(MASTER_INFO* mi);
-int flush_master_info(MASTER_INFO* mi, bool flush_relay_log_cache);
+void end_master_info(Master_info* mi);
+int flush_master_info(Master_info* mi, bool flush_relay_log_cache);
 
 #endif /* HAVE_REPLICATION */
 #endif /* RPL_MI_H */
diff -Nrup a/sql/rpl_rli.h b/sql/rpl_rli.h
--- a/sql/rpl_rli.h	2007-08-16 07:37:41 +02:00
+++ b/sql/rpl_rli.h	2007-08-16 08:52:43 +02:00
@@ -121,8 +121,8 @@ public:
   */
   pthread_cond_t start_cond, stop_cond, data_cond;
 
-  /* parent MASTER_INFO structure */
-  class MASTER_INFO *mi;
+  /* parent Master_info structure */
+  class Master_info *mi;
 
   /*
     Needed to deal properly with cur_log getting closed and re-opened with
diff -Nrup a/sql/slave.cc b/sql/slave.cc
--- a/sql/slave.cc	2007-08-16 07:37:42 +02:00
+++ b/sql/slave.cc	2007-08-16 08:52:44 +02:00
@@ -33,7 +33,7 @@
 
 #include "rpl_tblmap.h"
 
-int queue_event(MASTER_INFO* mi,const char* buf,ulong event_len);
+int queue_event(Master_info* mi,const char* buf,ulong event_len);
 static Log_event* next_event(Relay_log_info* rli);
 
 
@@ -46,7 +46,7 @@ MY_BITMAP slave_error_mask;
 typedef bool (*CHECK_KILLED_FUNC)(THD*,void*);
 
 char* slave_load_tmpdir = 0;
-MASTER_INFO *active_mi= 0;
+Master_info *active_mi= 0;
 my_bool replicate_same_server_id;
 ulonglong relay_log_space_limit = 0;
 
@@ -54,7 +54,7 @@ ulonglong relay_log_space_limit = 0;
   When slave thread exits, we need to remember the temporary tables so we
   can re-use them on slave start.
 
-  TODO: move the vars below under MASTER_INFO
+  TODO: move the vars below under Master_info
 */
 
 int disconnect_slave_event_count = 0, abort_slave_event_count = 0;
@@ -114,23 +114,23 @@ failed read"
 
 typedef enum { SLAVE_THD_IO, SLAVE_THD_SQL} SLAVE_THD_TYPE;
 
-static int process_io_rotate(MASTER_INFO* mi, Rotate_log_event* rev);
-static int process_io_create_file(MASTER_INFO* mi, Create_file_log_event* cev);
+static int process_io_rotate(Master_info* mi, Rotate_log_event* rev);
+static int process_io_create_file(Master_info* mi, Create_file_log_event* cev);
 static bool wait_for_relay_log_space(Relay_log_info* rli);
-static inline bool io_slave_killed(THD* thd,MASTER_INFO* mi);
+static inline bool io_slave_killed(THD* thd,Master_info* mi);
 static inline bool sql_slave_killed(THD* thd,Relay_log_info* rli);
 static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type);
-static int safe_connect(THD* thd, MYSQL* mysql, MASTER_INFO* mi);
-static int safe_reconnect(THD* thd, MYSQL* mysql, MASTER_INFO* mi,
+static int safe_connect(THD* thd, MYSQL* mysql, Master_info* mi);
+static int safe_reconnect(THD* thd, MYSQL* mysql, Master_info* mi,
                           bool suppress_warnings);
-static int connect_to_master(THD* thd, MYSQL* mysql, MASTER_INFO* mi,
+static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
                              bool reconnect, bool suppress_warnings);
 static int safe_sleep(THD* thd, int sec, CHECK_KILLED_FUNC thread_killed,
                       void* thread_killed_arg);
 static int request_table_dump(MYSQL* mysql, const char* db, const char* table);
 static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db,
                                   const char* table_name, bool overwrite);
-static int get_master_version_and_clock(MYSQL* mysql, MASTER_INFO* mi);
+static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi);
 static Log_event* next_event(Relay_log_info* rli);
 
 /*
@@ -151,7 +151,7 @@ static Log_event* next_event(Relay_log_i
                 If inverse == 1, stopped threads
 */
 
-void init_thread_mask(int* mask,MASTER_INFO* mi,bool inverse)
+void init_thread_mask(int* mask,Master_info* mi,bool inverse)
 {
   bool set_io = mi->slave_running, set_sql = mi->rli.slave_running;
   register int tmp_mask=0;
@@ -172,7 +172,7 @@ void init_thread_mask(int* mask,MASTER_I
   lock_slave_threads()
 */
 
-void lock_slave_threads(MASTER_INFO* mi)
+void lock_slave_threads(Master_info* mi)
 {
   DBUG_ENTER("lock_slave_threads");
 
@@ -187,7 +187,7 @@ void lock_slave_threads(MASTER_INFO* mi)
   unlock_slave_threads()
 */
 
-void unlock_slave_threads(MASTER_INFO* mi)
+void unlock_slave_threads(Master_info* mi)
 {
   DBUG_ENTER("unlock_slave_threads");
 
@@ -214,7 +214,7 @@ int init_slave()
     TODO: re-write this to interate through the list of files
     for multi-master
   */
-  active_mi= new MASTER_INFO;
+  active_mi= new Master_info;
 
   /*
     If master_host is not specified, try to read it from the master_info file.
@@ -304,7 +304,7 @@ void init_slave_skip_errors(const char* 
 }
 
 
-int terminate_slave_threads(MASTER_INFO* mi,int thread_mask,bool skip_lock)
+int terminate_slave_threads(Master_info* mi,int thread_mask,bool skip_lock)
 {
   DBUG_ENTER("terminate_slave_threads");
 
@@ -393,7 +393,7 @@ int start_slave_thread(pthread_handler h
                        pthread_cond_t *start_cond,
                        volatile uint *slave_running,
                        volatile ulong *slave_run_id,
-                       MASTER_INFO* mi,
+                       Master_info* mi,
                        bool high_priority)
 {
   pthread_t th;
@@ -463,7 +463,7 @@ int start_slave_thread(pthread_handler h
 */
 
 int start_slave_threads(bool need_slave_mutex, bool wait_for_start,
-                        MASTER_INFO* mi, const char* master_info_fname,
+                        Master_info* mi, const char* master_info_fname,
                         const char* slave_info_fname, int thread_mask)
 {
   pthread_mutex_t *lock_io=0,*lock_sql=0,*lock_cond_io=0,*lock_cond_sql=0;
@@ -503,7 +503,7 @@ int start_slave_threads(bool need_slave_
 
 
 #ifdef NOT_USED_YET
-static int end_slave_on_walk(MASTER_INFO* mi, uchar* /*unused*/)
+static int end_slave_on_walk(Master_info* mi, uchar* /*unused*/)
 {
   DBUG_ENTER("end_slave_on_walk");
 
@@ -549,7 +549,7 @@ void end_slave()
 }
 
 
-static bool io_slave_killed(THD* thd, MASTER_INFO* mi)
+static bool io_slave_killed(THD* thd, Master_info* mi)
 {
   DBUG_ENTER("io_slave_killed");
 
@@ -699,7 +699,7 @@ int init_intvar_from_file(int* var, IO_C
   1       error
 */
 
-static int get_master_version_and_clock(MYSQL* mysql, MASTER_INFO* mi)
+static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
 {
   const char* errmsg= 0;
   DBUG_ENTER("get_master_version_and_clock");
@@ -1018,7 +1018,7 @@ err:
 
 
 int fetch_master_table(THD *thd, const char *db_name, const char *table_name,
-                       MASTER_INFO *mi, MYSQL *mysql, bool overwrite)
+                       Master_info *mi, MYSQL *mysql, bool overwrite)
 {
   int error= 1;
   const char *errmsg=0;
@@ -1076,7 +1076,7 @@ int fetch_master_table(THD *thd, const c
 static bool wait_for_relay_log_space(Relay_log_info* rli)
 {
   bool slave_killed=0;
-  MASTER_INFO* mi = rli->mi;
+  Master_info* mi = rli->mi;
   const char *save_proc_info;
   THD* thd = mi->io_thd;
   DBUG_ENTER("wait_for_relay_log_space");
@@ -1108,7 +1108,7 @@ Waiting for the slave SQL thread to free
     ignored events' end position for the use of the slave SQL thread, by
     calling this function. Only that thread can call it (see assertion).
  */
-static void write_ignored_events_info_to_relay_log(THD *thd, MASTER_INFO *mi)
+static void write_ignored_events_info_to_relay_log(THD *thd, Master_info *mi)
 {
   Relay_log_info *rli= &mi->rli;
   pthread_mutex_t *log_lock= rli->relay_log.get_log_lock();
@@ -1151,7 +1151,7 @@ static void write_ignored_events_info_to
 }
 
 
-int register_slave_on_master(MYSQL* mysql, MASTER_INFO *mi,
+int register_slave_on_master(MYSQL* mysql, Master_info *mi,
                              bool *suppress_warnings)
 {
   uchar buf[1024], *pos= buf;
@@ -1200,7 +1200,7 @@ int register_slave_on_master(MYSQL* mysq
 }
 
 
-bool show_master_info(THD* thd, MASTER_INFO* mi)
+bool show_master_info(THD* thd, Master_info* mi)
 {
   // TODO: fix this for multi-master
   List<Item> field_list;
@@ -1514,7 +1514,7 @@ static int safe_sleep(THD* thd, int sec,
 }
 
 
-static int request_dump(MYSQL* mysql, MASTER_INFO* mi,
+static int request_dump(MYSQL* mysql, Master_info* mi,
                         bool *suppress_warnings)
 {
   uchar buf[FN_REFLEN + 10];
@@ -1598,7 +1598,7 @@ command");
     number              Length of packet
 */
 
-static ulong read_event(MYSQL* mysql, MASTER_INFO *mi, bool* suppress_warnings)
+static ulong read_event(MYSQL* mysql, Master_info *mi, bool* suppress_warnings)
 {
   ulong len;
   DBUG_ENTER("read_event");
@@ -1943,7 +1943,7 @@ on this slave.\
 }
 
 
-static bool check_io_slave_killed(THD *thd, MASTER_INFO *mi, const char *info)
+static bool check_io_slave_killed(THD *thd, Master_info *mi, const char *info)
 {
   if (io_slave_killed(thd, mi))
   {
@@ -1981,7 +1981,7 @@ static bool check_io_slave_killed(THD *t
   @retval        1                   There was an error.
 */
 
-static int try_to_reconnect(THD *thd, MYSQL *mysql, MASTER_INFO *mi,
+static int try_to_reconnect(THD *thd, MYSQL *mysql, Master_info *mi,
                             uint *retry_count, bool suppress_warnings,
                             const char *messages[SLAVE_RECON_MSG_MAX])
 {
@@ -2037,7 +2037,7 @@ pthread_handler_t handle_slave_io(void *
 {
   THD *thd; // needs to be first for thread_stack
   MYSQL *mysql;
-  MASTER_INFO *mi = (MASTER_INFO*)arg;
+  Master_info *mi = (Master_info*)arg;
   Relay_log_info *rli= &mi->rli;
   char llbuff[22];
   uint retry_count;
@@ -2311,7 +2311,7 @@ err:
   /* Forget the relay log's format */
   delete mi->rli.relay_log.description_event_for_queue;
   mi->rli.relay_log.description_event_for_queue= 0;
-  // TODO: make rpl_status part of MASTER_INFO
+  // TODO: make rpl_status part of Master_info
   change_rpl_status(RPL_ACTIVE_SLAVE,RPL_IDLE_SLAVE);
   DBUG_ASSERT(thd->net.buff != 0);
   net_end(&thd->net); // destructor will not free it, because net.vio is 0
@@ -2343,7 +2343,7 @@ pthread_handler_t handle_slave_sql(void 
   THD *thd;                     /* needs to be first for thread_stack */
   char llbuff[22],llbuff1[22];
 
-  Relay_log_info* rli = &((MASTER_INFO*)arg)->rli;
+  Relay_log_info* rli = &((Master_info*)arg)->rli;
   const char *errmsg;
 
   // needs to call my_thread_init(), otherwise we get a coredump in DBUG_ stuff
@@ -2612,7 +2612,7 @@ the slave SQL thread with \"SLAVE START\
   process_io_create_file()
 */
 
-static int process_io_create_file(MASTER_INFO* mi, Create_file_log_event* cev)
+static int process_io_create_file(Master_info* mi, Create_file_log_event* cev)
 {
   int error = 1;
   ulong num_bytes;
@@ -2739,7 +2739,7 @@ err:
 
 */
 
-static int process_io_rotate(MASTER_INFO *mi, Rotate_log_event *rev)
+static int process_io_rotate(Master_info *mi, Rotate_log_event *rev)
 {
   DBUG_ENTER("process_io_rotate");
   safe_mutex_assert_owner(&mi->data_lock);
@@ -2787,7 +2787,7 @@ static int process_io_rotate(MASTER_INFO
   Reads a 3.23 event and converts it to the slave's format. This code was
   copied from MySQL 4.0.
 */
-static int queue_binlog_ver_1_event(MASTER_INFO *mi, const char *buf,
+static int queue_binlog_ver_1_event(Master_info *mi, const char *buf,
                            ulong event_len)
 {
   const char *errmsg = 0;
@@ -2905,7 +2905,7 @@ static int queue_binlog_ver_1_event(MAST
   Reads a 4.0 event and converts it to the slave's format. This code was copied
   from queue_binlog_ver_1_event(), with some affordable simplifications.
 */
-static int queue_binlog_ver_3_event(MASTER_INFO *mi, const char *buf,
+static int queue_binlog_ver_3_event(Master_info *mi, const char *buf,
                            ulong event_len)
 {
   const char *errmsg = 0;
@@ -2969,7 +2969,7 @@ err:
     setup with 3.23 master or 4.0 master
 */
 
-static int queue_old_event(MASTER_INFO *mi, const char *buf,
+static int queue_old_event(Master_info *mi, const char *buf,
                            ulong event_len)
 {
   DBUG_ENTER("queue_old_event");
@@ -2997,7 +2997,7 @@ static int queue_old_event(MASTER_INFO *
   any >=5.0.0 format.
 */
 
-int queue_event(MASTER_INFO* mi,const char* buf, ulong event_len)
+int queue_event(Master_info* mi,const char* buf, ulong event_len)
 {
   int error= 0;
   ulong inc_pos;
@@ -3197,7 +3197,7 @@ void end_relay_log_info(Relay_log_info* 
     #   Error
 */
 
-static int safe_connect(THD* thd, MYSQL* mysql, MASTER_INFO* mi)
+static int safe_connect(THD* thd, MYSQL* mysql, Master_info* mi)
 {
   DBUG_ENTER("safe_connect");
 
@@ -3214,7 +3214,7 @@ static int safe_connect(THD* thd, MYSQL*
     master_retry_count times
 */
 
-static int connect_to_master(THD* thd, MYSQL* mysql, MASTER_INFO* mi,
+static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
                              bool reconnect, bool suppress_warnings)
 {
   int slave_was_killed;
@@ -3320,7 +3320,7 @@ replication resumed in log '%s' at posit
     master_retry_count times
 */
 
-static int safe_reconnect(THD* thd, MYSQL* mysql, MASTER_INFO* mi,
+static int safe_reconnect(THD* thd, MYSQL* mysql, Master_info* mi,
                           bool suppress_warnings)
 {
   DBUG_ENTER("safe_reconnect");
@@ -3764,7 +3764,7 @@ err:
   is void).
 */
 
-void rotate_relay_log(MASTER_INFO* mi)
+void rotate_relay_log(Master_info* mi)
 {
   DBUG_ENTER("rotate_relay_log");
   Relay_log_info* rli= &mi->rli;
diff -Nrup a/sql/slave.h b/sql/slave.h
--- a/sql/slave.h	2007-08-16 07:37:42 +02:00
+++ b/sql/slave.h	2007-08-16 08:52:44 +02:00
@@ -30,7 +30,7 @@
 
 // Forward declarations
 class Relay_log_info;
-class MASTER_INFO;
+class Master_info;
 
 
 /*****************************************************************************
@@ -42,7 +42,7 @@ class MASTER_INFO;
     I/O Thread - One of these threads is started for each master server.
                  They maintain a connection to their master server, read log
                  events from the master as they arrive, and queues them into
-                 a single, shared relay log file.  A MASTER_INFO 
+                 a single, shared relay log file.  A Master_info 
                  represents each of these threads.
 
     SQL Thread - One of these threads is started and reads from the relay log
@@ -69,18 +69,18 @@ class MASTER_INFO;
   mi->run_lock, keeps rli->run_lock, and tries to re-acquire mi->run_lock).
 
   Currently active_mi never moves (it's created at startup and deleted at
-  shutdown, and not changed: it always points to the same MASTER_INFO struct),
+  shutdown, and not changed: it always points to the same Master_info struct),
   because we don't have multimaster. So for the moment, mi does not move, and
   mi->rli does not either.
 
-  In MASTER_INFO: run_lock, data_lock
+  In Master_info: run_lock, data_lock
   run_lock protects all information about the run state: slave_running, and the
   existence of the I/O thread (to stop/start it, you need this mutex).
   data_lock protects some moving members of the struct: counters (log name,
   position) and relay log (MYSQL_BIN_LOG object).
 
   In Relay_log_info: run_lock, data_lock
-  see MASTER_INFO
+  see Master_info
   
   Order of acquisition: if you want to have LOCK_active_mi and a run_lock, you
   must acquire LOCK_active_mi first.
@@ -101,7 +101,7 @@ extern my_bool opt_log_slave_updates;
 extern ulonglong relay_log_space_limit;
 
 /*
-  3 possible values for MASTER_INFO::slave_running and
+  3 possible values for Master_info::slave_running and
   Relay_log_info::slave_running.
   The values 0,1,2 are very important: to keep the diff small, I didn't
   substitute places where we use 0/1 with the newly defined symbols. So don't change
@@ -130,14 +130,14 @@ int init_slave();
 void init_slave_skip_errors(const char* arg);
 bool flush_relay_log_info(Relay_log_info* rli);
 int register_slave_on_master(MYSQL* mysql);
-int terminate_slave_threads(MASTER_INFO* mi, int thread_mask,
+int terminate_slave_threads(Master_info* mi, int thread_mask,
 			     bool skip_lock = 0);
 int terminate_slave_thread(THD* thd, pthread_mutex_t* term_mutex,
 			   pthread_mutex_t* cond_lock,
 			   pthread_cond_t* term_cond,
 			   volatile uint* slave_running);
 int start_slave_threads(bool need_slave_mutex, bool wait_for_start,
-			MASTER_INFO* mi, const char* master_info_fname,
+			Master_info* mi, const char* master_info_fname,
 			const char* slave_info_fname, int thread_mask);
 /*
   cond_lock is usually same as start_lock. It is needed for the case when
@@ -150,7 +150,7 @@ int start_slave_thread(pthread_handler h
 		       pthread_cond_t* start_cond,
 		       volatile uint *slave_running,
 		       volatile ulong *slave_run_id,
-		       MASTER_INFO* mi,
+		       Master_info* mi,
                        bool high_priority);
 
 /* If fd is -1, dump to NET */
@@ -159,9 +159,9 @@ int mysql_table_dump(THD* thd, const cha
 
 /* retrieve table from master and copy to slave*/
 int fetch_master_table(THD* thd, const char* db_name, const char* table_name,
-		       MASTER_INFO* mi, MYSQL* mysql, bool overwrite);
+		       Master_info* mi, MYSQL* mysql, bool overwrite);
 
-bool show_master_info(THD* thd, MASTER_INFO* mi);
+bool show_master_info(THD* thd, Master_info* mi);
 bool show_binlog_info(THD* thd);
 bool rpl_master_has_bug(Relay_log_info *rli, uint bug_id);
 
@@ -173,9 +173,9 @@ void end_slave(); /* clean up */
 void clear_until_condition(Relay_log_info* rli);
 void clear_slave_error(Relay_log_info* rli);
 void end_relay_log_info(Relay_log_info* rli);
-void lock_slave_threads(MASTER_INFO* mi);
-void unlock_slave_threads(MASTER_INFO* mi);
-void init_thread_mask(int* mask,MASTER_INFO* mi,bool inverse);
+void lock_slave_threads(Master_info* mi);
+void unlock_slave_threads(Master_info* mi);
+void init_thread_mask(int* mask,Master_info* mi,bool inverse);
 int init_relay_log_pos(Relay_log_info* rli,const char* log,ulonglong pos,
 		       bool need_data_lock, const char** errmsg,
                        bool look_for_description_event);
@@ -184,12 +184,12 @@ int purge_relay_logs(Relay_log_info* rli
 		     const char** errmsg);
 void set_slave_thread_options(THD* thd);
 void set_slave_thread_default_charset(THD *thd, Relay_log_info const *rli);
-void rotate_relay_log(MASTER_INFO* mi);
+void rotate_relay_log(Master_info* mi);
 
 pthread_handler_t handle_slave_io(void *arg);
 pthread_handler_t handle_slave_sql(void *arg);
 extern bool volatile abort_loop;
-extern MASTER_INFO main_mi, *active_mi; /* active_mi for multi-master */
+extern Master_info main_mi, *active_mi; /* active_mi for multi-master */
 extern LIST master_list;
 extern my_bool replicate_same_server_id;
 
diff -Nrup a/sql/sql_repl.cc b/sql/sql_repl.cc
--- a/sql/sql_repl.cc	2007-08-16 07:37:43 +02:00
+++ b/sql/sql_repl.cc	2007-08-16 08:52:44 +02:00
@@ -762,7 +762,7 @@ err:
   DBUG_VOID_RETURN;
 }
 
-int start_slave(THD* thd , MASTER_INFO* mi,  bool net_report)
+int start_slave(THD* thd , Master_info* mi,  bool net_report)
 {
   int slave_errno= 0;
   int thread_mask;
@@ -887,7 +887,7 @@ int start_slave(THD* thd , MASTER_INFO* 
 }
 
 
-int stop_slave(THD* thd, MASTER_INFO* mi, bool net_report )
+int stop_slave(THD* thd, Master_info* mi, bool net_report )
 {
   DBUG_ENTER("stop_slave");
   
@@ -953,7 +953,7 @@ int stop_slave(THD* thd, MASTER_INFO* mi
 */
 
 
-int reset_slave(THD *thd, MASTER_INFO* mi)
+int reset_slave(THD *thd, Master_info* mi)
 {
   MY_STAT stat_area;
   char fname[FN_REFLEN];
@@ -1067,7 +1067,7 @@ void kill_zombie_dump_threads(uint32 sla
 }
 
 
-bool change_master(THD* thd, MASTER_INFO* mi)
+bool change_master(THD* thd, Master_info* mi)
 {
   int thread_mask;
   const char* errmsg= 0;
diff -Nrup a/sql/sql_repl.h b/sql/sql_repl.h
--- a/sql/sql_repl.h	2007-03-02 17:43:35 +01:00
+++ b/sql/sql_repl.h	2007-08-16 08:52:44 +02:00
@@ -42,20 +42,20 @@ extern my_bool opt_sporadic_binlog_dump_
                           pthread_mutex_unlock(&(thd)->LOCK_delete);    \
                         } while(0)
 
-int start_slave(THD* thd, MASTER_INFO* mi, bool net_report);
-int stop_slave(THD* thd, MASTER_INFO* mi, bool net_report);
-bool change_master(THD* thd, MASTER_INFO* mi);
+int start_slave(THD* thd, Master_info* mi, bool net_report);
+int stop_slave(THD* thd, Master_info* mi, bool net_report);
+bool change_master(THD* thd, Master_info* mi);
 bool mysql_show_binlog_events(THD* thd);
 int cmp_master_pos(const char* log_file_name1, ulonglong log_pos1,
 		   const char* log_file_name2, ulonglong log_pos2);
-int reset_slave(THD *thd, MASTER_INFO* mi);
+int reset_slave(THD *thd, Master_info* mi);
 int reset_master(THD* thd);
 bool purge_master_logs(THD* thd, const char* to_log);
 bool purge_master_logs_before_date(THD* thd, time_t purge_time);
 bool log_in_use(const char* log_name);
 void adjust_linfo_offsets(my_off_t purge_offset);
 bool show_binlogs(THD* thd);
-extern int init_master_info(MASTER_INFO* mi);
+extern int init_master_info(Master_info* mi);
 void kill_zombie_dump_threads(uint32 slave_server_id);
 int check_binlog_magic(IO_CACHE* log, const char** errmsg);
 
Thread
bk commit into 5.1 tree (mats:1.2560)Mats Kindahl16 Aug
  • Re: bk commit into 5.1 tree (mats:1.2560)Konstantin Osipov16 Aug
Re: bk commit into 5.1 tree (mats:1.2560)Mats Kindahl16 Aug