38
38
{ C_STRING_WITH_LEN("Drop DB") },
39
39
{ C_STRING_WITH_LEN("Refresh") },
40
40
{ C_STRING_WITH_LEN("Shutdown") },
41
{ C_STRING_WITH_LEN("Statistics") },
42
41
{ C_STRING_WITH_LEN("Processlist") },
43
42
{ C_STRING_WITH_LEN("Connect") },
44
43
{ C_STRING_WITH_LEN("Kill") },
831
STATUS_VAR current_global_status_var;
834
uint64_t queries_per_second1000;
836
uint buff_len= sizeof(buff);
838
general_log_print(thd, command, NullS);
839
status_var_increment(thd->status_var.com_stat[SQLCOM_SHOW_STATUS]);
840
calc_sum_of_all_status(¤t_global_status_var);
841
if (!(uptime= (ulong) (thd->start_time - server_start_time)))
842
queries_per_second1000= 0;
844
queries_per_second1000= thd->query_id * 1000LL / uptime;
846
length= snprintf((char*) buff, buff_len - 1,
847
"Uptime: %lu Threads: %d Questions: %lu "
848
"Slow queries: %lu Opens: %lu Flush tables: %lu "
849
"Open tables: %u Queries per second avg: %u.%u",
851
(int) thread_count, (ulong) thd->query_id,
852
current_global_status_var.long_query_count,
853
current_global_status_var.opened_tables,
855
cached_open_tables(),
856
(uint) (queries_per_second1000 / 1000),
857
(uint) (queries_per_second1000 % 1000));
858
VOID(my_net_write(net, (uchar*) buff, length));
859
VOID(net_flush(net));
860
thd->main_da.disable_status();
864
828
status_var_increment(thd->status_var.com_other);
865
829
my_ok(thd); // Tell client we are alive