diff options
author | Venkatesh Duggirala <venkatesh.duggirala@oracle.com> | 2013-03-29 09:28:31 +0530 |
---|---|---|
committer | Venkatesh Duggirala <venkatesh.duggirala@oracle.com> | 2013-03-29 09:28:31 +0530 |
commit | 00b840b48afac3aabaf8e5b1522dc3d289ba2190 (patch) | |
tree | 01db12c06bd2e55f4613349e2a10813754d13278 /sql/sql_class.cc | |
parent | 00ee67dece60e5a14b5907383aa63b49f6c48b33 (diff) | |
download | mariadb-git-00b840b48afac3aabaf8e5b1522dc3d289ba2190.tar.gz |
Bug#15948818-SEMI-SYNC ENABLED MASTER CRASHES WHEN EVENT
SCHEDULER DROPS EVENTS
Problem: On a semi sync enabled server (Master/Slave),
if event scheduler drops an event after completion,
server crashes.
Analaysis: If an event is created with "ON COMPLETION
NOT PRESERVE" clause, event scheduler deletes the event
upon event completion(expiration) and the thread object
will be destroyed. In the destructor of the thread object,
mysys_var member is set to zero explicitly. Later from
the same destructor call(same execution path),
incase of semi sync enabled server, while cleanup is called,
THD::mysys_var member is accessed by THD::enter_cond()
function which causes server to crash.
Fix: mysys_var should not be explicitly set to zero and
also it is not required.
sql/sql_class.cc:
mysys_var should not be explicitly set to zero.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index effdfc4d6d6..639127125ca 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1362,7 +1362,6 @@ THD::~THD() DBUG_ENTER("~THD()"); /* Ensure that no one is using THD */ mysql_mutex_lock(&LOCK_thd_data); - mysys_var=0; // Safety (shouldn't be needed) mysql_mutex_unlock(&LOCK_thd_data); add_to_status(&global_status_var, &status_var); |