summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/mysqld.cc4
-rw-r--r--sql/sql_class.h4
-rw-r--r--sql/sql_show.cc2
-rw-r--r--sql/structs.h3
4 files changed, 8 insertions, 5 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 5dfb191c142..ca6bcff3b45 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -6190,8 +6190,8 @@ struct show_var_st status_vars[]= {
{"Aborted_connects", (char*) &aborted_connects, SHOW_LONG},
{"Binlog_cache_disk_use", (char*) &binlog_cache_disk_use, SHOW_LONG},
{"Binlog_cache_use", (char*) &binlog_cache_use, SHOW_LONG},
- {"Bytes_received", (char*) offsetof(STATUS_VAR, bytes_received), SHOW_LONG_STATUS},
- {"Bytes_sent", (char*) offsetof(STATUS_VAR, bytes_sent), SHOW_LONG_STATUS},
+ {"Bytes_received", (char*) offsetof(STATUS_VAR, bytes_received), SHOW_LONGLONG_STATUS},
+ {"Bytes_sent", (char*) offsetof(STATUS_VAR, bytes_sent), SHOW_LONGLONG_STATUS},
{"Com_admin_commands", (char*) offsetof(STATUS_VAR, com_other), SHOW_LONG_STATUS},
{"Com_alter_db", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_DB]), SHOW_LONG_STATUS},
{"Com_alter_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_TABLE]), SHOW_LONG_STATUS},
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 2ff5448f3e4..50c45d461e0 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -606,8 +606,8 @@ struct system_variables
typedef struct system_status_var
{
- ulong bytes_received;
- ulong bytes_sent;
+ ulonglong bytes_received;
+ ulonglong bytes_sent;
ulong com_other;
ulong com_stat[(uint) SQLCOM_END];
ulong created_tmp_disk_tables;
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index a0db458be78..902b298e423 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1463,6 +1463,8 @@ static bool show_status_array(THD *thd, const char *wild,
case SHOW_LONG_CONST:
end= int10_to_str(*(long*) value, buff, 10);
break;
+ case SHOW_LONGLONG_STATUS:
+ value= ((char *) status_var + (ulonglong) value);
case SHOW_LONGLONG:
end= longlong10_to_str(*(longlong*) value, buff, 10);
break;
diff --git a/sql/structs.h b/sql/structs.h
index de4cc25db9f..28bdd8c1519 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -190,7 +190,8 @@ enum SHOW_TYPE
SHOW_NET_COMPRESSION,
SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING, SHOW_SLAVE_RETRIED_TRANS,
SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG, SHOW_KEY_CACHE_LONGLONG,
- SHOW_LONG_STATUS, SHOW_LONG_CONST_STATUS, SHOW_SLAVE_SKIP_ERRORS
+ SHOW_LONG_STATUS, SHOW_LONG_CONST_STATUS, SHOW_SLAVE_SKIP_ERRORS,
+ SHOW_LONGLONG_STATUS
};
enum SHOW_COMP_OPTION { SHOW_OPTION_YES, SHOW_OPTION_NO, SHOW_OPTION_DISABLED};