Commit 38d3bf51 authored by sasha@mysql.sashanet.com's avatar sasha@mysql.sashanet.com
Browse files

mysql-test/t/rpl_sporadic_master.test

    use truncate table
sql/slave.cc
    fixed race condition on server shutdown
sql/sql_repl.cc
    fixed uninitialized use of io_cache
parent 5527f9bf
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -5,18 +5,13 @@ connection master;
drop table if exists t1;
create table t1(n int not null auto_increment primary key);
insert into t1 values (NULL),(NULL);
delete from t1;
set insert_id=1;
truncate table t1;
insert into t1 values (NULL),(NULL);
set insert_id=3;
insert into t1 values (NULL),(NULL);
flush logs;
delete from t1;
set insert_id=1;
truncate table t1;
insert into t1 values (NULL),(NULL);
set insert_id=3;
insert into t1 values (NULL),(NULL);
set insert_id=5;
insert into t1 values (NULL),(NULL);
save_master_pos;
connection slave;
+5 −0
Original line number Diff line number Diff line
@@ -190,6 +190,11 @@ static void free_string_array(DYNAMIC_ARRAY *a)

void end_slave()
{
  pthread_mutex_lock(&LOCK_slave);
  while (slave_running)
    pthread_cond_wait(&COND_slave_stopped, &LOCK_slave);
  pthread_mutex_unlock(&LOCK_slave);
  
  end_master_info(&glob_mi);
  if(do_table_inited)
    hash_free(&replicate_do_table);
+1 −1
Original line number Diff line number Diff line
@@ -350,6 +350,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
  int left_events = max_binlog_dump_events;
#endif
  DBUG_ENTER("mysql_binlog_send");
  bzero((char*) &log,sizeof(log));

#ifndef DBUG_OFF
  if (opt_sporadic_binlog_dump_fail && (binlog_dump_count++ % 2))
@@ -359,7 +360,6 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
  }
#endif

  bzero((char*) &log,sizeof(log));

  if (!mysql_bin_log.is_open())
  {