~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_error.h

  • Committer: Monty Taylor
  • Date: 2009-04-25 20:29:54 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 1003.
  • Revision ID: mordred@inaugust.com-20090425202954-slopmkjj7vxal5lk
Migrated archive.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
 
20
#ifndef DRIZZLED_SQL_ERROR_H
 
21
#define DRIZZLED_SQL_ERROR_H
 
22
 
 
23
#include <drizzled/sql_alloc.h>
 
24
#include <drizzled/plugin/storage_engine.h>
 
25
 
20
26
class DRIZZLE_ERROR: public Sql_alloc
21
27
{
22
28
public:
26
32
  uint32_t code;
27
33
  enum_warning_level level;
28
34
  char *msg;
29
 
  
30
 
  DRIZZLE_ERROR(THD *thd, uint32_t code_arg, enum_warning_level level_arg,
 
35
 
 
36
  DRIZZLE_ERROR(Session *session, uint32_t code_arg, enum_warning_level level_arg,
31
37
              const char *msg_arg)
32
38
    :code(code_arg), level(level_arg)
33
39
  {
34
40
    if (msg_arg)
35
 
      set_msg(thd, msg_arg);
 
41
      set_msg(session, msg_arg);
36
42
  }
37
 
  void set_msg(THD *thd, const char *msg_arg);
 
43
  void set_msg(Session *session, const char *msg_arg);
38
44
};
39
45
 
40
 
DRIZZLE_ERROR *push_warning(THD *thd, DRIZZLE_ERROR::enum_warning_level level,
 
46
DRIZZLE_ERROR *push_warning(Session *session, DRIZZLE_ERROR::enum_warning_level level,
41
47
                          uint32_t code, const char *msg);
42
 
void push_warning_printf(THD *thd, DRIZZLE_ERROR::enum_warning_level level,
 
48
void push_warning_printf(Session *session, DRIZZLE_ERROR::enum_warning_level level,
43
49
                         uint32_t code, const char *format, ...);
44
 
void drizzle_reset_errors(THD *thd, bool force);
45
 
bool mysqld_show_warnings(THD *thd, uint32_t levels_to_show);
 
50
void drizzle_reset_errors(Session *session, bool force);
 
51
bool mysqld_show_warnings(Session *session, uint32_t levels_to_show);
46
52
 
47
53
extern const LEX_STRING warning_level_names[];
 
54
 
 
55
#endif /* DRIZZLED_SQL_ERROR_H */