~drizzle-trunk/drizzle/development

390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; version 2 of the License.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU General Public License
16
 *  along with this program; if not, write to the Free Software
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
 */
1 by brian
clean slate
19
2234 by Brian Aker
Mass removal of ifdef/endif in favor of pragma once.
20
#pragma once
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
21
2241.2.10 by Olaf van der Spek
Refactor
22
#include <bitset>
23
#include <drizzled/error_t.h>
24
#include <drizzled/lex_string.h>
2173.2.1 by Monty Taylor
Fixes incorrect usage of include
25
#include <drizzled/memory/sql_alloc.h>
26
#include <drizzled/visibility.h>
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
27
2241.2.10 by Olaf van der Spek
Refactor
28
namespace drizzled {
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
29
2241.2.10 by Olaf van der Spek
Refactor
30
class DRIZZLE_ERROR : public memory::SqlAlloc
1 by brian
clean slate
31
{
32
public:
1100.3.35 by Padraig O'Sullivan
Updated mysql_show_warnings to take a std::bitset instead of a uint32_t to
33
  static const uint32_t NUM_ERRORS= 4;
2087.3.1 by Brian Aker
Entire convert over to time_t.
34
  enum enum_warning_level {
35
    WARN_LEVEL_NOTE,
36
    WARN_LEVEL_WARN,
37
    WARN_LEVEL_ERROR,
38
    WARN_LEVEL_END
39
  };
1 by brian
clean slate
40
2087.3.1 by Brian Aker
Entire convert over to time_t.
41
  drizzled::error_t code;
1 by brian
clean slate
42
  enum_warning_level level;
43
  char *msg;
660.1.3 by Eric Herman
removed trailing whitespace with simple script:
44
2087.3.1 by Brian Aker
Entire convert over to time_t.
45
  DRIZZLE_ERROR(Session *session,
46
                drizzled::error_t code_arg,
47
                enum_warning_level level_arg,
48
                const char *msg_arg) :
49
    code(code_arg),
50
    level(level_arg)
1 by brian
clean slate
51
  {
52
    if (msg_arg)
520.1.22 by Brian Aker
Second pass of thd cleanup
53
      set_msg(session, msg_arg);
1 by brian
clean slate
54
  }
2087.3.1 by Brian Aker
Entire convert over to time_t.
55
520.1.22 by Brian Aker
Second pass of thd cleanup
56
  void set_msg(Session *session, const char *msg_arg);
1 by brian
clean slate
57
};
58
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
59
DRIZZLED_API DRIZZLE_ERROR *push_warning(Session *session, DRIZZLE_ERROR::enum_warning_level level,
2087.3.1 by Brian Aker
Entire convert over to time_t.
60
                            drizzled::error_t code, const char *msg);
61
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
62
DRIZZLED_API void push_warning_printf(Session *session, DRIZZLE_ERROR::enum_warning_level level,
2087.3.1 by Brian Aker
Entire convert over to time_t.
63
                         drizzled::error_t code, const char *format, ...);
64
2318.6.104 by Olaf van der Spek
Refactor
65
void drizzle_reset_errors(Session&, bool force);
2026.2.1 by Monty Taylor
Renamed things prefixed mysql_ or mysqld_
66
bool show_warnings(Session *session, 
67
                   std::bitset<DRIZZLE_ERROR::NUM_ERRORS> &levels_to_show);
1 by brian
clean slate
68
2371.1.2 by Brian Aker
Remove the typedef on lexkey
69
extern const lex_string_t warning_level_names[];
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
70
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
71
} /* namespace drizzled */
72