~ubuntu-branches/ubuntu/lucid/mysql-dfsg-5.1/lucid-security

« back to all changes in this revision

Viewing changes to sql/repl_failsafe.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 22:33:55 UTC
  • mto: (1.2.1) (37.1.1 lucid-security)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: package-import@ubuntu.com-20120222223355-ku1tb4r70osci6v2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2001-2006 MySQL AB & Sasha
 
1
/*
 
2
   Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
2
3
 
3
4
   This program is free software; you can redistribute it and/or modify
4
5
   it under the terms of the GNU General Public License as published by
11
12
 
12
13
   You should have received a copy of the GNU General Public License
13
14
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
16
*/
15
17
 
16
18
/**
17
19
  @file
559
561
        goto err;
560
562
      }
561
563
      si->server_id = log_server_id;
562
 
      my_hash_insert(&slave_list, (uchar*)si);
 
564
      if (my_hash_insert(&slave_list, (uchar*)si))
 
565
      {
 
566
        error= "the slave is out of memory";
 
567
        pthread_mutex_unlock(&LOCK_slave_list);
 
568
        goto err;
 
569
      }
563
570
    }
564
571
    strmake(si->host, row[1], sizeof(si->host)-1);
565
572
    si->port = atoi(row[port_ind]);
971
978
          host was specified; there could have been a problem when replication
972
979
          started, which led to relay log's IO_CACHE to not be inited.
973
980
        */
974
 
        if (flush_master_info(active_mi, 0))
 
981
        if (flush_master_info(active_mi, FALSE, FALSE))
975
982
          sql_print_error("Failed to flush master info file");
976
983
      }
977
984
      mysql_free_result(master_status_res);