diff options
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 13803cff2d6..2b89aa04295 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2771,12 +2771,13 @@ void Item_func_rand::seed_random(Item *arg) */ uint32 tmp; #ifdef WITH_WSREP - if (WSREP(current_thd)) + THD *thd= current_thd; + if (WSREP(thd)) { - if (current_thd->wsrep_exec_mode==REPL_RECV) - tmp= current_thd->wsrep_rand; + if (thd->wsrep_exec_mode==REPL_RECV) + tmp= thd->wsrep_rand; else - tmp= current_thd->wsrep_rand= (uint32) arg->val_int(); + tmp= thd->wsrep_rand= (uint32) arg->val_int(); } else #endif /* WITH_WSREP */ |