~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Joe Daly
  • Date: 2010-05-21 02:16:56 UTC
  • mto: This revision was merged to the branch mainline in revision 1555.
  • Revision ID: skinny.moey@gmail.com-20100521021656-bx6piitfh77jnl28
add statistics_variables.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
217
217
bool volatile select_thread_in_use;
218
218
bool volatile abort_loop;
219
219
bool volatile shutdown_in_progress;
220
 
uint32_t max_used_connections;
221
220
const string opt_scheduler_default("multi_thread");
222
221
char *opt_scheduler= NULL;
223
222
 
242
241
uint32_t server_id;
243
242
uint64_t table_cache_size;
244
243
size_t table_def_size;
245
 
uint64_t aborted_threads;
246
 
uint64_t aborted_connects;
247
244
uint64_t max_connect_errors;
248
245
uint32_t global_thread_id= 1UL;
249
246
pid_t current_pid;
316
313
struct system_variables global_system_variables;
317
314
struct system_variables max_system_variables;
318
315
struct system_status_var global_status_var;
 
316
struct global_counters current_global_counters;
319
317
 
320
318
const CHARSET_INFO *system_charset_info, *files_charset_info ;
321
319
const CHARSET_INFO *table_alias_charset;
732
730
static st_show_var_func_container show_flushstatustime_cont= { &show_flushstatustime };
733
731
 
734
732
static drizzle_show_var status_vars[]= {
735
 
  {"Aborted_clients",          (char*) &aborted_threads,        SHOW_LONGLONG},
736
 
  {"Aborted_connects",         (char*) &aborted_connects,       SHOW_LONGLONG},
 
733
  {"Aborted_clients",          (char*) &current_global_counters.aborted_threads, SHOW_LONGLONG},
 
734
  {"Aborted_connects",         (char*) &current_global_counters.aborted_connects, SHOW_LONGLONG},
737
735
  {"Bytes_received",           (char*) offsetof(system_status_var, bytes_received), SHOW_LONGLONG_STATUS},
738
736
  {"Bytes_sent",               (char*) offsetof(system_status_var, bytes_sent), SHOW_LONGLONG_STATUS},
739
737
  {"Connections",              (char*) &global_thread_id, SHOW_INT_NOFLUSH},
762
760
  {"Key_write_requests",       (char*) offsetof(KEY_CACHE, global_cache_w_requests), SHOW_KEY_CACHE_LONGLONG},
763
761
  {"Key_writes",               (char*) offsetof(KEY_CACHE, global_cache_write), SHOW_KEY_CACHE_LONGLONG},
764
762
  {"Last_query_cost",          (char*) offsetof(system_status_var, last_query_cost), SHOW_DOUBLE_STATUS},
765
 
  {"Max_used_connections",     (char*) &max_used_connections,  SHOW_INT},
 
763
  {"Max_used_connections",     (char*) &current_global_counters.max_used_connections,  SHOW_INT},
766
764
  {"Questions",                (char*) offsetof(system_status_var, questions), SHOW_LONG_STATUS},
767
765
  {"Select_full_join",         (char*) offsetof(system_status_var, select_full_join_count), SHOW_LONG_STATUS},
768
766
  {"Select_full_range_join",   (char*) offsetof(system_status_var, select_full_range_join_count), SHOW_LONG_STATUS},
774
772
  {"Sort_range",               (char*) offsetof(system_status_var, filesort_range_count), SHOW_LONG_STATUS},
775
773
  {"Sort_rows",                (char*) offsetof(system_status_var, filesort_rows), SHOW_LONG_STATUS},
776
774
  {"Sort_scan",                (char*) offsetof(system_status_var, filesort_scan_count), SHOW_LONG_STATUS},
777
 
  {"Table_locks_immediate",    (char*) &locks_immediate,        SHOW_INT},
778
 
  {"Table_locks_waited",       (char*) &locks_waited,           SHOW_INT},
 
775
  {"Table_locks_immediate",    (char*) &current_global_counters.locks_immediate,        SHOW_INT},
 
776
  {"Table_locks_waited",       (char*) &current_global_counters.locks_waited,           SHOW_INT},
779
777
  {"Threads_connected",        (char*) &connection_count,       SHOW_INT},
780
778
  {"Uptime",                   (char*) &show_starttime_cont,         SHOW_FUNC},
781
779
  {"Uptime_since_flush_status",(char*) &show_flushstatustime_cont,   SHOW_FUNC},
1514
1512
  wake_thread=0;
1515
1513
  abort_loop= select_thread_in_use= false;
1516
1514
  ready_to_exit= shutdown_in_progress= 0;
1517
 
  aborted_threads= aborted_connects= 0;
1518
 
  max_used_connections= 0;
1519
1515
  drizzled_user= drizzled_chroot= 0;
1520
1516
  memset(&global_status_var, 0, sizeof(global_status_var));
 
1517
  memset(&current_global_counters, 0, sizeof(current_global_counters));
1521
1518
  key_map_full.set();
1522
1519
 
1523
1520
  /* Character sets */