~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memcached_stats/analysis_table.cc

  • Committer: Mark Atwood
  • Date: 2010-06-24 03:15:21 UTC
  • mto: (1637.2.4 build)
  • mto: This revision was merged to the branch mainline in revision 1639.
  • Revision ID: me@mark.atwood.name-20100624031521-gafmppfbf5afm68w
new syslog module, with plugins for query log, error message, and SYSLOG() function

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* 
2
 
 * Copyright (C) 2009, Padraig O'Sullivan
 
2
 * Copyright (c) 2009, Padraig O'Sullivan
3
3
 * All rights reserved.
4
4
 *
5
5
 * Redistribution and use in source and binary forms, with or without
27
27
 * THE POSSIBILITY OF SUCH DAMAGE.
28
28
 */
29
29
 
30
 
#include <config.h>
 
30
#include "config.h"
31
31
 
32
32
#include "analysis_table.h"
33
33
#include "sysvar_holder.h"
34
34
 
35
 
#include <drizzled/error.h>
 
35
#include "drizzled/error.h"
36
36
 
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 */