Commit c4dbf1e9 authored by unknown's avatar unknown
Browse files

Merge


BitKeeper/etc/logging_ok:
  auto-union
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/repl_failsafe.cc:
  Merging 4.0 and 4.1 changes.
parents 32c3009d 467c4814
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ lenz@mysql.com
magnus@neptunus.(none)
magnus@shellback.(none)
marko@hundin.mysql.fi
mats@mysql.com
matt@mysql.com
matthias@three.local.lan
miguel@hegel.(none)
+12 −0
Original line number Diff line number Diff line
slave stop;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
stop slave;
create table t1(n int);
start slave;
stop slave io_thread;
start slave io_thread;
drop table t1;
+34 −0
Original line number Diff line number Diff line
source include/master-slave.inc;

#
# Bug#6148 ()
#
connection slave;
stop slave;

# Let the master do lots of insertions
connection master;
create table t1(n int);
let $1=5000;
disable_query_log;
while ($1)
{
 eval insert into t1 values($1);
 dec $1;
}
enable_query_log;
save_master_pos;

connection slave;
start slave;
sleep 1;
stop slave io_thread;
start slave io_thread;
sync_with_master;

connection master;
drop table t1;
save_master_pos;

connection slave;
sync_with_master;
+2 −2
Original line number Diff line number Diff line
@@ -922,7 +922,7 @@ int load_master_data(THD* thd)
        int error;

        if (init_master_info(active_mi, master_info_file, relay_log_info_file, 
			     0))
			     0, (SLAVE_IO | SLAVE_SQL)))
          send_error(thd, ER_MASTER_INFO);
	strmake(active_mi->master_log_name, row[0],
		sizeof(active_mi->master_log_name));
+11 −3
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ int init_slave()
  }
    
  if (init_master_info(active_mi,master_info_file,relay_log_info_file,
		       !master_host))
		       !master_host, (SLAVE_IO | SLAVE_SQL)))
  {
    sql_print_error("Failed to initialize the master info structure");
    goto err;
@@ -1799,7 +1799,8 @@ void clear_until_condition(RELAY_LOG_INFO* rli)

int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
		     const char* slave_info_fname,
		     bool abort_if_no_master_info_file)
		     bool abort_if_no_master_info_file,
		     int thread_mask)
{
  int fd,error;
  char fname[FN_REFLEN+128];
@@ -1813,8 +1814,15 @@ int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
      last time. If this case pos_in_file would be set and we would
      get a crash when trying to read the signature for the binary
      relay log.
      
      We only rewind the read position if we are starting the SQL
      thread. The handle_slave_sql thread assumes that the read
      position is at the beginning of the file, and will read the
      "signature" and then fast-forward to the last position read.
    */
    if (thread_mask & SLAVE_SQL) {
      my_b_seek(mi->rli.cur_log, (my_off_t) 0);
    }
    DBUG_RETURN(0);
  }

Loading