~ubuntu-branches/ubuntu/oneiric/mysql-5.1/oneiric-updates

« back to all changes in this revision

Viewing changes to sql/sql_repl.cc

  • Committer: Package Import Robot
  • Author(s): Seth Arnold
  • Date: 2013-04-18 17:10:57 UTC
  • mfrom: (1.5.3)
  • Revision ID: package-import@ubuntu.com-20130418171057-21exi1cs3ctn0g2x
Tags: 5.1.69-0ubuntu0.11.10.1
* SECURITY UPDATE: Update to 5.1.69 to fix security issues (LP: #1170516)
  - http://www.oracle.com/technetwork/topics/security/cpuapr2013-1899555.html

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
   Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
2
   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
3
3
 
4
4
   This program is free software; you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
548
548
  while (!net->error && net->vio != 0 && !thd->killed)
549
549
  {
550
550
    my_off_t prev_pos= pos;
551
 
    while (!(error = Log_event::read_log_event(&log, packet, log_lock)))
 
551
    bool is_active_binlog= false;
 
552
    while (!(error= Log_event::read_log_event(&log, packet, log_lock,
 
553
                                              log_file_name,
 
554
                                              &is_active_binlog)))
552
555
    {
553
556
      prev_pos= my_b_tell(&log);
554
557
#ifndef DBUG_OFF
624
627
      error=LOG_READ_EOF;
625
628
    }
626
629
 
 
630
    DBUG_EXECUTE_IF("wait_after_binlog_EOF",
 
631
                    {
 
632
                      const char act[]= "now wait_for signal.rotate_finished";
 
633
                      DBUG_ASSERT(!debug_sync_set_action(current_thd,
 
634
                                                         STRING_WITH_LEN(act)));
 
635
                    };);
 
636
 
627
637
    /*
628
638
      TODO: now that we are logging the offset, check to make sure
629
639
      the recorded offset and the actual match.
634
644
    if (test_for_non_eof_log_read_errors(error, &errmsg))
635
645
      goto err;
636
646
 
637
 
    if (!(flags & BINLOG_DUMP_NON_BLOCK) &&
638
 
        mysql_bin_log.is_active(log_file_name))
 
647
    /*
 
648
      We should only move to the next binlog when the last read event
 
649
      came from a already deactivated binlog.
 
650
     */
 
651
    if (!(flags & BINLOG_DUMP_NON_BLOCK) && is_active_binlog)
639
652
    {
640
653
      /*
641
654
        Block until there is more data in the log
869
882
 
870
883
        if (thd->lex->mi.pos)
871
884
        {
 
885
          if (thd->lex->mi.relay_log_pos)
 
886
            slave_errno=ER_BAD_SLAVE_UNTIL_COND;
872
887
          mi->rli.until_condition= Relay_log_info::UNTIL_MASTER_POS;
873
888
          mi->rli.until_log_pos= thd->lex->mi.pos;
874
889
          /*
880
895
        }
881
896
        else if (thd->lex->mi.relay_log_pos)
882
897
        {
 
898
          if (thd->lex->mi.pos)
 
899
            slave_errno=ER_BAD_SLAVE_UNTIL_COND;
883
900
          mi->rli.until_condition= Relay_log_info::UNTIL_RELAY_POS;
884
901
          mi->rli.until_log_pos= thd->lex->mi.relay_log_pos;
885
902
          strmake(mi->rli.until_log_name, thd->lex->mi.relay_log_name,