~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_stats/logging_stats.cc

  • Committer: Joe Daly
  • Date: 2010-05-27 02:59:16 UTC
  • mto: This revision was merged to the branch mainline in revision 1614.
  • Revision ID: skinny.moey@gmail.com-20100527025916-o4wieb1hxk2shq4u
add status_vars to scoreboard, initial pass

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
{
121
121
  enum_sql_command sql_command= session->lex->sql_command;
122
122
 
123
 
  UserCommands *user_commands= scoreboard_slot->getUserCommands();
 
123
  scoreboard_slot->getUserCommands()->logCommand(sql_command);
124
124
 
125
 
  user_commands->logCommand(sql_command);
 
125
  scoreboard_slot->getStatusVars()->logStatusVar(session);
126
126
}
127
127
 
128
128
bool LoggingStats::post(Session *session)
174
174
 
175
175
static SessionStatementsTool *session_statements_tool= NULL;
176
176
 
 
177
static StatusVarTool *status_var_tool= NULL;
 
178
 
177
179
static void enable(Session *,
178
180
                   drizzle_sys_var *,
179
181
                   void *var_ptr,
224
226
    return true;
225
227
  }
226
228
 
 
229
  status_var_tool= new(nothrow)StatusVarTool(logging_stats);
 
230
 
 
231
  if (! status_var_tool)
 
232
  {
 
233
    return true;
 
234
  }
 
235
 
227
236
  return false;
228
237
}
229
238
 
241
250
  context.add(cumulative_commands_tool);
242
251
  context.add(global_statements_tool);
243
252
  context.add(session_statements_tool);
 
253
  context.add(status_var_tool);
244
254
 
245
255
  if (sysvar_logging_stats_enabled)
246
256
  {