~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_stats/stats_schema.cc

  • Committer: Joe Daly
  • Date: 2010-04-29 03:08:04 UTC
  • mto: This revision was merged to the branch mainline in revision 1523.
  • Revision ID: skinny.moey@gmail.com-20100429030804-ppssp19xwyrgm5of
remove com_stat_vars and rework lock in scoreboard to not lock on Sessions locating a slot they previously owned

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
#include "stats_schema.h"
89
89
#include "scoreboard.h"
90
90
 
 
91
#include <sstream>
 
92
 
91
93
using namespace drizzled;
92
94
using namespace plugin;
93
95
using namespace std;
97
99
{
98
100
  logging_stats= in_logging_stats;
99
101
  add_field("VARIABLE_NAME");
100
 
  add_field("VARIABLE_VALUE", TableFunction::NUMBER);
 
102
  add_field("VARIABLE_VALUE", 1024);
101
103
}
102
104
 
103
105
SessionStatementsTool::Generator::Generator(Field **arg, LoggingStats *logging_stats) :
151
153
    return false;
152
154
  }
153
155
 
154
 
  push(UserCommands::STATUS_VARS[count]);
155
 
  push(user_commands->getCount(count));
 
156
  push(UserCommands::COM_STATUS_VARS[count]);
 
157
  ostringstream oss;
 
158
  oss << user_commands->getCount(count);
 
159
  push(oss.str()); 
156
160
 
157
161
  ++count;
158
162
  return true;
163
167
{   
164
168
  logging_stats= in_logging_stats;
165
169
  add_field("VARIABLE_NAME");
166
 
  add_field("VARIABLE_VALUE", TableFunction::NUMBER);
 
170
  add_field("VARIABLE_VALUE", 1024);
167
171
}
168
172
 
169
173
GlobalStatementsTool::Generator::Generator(Field **arg, LoggingStats *logging_stats) :
181
185
    return false;
182
186
  }
183
187
 
184
 
  push(UserCommands::STATUS_VARS[count]);
185
 
  push(global_stats->getUserCommands()->getCount(count));
 
188
  push(UserCommands::COM_STATUS_VARS[count]);
 
189
  ostringstream oss;
 
190
  oss << global_stats->getUserCommands()->getCount(count);
 
191
  push(oss.str());
186
192
 
187
193
  ++count;
188
194
  return true;