List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:July 5 2010 1:44pm
Subject:bzr commit into mysql-5.1-bugteam branch (Georgi.Kodinov:3465) Bug#53493
View as plain text  
#At file:///home/kgeorge/mysql/work/B53493-5.1-bugteam/ based on revid:georgi.kodinov@stripped

 3465 Georgi Kodinov	2010-07-05
      Bug #53493 : add_to_status does not handle the longlong fields in STATUS_VAR
      Done a little code cleanup in struct system_status_var.
      Although no real wrong data were returned (since the two non-conformingly
      sized variables were never referenced through 
      add_to_status()/add_diff_to_status()) it's still error-prone and not a 
      good programming style. 
      Fixed by moving the two variables outside of the reach of 

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2010-07-04 04:02:49 +0000
+++ b/sql/sql_class.h	2010-07-05 13:28:24 +0000
@@ -405,12 +405,13 @@ struct system_variables
-/* per thread status variables */
+  Per thread status variables. Must be long/ulong up to
+  last_system_status_var so that add_to_status/add_diff_to_status can work.
 typedef struct system_status_var
-  ulonglong bytes_received;
-  ulonglong bytes_sent;
   ulong com_other;
   ulong com_stat[(uint) SQLCOM_END];
   ulong created_tmp_disk_tables;
@@ -466,13 +467,13 @@ typedef struct system_status_var
     Number of statements sent from the client
   ulong questions;
+  ulonglong bytes_received;
+  ulonglong bytes_sent;
     SEE last_system_status_var DEFINITION BELOW.
-    Below 'last_system_status_var' are all variables which doesn't make any
-    sense to add to the /global/ status variable counter.
-    Status variables which it does not make sense to add to
-    global status variable counter
+    Below 'last_system_status_var' are all variables that cannot be handled
+    by add_to_status()/add_diff_to_status().
   double last_query_cost;

Attachment: [text/bzr-bundle] bzr/
bzr commit into mysql-5.1-bugteam branch (Georgi.Kodinov:3465) Bug#53493Georgi Kodinov5 Jul