diff options
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 45b9b473934..6cc50d57cf2 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1437,20 +1437,15 @@ void item_user_lock_release(ULL *ull) ull->locked=0; if (mysql_bin_log.is_open()) { - THD *thd = current_thd; - uint save_query_length; char buf[256]; String tmp(buf,sizeof(buf)); tmp.length(0); tmp.append("DO RELEASE_LOCK(\""); tmp.append(ull->key,ull->key_length); tmp.append("\")"); - save_query_length=thd->query_length; - thd->query_length=tmp.length(); - Query_log_event qev(thd,tmp.ptr()); + Query_log_event qev(current_thd,tmp.ptr(), tmp.length()); qev.error_code=0; // this query is always safe to run on slave mysql_bin_log.write(&qev); - thd->query_length=save_query_length; } if (--ull->count) pthread_cond_signal(&ull->cond); |