1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2009 Sun Microsystems
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
23
* I_S plugin implementation.
27
#include "drizzled/session.h"
28
#include "drizzled/show.h"
30
#include "helper_methods.h"
31
#include "character_set.h"
32
#include "collation.h"
33
#include "collation_char_set.h"
35
#include "key_column_usage.h"
37
#include "open_tables.h"
39
#include "processlist.h"
40
#include "referential_constraints.h"
42
#include "table_constraints.h"
44
#include "table_names.h"
45
#include "statistics.h"
47
#include "variables.h"
51
using namespace drizzled;
55
* Initialize the I_S plugin.
57
* @param[in] registry the drizzled::plugin::Registry singleton
58
* @return 0 on success; 1 on failure.
60
static int infoSchemaInit(drizzled::plugin::Registry& registry)
62
registry.add(CharacterSetIS::getTable());
63
registry.add(CollationIS::getTable());
64
registry.add(CollationCharSetIS::getTable());
65
registry.add(ColumnsIS::getTable());
66
registry.add(KeyColumnUsageIS::getTable());
67
registry.add(GlobalStatusIS::getTable());
68
registry.add(GlobalVariablesIS::getTable());
69
registry.add(OpenTablesIS::getTable());
70
registry.add(ModulesIS::getTable());
71
registry.add(PluginsIS::getTable());
72
registry.add(ProcessListIS::getTable());
73
registry.add(ReferentialConstraintsIS::getTable());
74
registry.add(SchemataIS::getTable());
75
registry.add(SessionStatusIS::getTable());
76
registry.add(SessionVariablesIS::getTable());
77
registry.add(StatisticsIS::getTable());
78
registry.add(StatusIS::getTable());
79
registry.add(TableConstraintsIS::getTable());
80
registry.add(TablesIS::getTable());
81
registry.add(TableNamesIS::getTable());
82
registry.add(VariablesIS::getTable());
88
* Clean up the I_S plugin.
90
* @param[in] registry the drizzled::plugin::Registry singleton
91
* @return 0 on success; 1 on failure
93
static int infoSchemaDone(drizzled::plugin::Registry& registry)
95
registry.remove(CharacterSetIS::getTable());
96
CharacterSetIS::cleanup();
98
registry.remove(CollationIS::getTable());
99
CollationIS::cleanup();
101
registry.remove(CollationCharSetIS::getTable());
102
CollationCharSetIS::cleanup();
104
registry.remove(ColumnsIS::getTable());
105
ColumnsIS::cleanup();
107
registry.remove(KeyColumnUsageIS::getTable());
108
KeyColumnUsageIS::cleanup();
110
registry.remove(GlobalStatusIS::getTable());
111
GlobalStatusIS::cleanup();
113
registry.remove(GlobalVariablesIS::getTable());
114
GlobalVariablesIS::cleanup();
116
registry.remove(OpenTablesIS::getTable());
117
OpenTablesIS::cleanup();
119
registry.remove(ModulesIS::getTable());
120
ModulesIS::cleanup();
122
registry.remove(PluginsIS::getTable());
123
PluginsIS::cleanup();
125
registry.remove(ProcessListIS::getTable());
126
ProcessListIS::cleanup();
128
registry.remove(ReferentialConstraintsIS::getTable());
129
ReferentialConstraintsIS::cleanup();
131
registry.remove(SchemataIS::getTable());
132
SchemataIS::cleanup();
134
registry.remove(SessionStatusIS::getTable());
135
SessionStatusIS::cleanup();
137
registry.remove(SessionVariablesIS::getTable());
138
SessionVariablesIS::cleanup();
140
registry.remove(StatisticsIS::getTable());
141
StatisticsIS::cleanup();
143
registry.remove(StatusIS::getTable());
146
registry.remove(TableConstraintsIS::getTable());
147
TableConstraintsIS::cleanup();
149
registry.remove(TablesIS::getTable());
152
registry.remove(TableNamesIS::getTable());
153
TableNamesIS::cleanup();
155
registry.remove(VariablesIS::getTable());
156
VariablesIS::cleanup();
161
DRIZZLE_DECLARE_PLUGIN
166
"Padraig O'Sullivan",
175
DRIZZLE_DECLARE_PLUGIN_END;