24
24
using namespace drizzled;
26
static StatementsTool *global_statements;
27
static StatementsTool *session_statements;
28
static StatusTool *global_status;
29
static StatusTool *session_status;
30
26
static VariablesTool *global_variables;
31
27
static VariablesTool *session_variables;
34
static int init(drizzled::plugin::Registry ®istry)
30
static int init(drizzled::module::Context &context)
36
global_statements= new(std::nothrow)StatementsTool(true);
37
global_status= new(std::nothrow)StatusTool(true);
38
session_statements= new(std::nothrow)StatementsTool(false);
39
session_status= new(std::nothrow)StatusTool(false);
40
32
global_variables= new(std::nothrow)VariablesTool(true);
41
33
session_variables= new(std::nothrow)VariablesTool(false);
43
registry.add(global_statements);
44
registry.add(global_status);
45
registry.add(global_variables);
46
registry.add(session_statements);
47
registry.add(session_status);
48
registry.add(session_variables);
35
context.add(global_variables);
36
context.add(session_variables);
53
static int finalize(drizzled::plugin::Registry ®istry)
55
registry.remove(global_statements);
56
registry.remove(global_status);
57
registry.remove(global_variables);
58
registry.remove(session_statements);
59
registry.remove(session_status);
60
registry.remove(session_variables);
62
delete global_statements;
64
delete global_variables;
65
delete session_statements;
66
delete session_status;
67
delete session_variables;
72
41
DRIZZLE_DECLARE_PLUGIN
74
43
DRIZZLE_VERSION_ID,