1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2010 Brian Aker
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; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
#include "plugin/status_dictionary/dictionary.h"
24
static StatementsTool *global_statements;
25
static StatementsTool *session_statements;
26
static StatusTool *global_status;
27
static StatusTool *session_status;
28
static VariablesTool *global_variables;
29
static VariablesTool *session_variables;
32
static int init(drizzled::plugin::Registry ®istry)
34
global_statements= new(std::nothrow)StatementsTool(true);
35
global_status= new(std::nothrow)StatusTool(true);
36
session_statements= new(std::nothrow)StatementsTool(false);
37
session_status= new(std::nothrow)StatusTool(false);
38
global_variables= new(std::nothrow)VariablesTool(true);
39
session_variables= new(std::nothrow)VariablesTool(false);
41
registry.add(global_statements);
42
registry.add(global_status);
43
registry.add(global_variables);
44
registry.add(session_statements);
45
registry.add(session_status);
46
registry.add(session_variables);
51
static int finalize(drizzled::plugin::Registry ®istry)
53
registry.remove(global_statements);
54
registry.remove(global_status);
55
registry.remove(global_variables);
56
registry.remove(session_statements);
57
registry.remove(session_status);
58
registry.remove(session_variables);
60
delete global_statements;
62
delete global_variables;
63
delete session_statements;
64
delete session_status;
65
delete session_variables;
73
drizzled::plugin::Registry ®istry= drizzled::plugin::Registry::singleton();
81
DRIZZLE_DECLARE_PLUGIN
87
"Data Dictionary for schema, table, column, indexes, etc",
95
DRIZZLE_DECLARE_PLUGIN_END;