~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/session_dictionary/dictionary.cc

  • Committer: Stewart Smith
  • Date: 2010-02-15 01:56:32 UTC
  • mto: (1273.13.96 build)
  • mto: This revision was merged to the branch mainline in revision 1308.
  • Revision ID: stewart@flamingspork.com-20100215015632-pm7lnxfq5j5uh8kj
move DATABASE() to function plugin. modify parser so that it looks for a function named 'database' when DATABASE() is called. Special case still needed in parser due to hilarity of not-really-reserved words.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
static ProcesslistTool *processlist;
27
27
 
28
 
static int init(drizzled::plugin::Context &context)
 
28
static int init(drizzled::plugin::Registry &registry)
29
29
{
30
30
  processlist= new(std::nothrow)ProcesslistTool;
31
 
  context.add(processlist);
 
31
  registry.add(processlist);
32
32
  
33
33
  return 0;
34
34
}
35
35
 
 
36
static int finalize(drizzled::plugin::Registry &registry)
 
37
{
 
38
  registry.remove(processlist);
 
39
  delete processlist;
 
40
 
 
41
  return 0;
 
42
}
 
43
 
36
44
DRIZZLE_DECLARE_PLUGIN
37
45
{
38
46
  DRIZZLE_VERSION_ID,
42
50
  "Dictionary for session information, aka proccesslist, etc.",
43
51
  PLUGIN_LICENSE_GPL,
44
52
  init,
 
53
  finalize,
 
54
  NULL,
45
55
  NULL,
46
56
  NULL
47
57
}