List:Commits« Previous MessageNext Message »
From:Oystein Grovlen Date:November 5 2012 12:10pm
Subject:bzr push into mysql-trunk branch (oystein.grovlen:4735 to 4736)
View as plain text  
 4736 Oystein Grovlen	2012-11-05
      Worklog #6073: Remove INSERT DELAYED: Plug memory leak
      
      The following code was deleted from Security_context::destroy()
      
        if (user != delayed_user)
        {
          my_free(user);
          user= NULL;
        }
      
      This is of course wrong since this code was executed for
      every thread, EXCEPT the delayed insert thread.
      Instead of deleting it, it should be changed to:
      
        if (user)
        {
          my_free(user);
          user= NULL;
        }

    modified:
      sql/sql_class.cc
 4735 Oystein Grovlen	2012-11-05 [merge]
      Merge diverged branches (overwrite had been used when pushing).

    modified:
      sql/sys_vars.cc
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2012-10-31 10:30:37 +0000
+++ b/sql/sql_class.cc	2012-11-05 10:50:24 +0000
@@ -3648,10 +3648,15 @@ void Security_context::destroy()
     my_free(host);
     host= NULL;
   }
+  if (user)
+  {
+    my_free(user);
+    user= NULL;
+  }
   if (external_user)
   {
     my_free(external_user);
-    user= NULL;
+    external_user= NULL;
   }
 
   my_free(ip);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (oystein.grovlen:4735 to 4736) Oystein Grovlen5 Nov