~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/errmsg_print.cc

  • Committer: Lee Bieber
  • Date: 2011-02-19 06:59:33 UTC
  • mfrom: (2179.5.1 drizzle-staging)
  • Revision ID: kalebral@gmail.com-20110219065933-pjrxhdcvupqg6tma
Merge Brian - clarifies a number of parser ambiguity, and cleans up UPDATE and DELETE

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
void sql_perror(const char *message)
38
38
{
39
 
  char *errmsg_ptr;
40
39
  char errmsg[STRERROR_MAX];
41
40
  errmsg[0]= 0;
42
 
 
43
 
#ifdef STRERROR_R_CHAR_P
44
 
  errmsg_ptr= strerror_r(errno, errmsg, sizeof(errmsg));
45
 
#else
46
41
  strerror_r(errno, errmsg, sizeof(errmsg));
47
 
  errmsg_ptr= errmsg;
48
 
#endif
49
 
 
50
42
  errmsg_printf(error::ERROR, "%s: %s\n", message, errmsg);
51
 
 
52
43
}
53
44
 
54
45
// @todo Cap the size of message.
61
52
// @todo Cap the size of message/extra.
62
53
void sql_perror(std::string message, const std::string &extra)
63
54
{
64
 
  char *errmsg_ptr;
65
55
  char errmsg[STRERROR_MAX];
66
56
  errmsg[0]= 0;
67
 
 
68
 
#ifdef STRERROR_R_CHAR_P
69
 
  errmsg_ptr= strerror_r(errno, errmsg, sizeof(errmsg));
70
 
#else
71
57
  strerror_r(errno, errmsg, sizeof(errmsg));
72
 
  errmsg_ptr= errmsg;
73
 
#endif
74
58
 
75
59
  if (not extra.empty())
76
60
  {