~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_error.h

  • Committer: Stewart Smith
  • Date: 2010-11-03 03:30:27 UTC
  • mto: (1902.1.1 build) (1910.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1903.
  • Revision ID: stewart@flamingspork.com-20101103033027-lskb6gxwwforfz71
fix docs warning: underline/overline too short for replace.rst

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
 
class DRIZZLE_ERROR: public Sql_alloc
 
20
#ifndef DRIZZLED_SQL_ERROR_H
 
21
#define DRIZZLED_SQL_ERROR_H
 
22
 
 
23
#include "drizzled/memory/sql_alloc.h"
 
24
#include "drizzled/lex_string.h"
 
25
 
 
26
#include <bitset>
 
27
 
 
28
namespace drizzled
 
29
{
 
30
 
 
31
class DRIZZLE_ERROR: public memory::SqlAlloc
21
32
{
22
33
public:
 
34
  static const uint32_t NUM_ERRORS= 4;
23
35
  enum enum_warning_level
24
36
  { WARN_LEVEL_NOTE, WARN_LEVEL_WARN, WARN_LEVEL_ERROR, WARN_LEVEL_END};
25
37
 
26
38
  uint32_t code;
27
39
  enum_warning_level level;
28
40
  char *msg;
29
 
  
 
41
 
30
42
  DRIZZLE_ERROR(Session *session, uint32_t code_arg, enum_warning_level level_arg,
31
43
              const char *msg_arg)
32
44
    :code(code_arg), level(level_arg)
42
54
void push_warning_printf(Session *session, DRIZZLE_ERROR::enum_warning_level level,
43
55
                         uint32_t code, const char *format, ...);
44
56
void drizzle_reset_errors(Session *session, bool force);
45
 
bool mysqld_show_warnings(Session *session, uint32_t levels_to_show);
 
57
bool mysqld_show_warnings(Session *session, 
 
58
                          std::bitset<DRIZZLE_ERROR::NUM_ERRORS> &levels_to_show);
46
59
 
47
60
extern const LEX_STRING warning_level_names[];
 
61
 
 
62
} /* namespace drizzled */
 
63
 
 
64
#endif /* DRIZZLED_SQL_ERROR_H */