[Commits] Rev 3678: MDEV-4815 - allow multiple mysql_server_init() / mysql_server_end() in the same process, for embedded library. in file:///home/bell/maria/bzr/work-maria-10.0-base-merge-5.5/

sanja at montyprogram.com sanja at montyprogram.com
Mon Aug 19 12:59:16 EEST 2013


At file:///home/bell/maria/bzr/work-maria-10.0-base-merge-5.5/

------------------------------------------------------------
revno: 3678
revision-id: wlad at montyprogram.com-20130729140341-xb10d3gw1foqx6f3
parent: sanja at montyprogram.com-20130719102123-hj6ncjwg8e3s4nr2
author: Vladislav Vaintroub <wlad at montyprogram.com>
committer: sanja at montyprogram.com
branch nick: 5.5
timestamp: Mon 2013-07-29 16:03:41 +0200
message:
  MDEV-4815 - allow multiple  mysql_server_init() / mysql_server_end() in the same process, for embedded library.
  
  - Reset  static variables that are used to signal "init done"  for DBUG, in dbug_end()
  - Set string server variables to NULL after memory for the value is freed - avoids double free()
  - fix DBUG_ASSERTs that happened during reinitialization.
-------------- next part --------------
=== modified file 'dbug/dbug.c'
--- a/dbug/dbug.c	2013-07-16 17:09:54 +0000
+++ b/dbug/dbug.c	2013-07-29 14:03:41 +0000
@@ -1642,6 +1642,7 @@ void _db_end_()
 
   cs->stack= &init_settings;
   FreeState(cs, 0);
+  init_done= 0;
 }
 
 

=== modified file 'mysys/waiting_threads.c'
--- a/mysys/waiting_threads.c	2013-06-24 18:56:55 +0000
+++ b/mysys/waiting_threads.c	2013-07-29 14:03:41 +0000
@@ -476,6 +476,7 @@ void wt_end()
   my_atomic_rwlock_destroy(&cycle_stats_lock);
   my_atomic_rwlock_destroy(&success_stats_lock);
   my_atomic_rwlock_destroy(&wait_stats_lock);
+  reshash.alloc.constructor= NULL;
   wt_init_done= 0;
   DBUG_VOID_RETURN;
 }

=== modified file 'sql/sys_vars.h'
--- a/sql/sys_vars.h	2013-05-22 15:36:48 +0000
+++ b/sql/sys_vars.h	2013-07-29 14:03:41 +0000
@@ -428,7 +428,10 @@ public:
   void cleanup()
   {
     if (flags & ALLOCATED)
+    {
       my_free(global_var(char*));
+      global_var(char *)= NULL;
+    }
     flags&= ~ALLOCATED;
   }
   static bool do_string_check(THD *thd, set_var *var, CHARSET_INFO *charset)

=== modified file 'storage/xtradb/os/os0file.c'
--- a/storage/xtradb/os/os0file.c	2013-07-17 19:24:29 +0000
+++ b/storage/xtradb/os/os0file.c	2013-07-29 14:03:41 +0000
@@ -3773,6 +3773,10 @@ os_aio_free(void)
 	ut_free(os_aio_segment_wait_events);
 	os_aio_segment_wait_events = 0;
 	os_aio_n_segments = 0;
+#ifdef _WIN32
+	completion_port = 0;
+	read_completion_port = 0;
+#endif
 }
 
 #ifdef WIN_ASYNC_IO



More information about the commits mailing list