~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_error.h

  • Committer: Olaf van der Spek
  • Date: 2011-10-24 21:55:16 UTC
  • mto: This revision was merged to the branch mainline in revision 2449.
  • Revision ID: olafvdspek@gmail.com-20111024215516-eu30mb3yhh9a28zq
Use str_ref

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
{
32
32
public:
33
33
  static const uint32_t NUM_ERRORS= 4;
34
 
  enum enum_warning_level {
 
34
  enum enum_warning_level 
 
35
  {
35
36
    WARN_LEVEL_NOTE,
36
37
    WARN_LEVEL_WARN,
37
38
    WARN_LEVEL_ERROR,
40
41
 
41
42
  drizzled::error_t code;
42
43
  enum_warning_level level;
43
 
  char *msg;
 
44
  const char *msg;
44
45
 
45
 
  DRIZZLE_ERROR(Session *session,
46
 
                drizzled::error_t code_arg,
47
 
                enum_warning_level level_arg,
48
 
                const char *msg_arg) :
 
46
  DRIZZLE_ERROR(Session *session, drizzled::error_t code_arg, enum_warning_level level_arg, const char *msg_arg) :
49
47
    code(code_arg),
50
48
    level(level_arg)
51
49
  {
56
54
  void set_msg(Session *session, const char *msg_arg);
57
55
};
58
56
 
59
 
DRIZZLED_API DRIZZLE_ERROR *push_warning(Session *session, DRIZZLE_ERROR::enum_warning_level level,
60
 
                            drizzled::error_t code, const char *msg);
 
57
DRIZZLED_API DRIZZLE_ERROR *push_warning(Session*, DRIZZLE_ERROR::enum_warning_level level, error_t code, const char *msg);
61
58
 
62
 
DRIZZLED_API void push_warning_printf(Session *session, DRIZZLE_ERROR::enum_warning_level level,
63
 
                         drizzled::error_t code, const char *format, ...);
 
59
DRIZZLED_API void push_warning_printf(Session*, DRIZZLE_ERROR::enum_warning_level level, error_t code, const char *format, ...);
64
60
 
65
61
void drizzle_reset_errors(Session&, bool force);
66
 
bool show_warnings(Session *session, 
67
 
                   std::bitset<DRIZZLE_ERROR::NUM_ERRORS> &levels_to_show);
 
62
bool show_warnings(Session *session, std::bitset<DRIZZLE_ERROR::NUM_ERRORS> &levels_to_show);
68
63
 
69
64
extern const lex_string_t warning_level_names[];
70
65