4053
4053
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
4056
static int show_net_compression(THD *thd, SHOW_VAR *var, char *buff)
4056
static int show_net_compression(THD *thd __attribute__((__unused__)),
4058
char *buff __attribute__((__unused__)))
4058
4060
var->type= SHOW_MY_BOOL;
4059
4061
var->value= (char *)&thd->net.compress;
4065
static st_show_var_func_container
4066
show_net_compression_cont= { &show_net_compression };
4063
4068
static int show_starttime(THD *thd, SHOW_VAR *var, char *buff)
4065
4070
var->type= SHOW_LONG;
4079
static int show_slave_running(THD *thd, SHOW_VAR *var, char *buff)
4087
static st_show_var_func_container
4088
show_flushstatustime_cont= { &show_flushstatustime };
4090
static int show_slave_running(THD *thd __attribute__((__unused__)),
4091
SHOW_VAR *var, char *buff)
4081
4093
var->type= SHOW_MY_BOOL;
4082
4094
pthread_mutex_lock(&LOCK_active_mi);
4090
static int show_slave_retried_trans(THD *thd, SHOW_VAR *var, char *buff)
4102
static st_show_var_func_container
4103
show_slave_running_cont= { &show_slave_running };
4105
static int show_slave_retried_trans(THD *thd __attribute__((__unused__)),
4106
SHOW_VAR *var, char *buff)
4093
4109
TODO: with multimaster, have one such counter per line in
4111
static int show_slave_received_heartbeats(THD *thd, SHOW_VAR *var, char *buff)
4127
static st_show_var_func_container
4128
show_slave_retried_trans_cont= { &show_slave_retried_trans };
4130
static int show_slave_received_heartbeats(THD *thd __attribute__((__unused__)),
4131
SHOW_VAR *var, char *buff)
4113
4133
pthread_mutex_lock(&LOCK_active_mi);
4128
static int show_heartbeat_period(THD *thd, SHOW_VAR *var, char *buff)
4148
static st_show_var_func_container
4149
show_slave_received_heartbeats_cont= { &show_slave_received_heartbeats };
4151
static int show_heartbeat_period(THD *thd __attribute__((__unused__)),
4152
SHOW_VAR *var, char *buff)
4130
4154
pthread_mutex_lock(&LOCK_active_mi);
4167
static st_show_var_func_container
4168
show_heartbeat_period_cont= { &show_heartbeat_period};
4144
static int show_open_tables(THD *thd, SHOW_VAR *var, char *buff)
4170
static int show_open_tables(THD *thd __attribute__((__unused__)),
4171
SHOW_VAR *var, char *buff)
4146
4173
var->type= SHOW_LONG;
4147
4174
var->value= buff;
4152
static int show_table_definitions(THD *thd, SHOW_VAR *var, char *buff)
4179
static int show_table_definitions(THD *thd __attribute__((__unused__)),
4180
SHOW_VAR *var, char *buff)
4154
4182
var->type= SHOW_LONG;
4155
4183
var->value= buff;
4188
static st_show_var_func_container
4189
show_open_tables_cont= { &show_open_tables };
4190
static st_show_var_func_container
4191
show_table_definitions_cont= { &show_table_definitions };
4161
4194
Variables shown by SHOW STATUS in alphabetical order
4169
4202
{"Bytes_received", (char*) offsetof(STATUS_VAR, bytes_received), SHOW_LONGLONG_STATUS},
4170
4203
{"Bytes_sent", (char*) offsetof(STATUS_VAR, bytes_sent), SHOW_LONGLONG_STATUS},
4171
4204
{"Com", (char*) com_status_vars, SHOW_ARRAY},
4172
{"Compression", (char*) &show_net_compression, SHOW_FUNC},
4205
{"Compression", (char*) &show_net_compression_cont, SHOW_FUNC},
4173
4206
{"Connections", (char*) &thread_id, SHOW_LONG_NOFLUSH},
4174
4207
{"Created_tmp_disk_tables", (char*) offsetof(STATUS_VAR, created_tmp_disk_tables), SHOW_LONG_STATUS},
4175
4208
{"Created_tmp_files", (char*) &my_tmp_file_created, SHOW_LONG},
4201
4234
{"Max_used_connections", (char*) &max_used_connections, SHOW_LONG},
4202
4235
{"Open_files", (char*) &my_file_opened, SHOW_LONG_NOFLUSH},
4203
4236
{"Open_streams", (char*) &my_stream_opened, SHOW_LONG_NOFLUSH},
4204
{"Open_table_definitions", (char*) &show_table_definitions, SHOW_FUNC},
4205
{"Open_tables", (char*) &show_open_tables, SHOW_FUNC},
4237
{"Open_table_definitions", (char*) &show_table_definitions_cont, SHOW_FUNC},
4238
{"Open_tables", (char*) &show_open_tables_cont, SHOW_FUNC},
4206
4239
{"Opened_files", (char*) &my_file_total_opened, SHOW_LONG_NOFLUSH},
4207
4240
{"Opened_tables", (char*) offsetof(STATUS_VAR, opened_tables), SHOW_LONG_STATUS},
4208
4241
{"Opened_table_definitions", (char*) offsetof(STATUS_VAR, opened_shares), SHOW_LONG_STATUS},
4213
4246
{"Select_range_check", (char*) offsetof(STATUS_VAR, select_range_check_count), SHOW_LONG_STATUS},
4214
4247
{"Select_scan", (char*) offsetof(STATUS_VAR, select_scan_count), SHOW_LONG_STATUS},
4215
4248
{"Slave_open_temp_tables", (char*) &slave_open_temp_tables, SHOW_LONG},
4216
{"Slave_retried_transactions",(char*) &show_slave_retried_trans, SHOW_FUNC},
4217
{"Slave_heartbeat_period", (char*) &show_heartbeat_period, SHOW_FUNC},
4218
{"Slave_received_heartbeats",(char*) &show_slave_received_heartbeats, SHOW_FUNC},
4219
{"Slave_running", (char*) &show_slave_running, SHOW_FUNC},
4249
{"Slave_retried_transactions",(char*) &show_slave_retried_trans_cont, SHOW_FUNC},
4250
{"Slave_heartbeat_period", (char*) &show_heartbeat_period_cont, SHOW_FUNC},
4251
{"Slave_received_heartbeats",(char*) &show_slave_received_heartbeats_cont, SHOW_FUNC},
4252
{"Slave_running", (char*) &show_slave_running_cont, SHOW_FUNC},
4220
4253
{"Slow_launch_threads", (char*) &slow_launch_threads, SHOW_LONG},
4221
4254
{"Slow_queries", (char*) offsetof(STATUS_VAR, long_query_count), SHOW_LONG_STATUS},
4222
4255
{"Sort_merge_passes", (char*) offsetof(STATUS_VAR, filesort_merge_passes), SHOW_LONG_STATUS},
4234
4267
{"Threads_connected", (char*) &connection_count, SHOW_INT},
4235
4268
{"Threads_created", (char*) &thread_created, SHOW_LONG_NOFLUSH},
4236
4269
{"Threads_running", (char*) &thread_running, SHOW_INT},
4237
{"Uptime", (char*) &show_starttime, SHOW_FUNC},
4238
{"Uptime_since_flush_status",(char*) &show_flushstatustime, SHOW_FUNC},
4270
{"Uptime", (char*) &show_starttime_cont, SHOW_FUNC},
4271
{"Uptime_since_flush_status",(char*) &show_flushstatustime_cont, SHOW_FUNC},
4239
4272
{NullS, NullS, SHOW_LONG}