~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/status_dictionary/dictionary.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
using namespace drizzled;
25
25
 
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;
32
28
 
33
29
 
34
 
static int init(drizzled::plugin::Registry &registry)
 
30
static int init(drizzled::module::Context &context)
35
31
{
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);
42
34
 
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);
49
37
  
50
38
  return 0;
51
39
}
52
40
 
53
 
static int finalize(drizzled::plugin::Registry &registry)
54
 
{
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);
61
 
 
62
 
  delete global_statements;
63
 
  delete global_status;
64
 
  delete global_variables;
65
 
  delete session_statements;
66
 
  delete session_status;
67
 
  delete session_variables;
68
 
 
69
 
  return 0;
70
 
}
71
 
 
72
41
DRIZZLE_DECLARE_PLUGIN
73
42
{
74
43
  DRIZZLE_VERSION_ID,
78
47
  "Dictionary for status, statement, and variable information.",
79
48
  PLUGIN_LICENSE_GPL,
80
49
  init,
81
 
  finalize,
82
50
  NULL,
83
51
  NULL
84
52
}