~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memcached_stats/memcached_stats.cc

  • Committer: Brian Aker
  • Date: 2010-03-17 19:18:40 UTC
  • mto: This revision was merged to the branch mainline in revision 1354.
  • Revision ID: brian@gaz-20100317191840-9ro7fajqp6lhaqjo
Update, we now have all of the ANSI INFORMATION_SCHEMA listed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "config.h"
31
31
#include "drizzled/show.h"
32
32
#include "drizzled/gettext.h"
 
33
#include "drizzled/plugin/info_schema_table.h"
33
34
 
34
35
#include "stats_table.h"
35
36
#include "analysis_table.h"
59
60
 * @param[in] registry the drizzled::plugin::Registry singleton
60
61
 * @return false on success; true on failure.
61
62
 */
62
 
static int init(plugin::Context &context)
 
63
static int init(plugin::Registry &registry)
63
64
{
64
65
 
65
66
  SysvarHolder &sysvar_holder= SysvarHolder::singleton();
67
68
 
68
69
  /* we are good to go */
69
70
  stats_table_tool= new(std::nothrow)StatsTableTool; 
70
 
  context.add(stats_table_tool);
 
71
  registry.add(stats_table_tool);
71
72
 
72
73
  analysis_table_tool= new(std::nothrow)AnalysisTableTool;
73
 
  context.add(analysis_table_tool);
74
 
 
 
74
  registry.add(analysis_table_tool);
 
75
 
 
76
  return 0;
 
77
}
 
78
 
 
79
/**
 
80
 * Clean up the memcached stats plugin.
 
81
 *
 
82
 * @param[in] registry the drizzled::plugin::Registry singleton
 
83
 * @return false on success; true on failure
 
84
 */
 
85
static int deinit(plugin::Registry &registry)
 
86
{
 
87
  registry.remove(stats_table_tool);
 
88
  delete stats_table_tool;
 
89
  registry.remove(analysis_table_tool);
 
90
  delete analysis_table_tool;
75
91
  return 0;
76
92
}
77
93
 
131
147
  N_("Memcached Stats as I_S tables"),
132
148
  PLUGIN_LICENSE_BSD,
133
149
  init,   /* Plugin Init      */
 
150
  deinit, /* Plugin Deinit    */
134
151
  system_variables, /* system variables */
135
152
  NULL    /* config options   */
136
153
}