~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to sql/rpl_injector.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
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) 2006 MySQL AB
 
1
/*
 
2
   Copyright (c) 2006, 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
16
*/
15
17
 
16
18
#include "mysql_priv.h" 
17
19
#include "rpl_injector.h"
229
231
  Incident_log_event ev(thd, incident);
230
232
  if (int error= mysql_bin_log.write(&ev))
231
233
    return error;
232
 
  mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
233
 
  return 0;
 
234
  return mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
234
235
}
235
236
 
236
237
int injector::record_incident(THD *thd, Incident incident, LEX_STRING const message)
238
239
  Incident_log_event ev(thd, incident, message);
239
240
  if (int error= mysql_bin_log.write(&ev))
240
241
    return error;
241
 
  mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
242
 
  return 0;
 
242
  return mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
243
243
}