summaryrefslogtreecommitdiff
path: root/sql/scheduler.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-07-11 20:33:39 +0200
committerSergei Golubchik <sergii@pisem.net>2011-07-11 20:33:39 +0200
commit20056897002575c3e81b7ce08b171cadc906bebc (patch)
treecb18f8724ef53af207bd0d7d826ea8ed02b8d796 /sql/scheduler.cc
parente44fefc7b395279b9682321f952490ab9d1d01f0 (diff)
downloadmariadb-git-20056897002575c3e81b7ce08b171cadc906bebc.tar.gz
sys_vars changes and cleanups
Diffstat (limited to 'sql/scheduler.cc')
-rw-r--r--sql/scheduler.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/scheduler.cc b/sql/scheduler.cc
index df1fc68dddc..43d80137bac 100644
--- a/sql/scheduler.cc
+++ b/sql/scheduler.cc
@@ -60,13 +60,13 @@ static void scheduler_wait_lock_end(void) {
static void scheduler_wait_sync_begin(void) {
THD *thd=current_thd;
- scheduler_functions *func= thd->scheduler;
+ scheduler_functions *func= thd ? thd->scheduler : thread_scheduler;
MYSQL_CALLBACK(func, thd_wait_begin, (thd, THD_WAIT_TABLE_LOCK));
}
static void scheduler_wait_sync_end(void) {
THD *thd=current_thd;
- scheduler_functions *func= thd->scheduler;
+ scheduler_functions *func= thd ? thd->scheduler : thread_scheduler;
MYSQL_CALLBACK(func, thd_wait_end, (thd));
}
};