summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorunknown <bar@bar.myoffice.izhnet.ru>2007-10-30 12:03:34 +0400
committerunknown <bar@bar.myoffice.izhnet.ru>2007-10-30 12:03:34 +0400
commita3b60d2d5177f48ca82ef644e81f5b287b52f1ba (patch)
tree055f7dd7e7eb9e1550d06cb68db95e06cebefffd /sql/sql_repl.cc
parent7d9c59b7be412210413fc93602ec4522eb1f368b (diff)
parente70e5326747fc09819c0ba6c82b781248f66495f (diff)
downloadmariadb-git-a3b60d2d5177f48ca82ef644e81f5b287b52f1ba.tar.gz
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/bar/mysql-work/mysql-5.1-new-rpl-merge client/mysql.cc: Auto merged mysql-test/r/ctype_euckr.result: Auto merged mysql-test/r/ctype_uca.result: Auto merged mysql-test/r/ctype_utf8.result: Auto merged mysql-test/r/func_regexp.result: Auto merged mysql-test/suite/rpl/r/rpl_bug31076.result: Auto merged mysql-test/t/ctype_utf8.test: Auto merged mysql-test/t/func_regexp.test: Auto merged mysql-test/t/partition.test: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/handler.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_xmlfunc.cc: Auto merged sql/log.cc: Auto merged sql/log.h: Auto merged sql/log_event.cc: Auto merged sql/mysqld.cc: Auto merged sql/sp_head.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged strings/ctype-euc_kr.c: Auto merged sql/sql_yacc.yy: Reverting Rafal's changes: TRANSACTIONAL_SYM was removed in a mistake. mysql-test/r/ctype_ucs.result: After merge fix mysql-test/suite/rpl/t/rpl_bug31076.test: After merge fix. mysql-test/t/ctype_ucs.test: After megre fix
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 0249af147b0..88040e2933c 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;