summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-11-10 10:31:33 +0300
committerAlexander Nozdrin <alik@sun.com>2009-11-10 10:31:33 +0300
commitdadf8207438b91fb93f2d16d09d55f9d69cce3c9 (patch)
treeb118b585c21710f0fef58c3d009fdd39a4578791 /sql/sql_class.cc
parent516b39c68305afc720d26ab5011ec5c30f9dcbe8 (diff)
parent411a6bfeb94e89f4cd4b8daaee96fe1913218a85 (diff)
downloadmariadb-git-dadf8207438b91fb93f2d16d09d55f9d69cce3c9.tar.gz
Auto-merge from mysql-next-mr.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc20
1 files changed, 2 insertions, 18 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index fb7c27f6267..60aed4ce53b 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -274,12 +274,7 @@ const char* thd_enter_cond(MYSQL_THD thd, pthread_cond_t *cond,
if (!thd)
thd= current_thd;
- const char* old_msg = thd->proc_info;
- safe_mutex_assert_owner(mutex);
- thd->mysys_var->current_mutex = mutex;
- thd->mysys_var->current_cond = cond;
- thd->proc_info = msg;
- return old_msg;
+ return thd->enter_cond(cond, mutex, msg);
}
extern "C"
@@ -288,18 +283,7 @@ void thd_exit_cond(MYSQL_THD thd, const char *old_msg)
if (!thd)
thd= current_thd;
- /*
- Putting the mutex unlock in thd_exit_cond() ensures that
- mysys_var->current_mutex is always unlocked _before_ mysys_var->mutex is
- locked (if that would not be the case, you'll get a deadlock if someone
- does a THD::awake() on you).
- */
- pthread_mutex_unlock(thd->mysys_var->current_mutex);
- pthread_mutex_lock(&thd->mysys_var->mutex);
- thd->mysys_var->current_mutex = 0;
- thd->mysys_var->current_cond = 0;
- thd->proc_info = old_msg;
- pthread_mutex_unlock(&thd->mysys_var->mutex);
+ thd->exit_cond(old_msg);
return;
}