summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorunknown <aelkin/elkin@koti.dsl.inet.fi>2007-10-04 12:27:14 +0300
committerunknown <aelkin/elkin@koti.dsl.inet.fi>2007-10-04 12:27:14 +0300
commit7258005cd40396a7803612f95eb7092574d99023 (patch)
tree517919629a45bfd069a7f37335db633689e2526b /sql/sql_repl.cc
parent345716937c6b3ba928aed448f66f34cb61bd4f33 (diff)
parentd0b076b66cef0335a884fa96c1c636bbef31a9db (diff)
downloadmariadb-git-7258005cd40396a7803612f95eb7092574d99023.tar.gz
Merge koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/BARE/5.0
into koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/5.1-merge client/mysql.cc: Auto merged mysql-test/r/mysql.result: Auto merged mysql-test/t/mysql.test: Auto merged sql/sql_parse.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_class.h: conflicting hunk is for log.h
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index a6e52c05219..4ba174927a2 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -369,7 +369,6 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
name=0; // Find first log
linfo.index_file_offset = 0;
- thd->current_linfo = &linfo;
if (mysql_bin_log.find_log_pos(&linfo, name, 1))
{
@@ -378,6 +377,10 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
goto err;
}
+ pthread_mutex_lock(&LOCK_thread_count);
+ thd->current_linfo = &linfo;
+ pthread_mutex_unlock(&LOCK_thread_count);
+
if ((file=open_binlog(&log, log_file_name, &errmsg)) < 0)
{
my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG;
@@ -1359,7 +1362,6 @@ bool mysql_show_binlog_events(THD* thd)
name=0; // Find first log
linfo.index_file_offset = 0;
- thd->current_linfo = &linfo;
if (mysql_bin_log.find_log_pos(&linfo, name, 1))
{
@@ -1367,6 +1369,10 @@ bool mysql_show_binlog_events(THD* thd)
goto err;
}
+ pthread_mutex_lock(&LOCK_thread_count);
+ thd->current_linfo = &linfo;
+ pthread_mutex_unlock(&LOCK_thread_count);
+
if ((file=open_binlog(&log, linfo.log_file_name, &errmsg)) < 0)
goto err;