List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:April 24 2008 3:32am
Subject:bk commit into 6.0 tree (davi:1.2628)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of davi.  When davi does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-04-24 00:31:59-03:00, davi@stripped +1 -0
  Free memory associated with libevent at scheduler end. The problem
  is that the libevent scheduler was not being properly deallocated
  at shutdown.

  sql/scheduler.cc@stripped, 2008-04-24 00:31:56-03:00, davi@stripped +4 -1
    Free memory associated with the event base when the
    server is being shutdown.

diff -Nrup a/sql/scheduler.cc b/sql/scheduler.cc
--- a/sql/scheduler.cc	2008-04-23 09:33:19 -03:00
+++ b/sql/scheduler.cc	2008-04-24 00:31:56 -03:00
@@ -94,6 +94,8 @@ void one_thread_per_connection_scheduler
 
 #include "event.h"
 
+static struct event_base *base;
+
 static uint created_threads, killed_threads;
 static bool kill_pool_threads;
 
@@ -259,7 +261,7 @@ static bool libevent_init(void)
   uint i;
   DBUG_ENTER("libevent_init");
 
-  event_init();
+  base= (struct event_base *) event_init();
 
   created_threads= 0;
   killed_threads= 0;
@@ -706,6 +708,7 @@ static void libevent_end()
   event_del(&thd_kill_event);
   close(thd_kill_pipe[0]);
   close(thd_kill_pipe[1]);
+  event_base_free(base);
 
   (void) pthread_mutex_destroy(&LOCK_event_loop);
   (void) pthread_mutex_destroy(&LOCK_thd_add);
Thread
bk commit into 6.0 tree (davi:1.2628)Davi Arnaut24 Apr
  • Re: bk commit into 6.0 tree (davi:1.2628)Konstantin Osipov24 Apr