~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memcached_stats/analysis_table.cc

  • Committer: Monty Taylor
  • Date: 2010-06-02 22:35:45 UTC
  • mto: This revision was merged to the branch mainline in revision 1586.
  • Revision ID: mordred@inaugust.com-20100602223545-q8ekf9b40a85nwuf
Rearragned unittests into a single exe because of how we need to link it
(thanks lifeless)
Link with server symbols without needing to build a library.
Added an additional atomics test which tests whatever version of the atomics
lib the running platform would actually use.

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 */