~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
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
20
21
2234 by Brian Aker
Mass removal of ifdef/endif in favor of pragma once.
22
#pragma once
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
23
2173.2.1 by Monty Taylor
Fixes incorrect usage of include
24
#include <drizzled/memory/sql_alloc.h>
25
#include <drizzled/lex_string.h>
584.1.13 by Monty Taylor
Split out a little more code. Removed table_list.h from common_includes.
26
2087.3.1 by Brian Aker
Entire convert over to time_t.
27
#include <drizzled/error_t.h>
28
1100.3.35 by Padraig O'Sullivan
Updated mysql_show_warnings to take a std::bitset instead of a uint32_t to
29
#include <bitset>
30
2173.2.1 by Monty Taylor
Fixes incorrect usage of include
31
#include <drizzled/visibility.h>
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
32
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
33
namespace drizzled
34
{
35
36
class DRIZZLE_ERROR: public memory::SqlAlloc
1 by brian
clean slate
37
{
38
public:
1100.3.35 by Padraig O'Sullivan
Updated mysql_show_warnings to take a std::bitset instead of a uint32_t to
39
  static const uint32_t NUM_ERRORS= 4;
2087.3.1 by Brian Aker
Entire convert over to time_t.
40
  enum enum_warning_level {
41
    WARN_LEVEL_NOTE,
42
    WARN_LEVEL_WARN,
43
    WARN_LEVEL_ERROR,
44
    WARN_LEVEL_END
45
  };
1 by brian
clean slate
46
2087.3.1 by Brian Aker
Entire convert over to time_t.
47
  drizzled::error_t code;
1 by brian
clean slate
48
  enum_warning_level level;
49
  char *msg;
660.1.3 by Eric Herman
removed trailing whitespace with simple script:
50
2087.3.1 by Brian Aker
Entire convert over to time_t.
51
  DRIZZLE_ERROR(Session *session,
52
                drizzled::error_t code_arg,
53
                enum_warning_level level_arg,
54
                const char *msg_arg) :
55
    code(code_arg),
56
    level(level_arg)
1 by brian
clean slate
57
  {
58
    if (msg_arg)
520.1.22 by Brian Aker
Second pass of thd cleanup
59
      set_msg(session, msg_arg);
1 by brian
clean slate
60
  }
2087.3.1 by Brian Aker
Entire convert over to time_t.
61
520.1.22 by Brian Aker
Second pass of thd cleanup
62
  void set_msg(Session *session, const char *msg_arg);
1 by brian
clean slate
63
};
64
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
65
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.
66
                            drizzled::error_t code, const char *msg);
67
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
68
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.
69
                         drizzled::error_t code, const char *format, ...);
70
520.1.22 by Brian Aker
Second pass of thd cleanup
71
void drizzle_reset_errors(Session *session, bool force);
2026.2.1 by Monty Taylor
Renamed things prefixed mysql_ or mysqld_
72
bool show_warnings(Session *session, 
73
                   std::bitset<DRIZZLE_ERROR::NUM_ERRORS> &levels_to_show);
1 by brian
clean slate
74
75
extern const LEX_STRING warning_level_names[];
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
76
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
77
} /* namespace drizzled */
78