Commit 1d225146 authored by heikki@hundin.mysql.fi's avatar heikki@hundin.mysql.fi
Browse files

slave.cc:

  Slave thread is always in an auto-commit state: remove unnecessary tests when we flush master info
parent 0c5ad2d6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1024,7 +1024,7 @@ static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len)

      mi->inc_pos(event_len);
      
      if (!(thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN))) {
      if (!(thd->options & OPTION_BEGIN)) {

      	/* We only flush the master info position to the master.info file if
        the transaction is not open any more: an incomplete transaction will
@@ -1155,7 +1155,7 @@ static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len)

      mi->inc_pos(event_len);

      if (!(thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN)))
      if (!(thd->options & OPTION_BEGIN))
        flush_master_info(mi);

      break;
@@ -1190,7 +1190,7 @@ static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len)
      pthread_cond_broadcast(&mi->cond);
      pthread_mutex_unlock(&mi->lock);

      if (!(thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN)))
      if (!(thd->options & OPTION_BEGIN))
        flush_master_info(mi);
#ifndef DBUG_OFF
      if(abort_slave_event_count)