summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-07-14 11:50:17 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-07-14 11:50:17 +0300
commit678640019debce6c77109dc5f52e323eaee45a9f (patch)
tree28fa3a452e64826d139204d349cfbe946f56c03b /sql/sql_class.cc
parent1919414fbea08e73d326b92356b89133ed447e1d (diff)
downloadmariadb-git-678640019debce6c77109dc5f52e323eaee45a9f.tar.gz
Bug #53493 : add_to_status does not handle the longlong fields in STATUS_VAR
bytes_received/bytes_sent are ulonglong so they cannot be handled by the ulong handling code in add_to_status/add_diff_to_status(). Fixed by adding code to handle these two variables in add_to_status()/add_diff_to_status() and making sure they are not a subject to the ulong handling code.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 2ce03708a9a..1028a9fccf4 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1063,6 +1063,9 @@ void add_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var)
while (to != end)
*(to++)+= *(from++);
+
+ to_var->bytes_received+= from_var->bytes_received;
+ to_var->bytes_sent+= from_var->bytes_sent;
}
/*
@@ -1088,6 +1091,9 @@ void add_diff_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var,
while (to != end)
*(to++)+= *(from++) - *(dec++);
+
+ to_var->bytes_received+= from_var->bytes_received - dec_var->bytes_received;;
+ to_var->bytes_sent+= from_var->bytes_sent - dec_var->bytes_sent;
}