~posulliv/drizzle/optimizer-style-cleanup

« back to all changes in this revision

Viewing changes to plugin/memcached_stats/memcached_stats.cc

  • Committer: Padraig O'Sullivan
  • Date: 2010-04-17 01:38:47 UTC
  • mfrom: (1237.9.238 bad-staging)
  • Revision ID: osullivan.padraig@gmail.com-20100417013847-ibjioqsfbmf5yg4g
Merge trunk.

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"
34
33
 
35
34
#include "stats_table.h"
36
35
#include "analysis_table.h"
60
59
 * @param[in] registry the drizzled::plugin::Registry singleton
61
60
 * @return false on success; true on failure.
62
61
 */
63
 
static int init(plugin::Registry &registry)
 
62
static int init(plugin::Context &context)
64
63
{
65
64
 
66
65
  SysvarHolder &sysvar_holder= SysvarHolder::singleton();
68
67
 
69
68
  /* we are good to go */
70
69
  stats_table_tool= new(std::nothrow)StatsTableTool; 
71
 
  registry.add(stats_table_tool);
 
70
  context.add(stats_table_tool);
72
71
 
73
72
  analysis_table_tool= new(std::nothrow)AnalysisTableTool;
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;
 
73
  context.add(analysis_table_tool);
 
74
 
91
75
  return 0;
92
76
}
93
77
 
147
131
  N_("Memcached Stats as I_S tables"),
148
132
  PLUGIN_LICENSE_BSD,
149
133
  init,   /* Plugin Init      */
150
 
  deinit, /* Plugin Deinit    */
151
134
  system_variables, /* system variables */
152
135
  NULL    /* config options   */
153
136
}