diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_func.cc | 3 | ||||
-rw-r--r-- | sql/slave.cc | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 5dcc638235f..1818a755a43 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1433,16 +1433,19 @@ void item_user_lock_release(ULL *ull) 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()); 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); diff --git a/sql/slave.cc b/sql/slave.cc index f9dbf4641e6..8884e5de778 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2010,7 +2010,7 @@ static int queue_old_event(MASTER_INFO *mi, const char *buf, mi->master_log_pos += event_len; if (unlikely(processed_stop_event)) mi->ignore_stop_event=1; - pthread_mutex_lock(&mi->data_lock); + pthread_mutex_unlock(&mi->data_lock); return 0; } |