summaryrefslogtreecommitdiff
path: root/sql/scheduler.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2012-02-16 16:59:04 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2012-02-16 16:59:04 +0100
commitcfa56f900acefcf228c26dfa39c1b9142ef3552b (patch)
tree6fa08e8fa99d31d69e9b7fda91c0e89f4635ee5e /sql/scheduler.cc
parent8877fe7359b1eef81b62c6531674aaa5a5ce6051 (diff)
downloadmariadb-git-cfa56f900acefcf228c26dfa39c1b9142ef3552b.tar.gz
address second round review comments
Diffstat (limited to 'sql/scheduler.cc')
-rw-r--r--sql/scheduler.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/scheduler.cc b/sql/scheduler.cc
index c174d300d2e..3f779337345 100644
--- a/sql/scheduler.cc
+++ b/sql/scheduler.cc
@@ -48,26 +48,26 @@ extern "C"
{
static void scheduler_wait_lock_begin(void) {
THD *thd=current_thd;
- scheduler_functions *func= thd->scheduler;
- MYSQL_CALLBACK(func, thd_wait_begin, (thd, THD_WAIT_TABLE_LOCK));
+ if(thd)
+ MYSQL_CALLBACK(thd->scheduler, thd_wait_begin, (thd, THD_WAIT_TABLE_LOCK));
}
static void scheduler_wait_lock_end(void) {
THD *thd=current_thd;
- scheduler_functions *func= thd->scheduler;
- MYSQL_CALLBACK(func, thd_wait_end, (thd));
+ if(thd)
+ MYSQL_CALLBACK(thd->scheduler, thd_wait_end, (thd));
}
static void scheduler_wait_sync_begin(void) {
THD *thd=current_thd;
- scheduler_functions *func= thd ? thd->scheduler : thread_scheduler;
- MYSQL_CALLBACK(func, thd_wait_begin, (thd, THD_WAIT_TABLE_LOCK));
+ if(thd)
+ MYSQL_CALLBACK(thd->scheduler, thd_wait_begin, (thd, THD_WAIT_TABLE_LOCK));
}
static void scheduler_wait_sync_end(void) {
THD *thd=current_thd;
- scheduler_functions *func= thd ? thd->scheduler : thread_scheduler;
- MYSQL_CALLBACK(func, thd_wait_end, (thd));
+ if(thd)
+ MYSQL_CALLBACK(thd->scheduler, thd_wait_end, (thd));
}
};
/**@}*/