summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-09-23 17:10:23 +0400
committerAlexander Nozdrin <alik@sun.com>2009-09-23 17:10:23 +0400
commitd49913877064778d8301c7bbd610238b3f5422cd (patch)
tree1a46d6c8be6bd25f4e81fbe52c4b9e5063b86798 /sql/slave.cc
parente6afad8858039c566870bac9c45910a963975c2e (diff)
downloadmariadb-git-d49913877064778d8301c7bbd610238b3f5422cd.tar.gz
A patch for Bug#47474 (mysqld hits Dbug_violation_helper assert
when compiled with Sun Studio compiler). The thing is that Sun Studio compiler calls destructor of stack objects when pthread_exit() is called. That triggered an assertion in DBUG_ENTER()/DBUG_RETURN() validation logic (if DBUG_ENTER() is used in the beginning of function, all returns should be replaced by DBUG_RETURN/DBUG_VOID_RETURN macros). A fix is to explicitly use DBUG_LEAVE macro.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index b489eb3b45f..8bf126ce2c2 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -2799,9 +2799,11 @@ err:
pthread_cond_broadcast(&mi->stop_cond); // tell the world we are done
DBUG_EXECUTE_IF("simulate_slave_delay_at_terminate_bug38694", sleep(5););
pthread_mutex_unlock(&mi->run_lock);
+
+ DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
- DBUG_RETURN(0); // Can't return anything here
+ return 0; // Avoid compiler warnings
}
/*
@@ -3157,10 +3159,11 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
pthread_cond_broadcast(&rli->stop_cond);
DBUG_EXECUTE_IF("simulate_slave_delay_at_terminate_bug38694", sleep(5););
pthread_mutex_unlock(&rli->run_lock); // tell the world we are done
-
+
+ DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
- DBUG_RETURN(0); // Can't return anything here
+ return 0; // Avoid compiler warnings
}