[Commits] 88b8ef1: Revert "MDEV-8208: Sporadic SEGFAULT on startup"

Nirbhay Choubey nirbhay at mariadb.com
Wed Dec 16 17:32:14 EET 2015


revision-id: 88b8ef1b816e1c00090360910929aa442b739bc5
parent(s): ca07ee85ea28d4b820498535508c6b23f089c22c
committer: Nirbhay Choubey
branch nick: 5.5-galera
timestamp: 2015-12-16 10:32:01 -0500
message:

Revert "MDEV-8208: Sporadic SEGFAULT on startup"

This reverts commit 13615c5e18eed62fa2dee80402dfebe3e74053c4.

---
 mysys/my_alloc.c |  5 +----
 sql/mysqld.cc    | 12 +-----------
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c
index 9e44707..1054db6 100644
--- a/mysys/my_alloc.c
+++ b/mysys/my_alloc.c
@@ -93,7 +93,6 @@ void init_alloc_root(MEM_ROOT *mem_root, size_t block_size,
 void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
                          size_t pre_alloc_size __attribute__((unused)))
 {
-  DBUG_ENTER("reset_root_defaults");
   DBUG_ASSERT(alloc_root_inited(mem_root));
 
   mem_root->block_size= block_size - ALLOC_ROOT_MIN_BLOCK_SIZE;
@@ -115,7 +114,7 @@ void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
         {
           /* We found a suitable block, no need to do anything else */
           mem_root->pre_alloc= mem;
-          DBUG_VOID_RETURN;
+          return;
         }
         if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size)
         {
@@ -143,8 +142,6 @@ void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
   else
 #endif
     mem_root->pre_alloc= 0;
-
-  DBUG_VOID_RETURN;
 }
 
 
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index a5fb510..d50b8f2 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4610,17 +4610,7 @@ static int init_server_components()
     {
       if (tmp->wsrep_applier == true)
       {
-        /*
-          Set THR_THD to temporally point to this THD to register all the
-          variables that allocates memory for this THD.
-        */
-        THD *current_thd_saved= current_thd;
-        my_pthread_setspecific_ptr(THR_THD, tmp);
-
         tmp->init_for_queries();
-
-        /* Restore current_thd. */
-        my_pthread_setspecific_ptr(THR_THD, current_thd_saved);
       }
     }
     mysql_mutex_unlock(&LOCK_thread_count);
@@ -4928,7 +4918,7 @@ pthread_handler_t start_wsrep_THD(void *arg)
   thd->proc_info= 0;
   thd->command= COM_SLEEP;
 
-  if (wsrep_creating_startup_threads == 0)
+  if (plugins_are_initialized)
   {
     thd->init_for_queries();
   }


More information about the commits mailing list