~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memcached_stats/analysis_table.cc

  • Committer: Andrew Hutchings
  • Date: 2010-11-14 14:46:36 UTC
  • mto: (1931.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1932.
  • Revision ID: andrew@linuxjedi.co.uk-20101114144636-bkttapbfpp20ccd2
Fix broken Global Status test
Fix some stats not reset
Cleanup code a little

Note: local session stats are not reset, they will be added to the global stats after flush if any query is executed on those sessions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include <libmemcached/memcached.h>
38
38
#include <libmemcached/server.h>
39
39
 
40
 
namespace drizzle_plugin
41
 
{
 
40
using namespace std;
 
41
using namespace drizzled;
42
42
 
43
43
AnalysisTableTool::AnalysisTableTool() :
44
44
  plugin::TableFunction("DATA_DICTIONARY", "MEMCACHED_ANALYSIS")
68
68
  }
69
69
  is_done= true;
70
70
 
71
 
  drizzled::sys_var *servers_var= drizzled::find_sys_var("memcached_stats_servers");
72
 
  assert(servers_var != NULL);
73
 
 
74
 
  const string servers_string(static_cast<char *>(servers_var.value_ptr(NULL, 0, NULL)));
 
71
  SysvarHolder &sysvar_holder= SysvarHolder::singleton();
 
72
  const string servers_string= sysvar_holder.getServersString();
75
73
 
76
74
  if (servers_string.empty()) 
77
75
  {       
111
109
 
112
110
  return true;
113
111
}
114
 
 
115
 
} /* namespace drizzle_plugin */