summaryrefslogtreecommitdiff
path: root/sql/repl_failsafe.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
commit613297ff1e66a0fcf517e4e1bcf2a573d2e2c815 (patch)
tree1a46d6c8be6bd25f4e81fbe52c4b9e5063b86798 /sql/repl_failsafe.cc
parent0c9b77803c2e59c2f699ac3516f4b2f2be8f64a5 (diff)
downloadmariadb-git-613297ff1e66a0fcf517e4e1bcf2a573d2e2c815.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/repl_failsafe.cc')
-rw-r--r--sql/repl_failsafe.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index 582348608de..312499bb4ee 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -638,9 +638,11 @@ err:
if (recovery_captain)
mysql_close(recovery_captain);
delete thd;
+
+ DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
- DBUG_RETURN(0);
+ return 0; // Avoid compiler warnings
}
#endif