Commit 6ce5da27 authored by unknown's avatar unknown

removing assertion (will be moved to 4.1) for non-debug to compile


sql/sql_class.h:
  removing the assertion as I don't want to include assert.h (inclusion of assert.h has already been
  reworked in 4.1, so I'll move the assertion to 4.1). Assertion makes compilation fail if non-debug.
parent 5dbde191
......@@ -535,11 +535,19 @@ class THD :public ilink
void close_active_vio();
#endif
void awake(bool prepare_to_die);
/*
For enter_cond() / exit_cond() to work the mutex must be got before
enter_cond() but released before exit_cond() (in 4.1, assertions will soon
ensure this). Use must be:
lock mutex; enter_cond(); ...; unlock mutex; exit_cond().
If you don't do it this way, you will get a deadlock if another thread is
doing a THD::awake() on you.
*/
inline const char* enter_cond(pthread_cond_t *cond, pthread_mutex_t* mutex,
const char* msg)
{
const char* old_msg = proc_info;
safe_mutex_assert_owner(mutex);
mysys_var->current_mutex = mutex;
mysys_var->current_cond = cond;
proc_info = msg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment