~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/transaction_log/hexdump_transaction_message.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#include "drizzled/charset.h"
39
39
 
40
40
#include <fcntl.h>
 
41
#include <errno.h>
41
42
 
42
43
#include "transaction_log.h"
43
44
#include "hexdump_transaction_message.h"
101
102
  int log_file= open(filename.c_str(), O_RDONLY);
102
103
  if (log_file == -1)
103
104
  {
 
105
    char errmsg[STRERROR_MAX];
 
106
    strerror_r(errno, errmsg, sizeof(errmsg));
104
107
    errmsg_printf(ERRMSG_LVL_ERROR, _("Failed to open transaction log file %s.  Got error: %s\n"), 
105
108
                  filename.c_str(), 
106
 
                  strerror(errno));
 
109
                  errmsg);
107
110
    null_value= true;
108
111
    return NULL;
109
112
  }
141
144
  bool result= coded_input->ReadRaw(buffer, message_size);
142
145
  if (result == false)
143
146
  {
 
147
    char errmsg[STRERROR_MAX];
 
148
    strerror_r(errno, errmsg, sizeof(errmsg));
144
149
    fprintf(stderr, _("Could not read transaction message.\n"));
145
 
    fprintf(stderr, _("GPB ERROR: %s.\n"), strerror(errno));
 
150
    fprintf(stderr, _("GPB ERROR: %s.\n"), errmsg);
146
151
    fprintf(stderr, _("Raw buffer read: %s.\n"), buffer);
147
152
  }
148
153