~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_stats/stats_schema.cc

merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
  add_field("VARIABLE_VALUE", 1024);
122
122
}
123
123
 
124
 
SessionStatementsTool::Generator::Generator(Field **arg, LoggingStats *logging_stats) :
 
124
SessionStatementsTool::Generator::Generator(Field **arg, LoggingStats *in_logging_stats) :
125
125
  plugin::TableFunction::Generator(arg)
126
126
{
127
127
  count= 0;
128
128
 
129
129
  /* Set user_commands */
130
 
  Scoreboard *current_scoreboard= logging_stats->getCurrentScoreboard();
 
130
  Scoreboard *current_scoreboard= in_logging_stats->getCurrentScoreboard();
131
131
 
132
132
  uint32_t bucket_number= current_scoreboard->getBucketNumber(&getSession());
133
133
 
187
187
  add_field("VARIABLE_VALUE", 1024);
188
188
}
189
189
 
190
 
GlobalStatementsTool::Generator::Generator(Field **arg, LoggingStats *logging_stats) :
 
190
GlobalStatementsTool::Generator::Generator(Field **arg, LoggingStats *in_logging_stats) :
191
191
  plugin::TableFunction::Generator(arg)
192
192
{
193
193
  count= 0;
194
194
  /* add the current scoreboard and the saved global statements */
195
195
  global_stats_to_display= new GlobalStats();
196
 
  CumulativeStats *cumulativeStats= logging_stats->getCumulativeStats();
197
 
  cumulativeStats->sumCurrentScoreboard(logging_stats->getCurrentScoreboard(), 
 
196
  CumulativeStats *cumulativeStats= in_logging_stats->getCumulativeStats();
 
197
  cumulativeStats->sumCurrentScoreboard(in_logging_stats->getCurrentScoreboard(), 
198
198
                                        NULL, global_stats_to_display->getUserCommands());
199
 
  global_stats_to_display->merge(logging_stats->getCumulativeStats()->getGlobalStats()); 
 
199
  global_stats_to_display->merge(in_logging_stats->getCumulativeStats()->getGlobalStats()); 
200
200
}
201
201
 
202
202
GlobalStatementsTool::Generator::~Generator()