summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2002-02-09 13:58:53 -0700
committerunknown <sasha@mysql.sashanet.com>2002-02-09 13:58:53 -0700
commitff3b98e631559c1f655ee06623220c1d5323b830 (patch)
tree159883a38e8769c7736f92e4bfa2b11967adcabb /sql/slave.cc
parent49266c90a2cf581df6158561f01d64129523d537 (diff)
downloadmariadb-git-ff3b98e631559c1f655ee06623220c1d5323b830.tar.gz
updated test suite to be able to run 3.23 master and 4.0 slave
got LOAD DATA INFILE replication from 3.23 master to 4.0 slave to work for some reason query_cache now fails - will push anyway and document the failure if I can repeat it. client/mysqltest.c: added require_version mysql-test/mysql-test-run.sh: added --master-binary=,--slave-binary=,--old-master options sleep_until_file_exists -> sleep_until_file_created sql/slave.cc: fixed bug in LOAD DATA INFILE replication from 3.23 master
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 86db6efa34d..100e305530f 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1538,10 +1538,6 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
if (ev->server_id == ::server_id ||
(rli->slave_skip_counter && type_code != ROTATE_EVENT))
{
- /*
- TODO: I/O thread must handle skipping file delivery for
- old load data infile events
- */
/* TODO: I/O thread should not even log events with the same server id */
rli->inc_pos(ev->get_event_len(),
type_code != STOP_EVENT ? ev->log_pos : LL(0),
@@ -1953,6 +1949,7 @@ static int process_io_create_file(MASTER_INFO* mi, Create_file_log_event* cev)
DBUG_ASSERT(cev->inited_from_old);
thd = mi->io_thd;
thd->file_id = cev->file_id = mi->file_id++;
+ thd->server_id = cev->server_id;
cev_not_written = 1;
if (unlikely(net_request_file(net,cev->fname)))
@@ -1980,7 +1977,8 @@ static int process_io_create_file(MASTER_INFO* mi, Create_file_log_event* cev)
if (unlikely(!num_bytes)) /* eof */
{
send_ok(net); /* 3.23 master wants it */
- Execute_load_log_event xev(mi->io_thd);
+ Execute_load_log_event xev(thd);
+ xev.log_pos = mi->master_log_pos;
if (unlikely(mi->rli.relay_log.append(&xev)))
{
sql_print_error("Slave I/O: error writing Exec_load event to \
@@ -1993,6 +1991,7 @@ relay log");
{
cev->block = (char*)net->read_pos;
cev->block_len = num_bytes;
+ cev->log_pos = mi->master_log_pos;
if (unlikely(mi->rli.relay_log.append(cev)))
{
sql_print_error("Slave I/O: error writing Create_file event to \
@@ -2005,6 +2004,7 @@ relay log");
{
aev.block = (char*)net->read_pos;
aev.block_len = num_bytes;
+ aev.log_pos = mi->master_log_pos;
if (unlikely(mi->rli.relay_log.append(&aev)))
{
sql_print_error("Slave I/O: error writing Append_block event to \