~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/flush.cc

  • Committer: Andrew Hutchings
  • Date: 2010-11-09 13:38:01 UTC
  • mto: (1919.1.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 1920.
  • Revision ID: andrew@linuxjedi.co.uk-20101109133801-byjzsao76346395x
Add FLUSH GLOBAL STATUS; command
Clears the global status variables for the server

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <drizzled/lock.h>
25
25
#include <drizzled/statement/flush.h>
26
26
#include "drizzled/sql_table.h"
 
27
#include "drizzled/plugin/logging.h"
27
28
 
28
29
namespace drizzled
29
30
{
93
94
    session->refresh_status();
94
95
  }
95
96
 
96
 
 return result;
 
97
  if (session && flush_global_status)
 
98
  {
 
99
    memset(&current_global_counters, 0, sizeof(current_global_counters));
 
100
    plugin::Logging::resetStats(session);
 
101
    session->refresh_status();
 
102
  }
 
103
 
 
104
  return result;
97
105
}
98
106
 
99
107
}