[Commits] 8b48a4a: CC

Oleksandr Byelkin sanja at mariadb.com
Mon Oct 17 16:27:28 EEST 2016


revision-id: 8b48a4aee7e3d79ee45ad48ef3a0f4460eac796c (mariadb-10.2.2-40-g8b48a4a)
parent(s): 981b0b3e69e12936e680d9f86357b8218d30e2c3
committer: Oleksandr Byelkin
timestamp: 2016-10-17 15:27:28 +0200
message:

CC

---
 sql/sql_class.cc | 8 ++++++--
 sql/sql_parse.cc | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 6038145..c0dc91f 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1589,7 +1589,11 @@ void THD::cleanup_connection(void)
 {
   mysql_mutex_lock(&LOCK_status);
   add_to_status(&global_status_var, &status_var);
-  bzero(&status_var, sizeof(status_var));
+  {
+    int64 save_mem= status_var.local_memory_used;
+    bzero(&status_var, sizeof(status_var));
+    status_var.local_memory_used= save_mem;
+  }
   mysql_mutex_unlock(&LOCK_status);
 
   cleanup();
@@ -1613,7 +1617,7 @@ void THD::cleanup_connection(void)
 
 #ifndef DBUG_OFF
     /* DEBUG code only (begin) */
-    bool check_cleanup= FALSE;
+    bool check_cleanup= TRUE;
     DBUG_EXECUTE_IF("debug_test_cleanup_connection", check_cleanup= TRUE;);
     if(check_cleanup)
     {
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 012a97a..478a0c3 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1682,7 +1682,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
   {
     thd->status_var.com_other++;
     thd->cleanup_connection();
-    my_ok(thd);
+    my_ok(thd, 0, 0, 0);
     break;
   }
   case COM_CHANGE_USER:


More information about the commits mailing list