~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/rpl_reporting.cc

  • Committer: Brian Aker
  • Date: 2008-07-07 14:25:25 UTC
  • mto: (77.1.25 codestyle)
  • mto: This revision was merged to the branch mainline in revision 82.
  • Revision ID: brian@tangent.org-20080707142525-xzy2nl3ie2ebwfln
LL() cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <drizzled/server_includes.h>
 
1
 
 
2
#include "mysql_priv.h"
2
3
#include "rpl_reporting.h"
3
4
 
4
5
void
8
9
  void (*report_function)(const char *, ...);
9
10
  char buff[MAX_SLAVE_ERRMSG];
10
11
  char *pbuff= buff;
11
 
  uint32_t pbuffsize= sizeof(buff);
 
12
  uint pbuffsize= sizeof(buff);
12
13
  va_list args;
13
14
  va_start(args, msg);
14
15
 
31
32
    report_function= sql_print_information;
32
33
    break;
33
34
  default:
34
 
    assert(0);                            // should not come here
 
35
    DBUG_ASSERT(0);                            // should not come here
35
36
    return;          // don't crash production builds, just do nothing
36
37
  }
37
38
 
38
 
  vsnprintf(pbuff, pbuffsize, msg, args);
 
39
  my_vsnprintf(pbuff, pbuffsize, msg, args);
39
40
 
40
41
  va_end(args);
41
42
 
42
43
  /* If the msg string ends with '.', do not add a ',' it would be ugly */
43
 
  report_function(_("Slave %s: %s%s Error_code: %d"),
 
44
  report_function("Slave %s: %s%s Error_code: %d",
44
45
                  m_thread_name, pbuff,
45
 
                  (pbuff[0] && *(strchr(pbuff, '\0')-1) == '.') ? "" : ",",
 
46
                  (pbuff[0] && *(strend(pbuff)-1) == '.') ? "" : ",",
46
47
                  err_code);
47
48
}