summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2002-01-31 11:04:49 -0700
committerunknown <sasha@mysql.sashanet.com>2002-01-31 11:04:49 -0700
commit8612588aeb74cc1a3252206da9c14cd83f392b4e (patch)
treebd625aaa09009624436017b04d9f7584655ced93 /sql
parentf5a75e7965c781389128b3163e1c37c6f5fc71bd (diff)
parent1d76e90c1b61981e284bd583e54345cce9fe3551 (diff)
downloadmariadb-git-8612588aeb74cc1a3252206da9c14cd83f392b4e.tar.gz
Merge work:/home/bk/mysql-4.0
into mysql.sashanet.com:/reiser-data/mysql-4.0 sql/item_func.cc: Auto merged sql/slave.cc: Auto merged
Diffstat (limited to 'sql')
-rw-r--r--sql/item_func.cc3
-rw-r--r--sql/slave.cc2
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;
}