List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:July 14 2010 11:14am
Subject:bzr push into mysql-trunk branch (Georgi.Kodinov:3112 to 3113)
View as plain text  
 3113 Georgi Kodinov	2010-07-14 [merge]
      merge

    modified:
      sql/sql_class.cc
      sql/sql_class.h
 3112 Georgi Kodinov	2010-07-14 [merge]
      merge

    modified:
      scripts/mysql_secure_installation.pl.in
      scripts/mysql_secure_installation.sh
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2010-07-04 04:36:09 +0000
+++ b/sql/sql_class.cc	2010-07-14 11:09:00 +0000
@@ -1168,6 +1168,9 @@ void add_to_status(STATUS_VAR *to_var, S
 
   while (to != end)
     *(to++)+= *(from++);
+
+  to_var->bytes_received+= from_var->bytes_received;
+  to_var->bytes_sent+= from_var->bytes_sent;
 }
 
 /*
@@ -1193,6 +1196,9 @@ void add_diff_to_status(STATUS_VAR *to_v
 
   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;
 }
 
 

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2010-07-04 04:36:09 +0000
+++ b/sql/sql_class.h	2010-07-14 11:09:00 +0000
@@ -476,12 +476,14 @@ typedef struct system_variables
 } SV;
 
 
-/* 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;
@@ -537,13 +539,14 @@ typedef struct system_status_var
     Number of statements sent from the client
   */
   ulong questions;
+
+  ulonglong bytes_received;
+  ulonglong bytes_sent;
   /*
     IMPORTANT!
     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
+    automatically by add_to_status()/add_diff_to_status().
   */
   double last_query_cost;
 } STATUS_VAR;


Attachment: [text/bzr-bundle] bzr/georgi.kodinov@oracle.com-20100714110900-dbbpx3h24m5ihul9.bundle
Thread
bzr push into mysql-trunk branch (Georgi.Kodinov:3112 to 3113) Georgi Kodinov14 Jul