summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2005-05-02 13:18:26 +0200
committerunknown <tomas@poseidon.ndb.mysql.com>2005-05-02 13:18:26 +0200
commit00ad6116bc4f01ea0d267b279ecba209fe015282 (patch)
tree3e17ad766a1ecabf2eda4cd41b97efb6367c627e /sql/sql_repl.cc
parent32f76aea5cc59ba3aab9cf0cafe6c3165bd882c4 (diff)
parent186e5cd2298cc51c13f80967480b12a3f13b5dfa (diff)
downloadmariadb-git-00ad6116bc4f01ea0d267b279ecba209fe015282.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-clean BitKeeper/etc/logging_ok: auto-union configure.in: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_myisam.cc: Auto merged sql/ha_myisammrg.cc: Auto merged sql/lock.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_repl.cc: Auto merged storage/heap/hp_hash.c: Auto merged storage/innobase/dict/dict0dict.c: Auto merged storage/innobase/fil/fil0fil.c: Auto merged storage/innobase/include/dict0dict.h: Auto merged storage/myisam/Makefile.am: Auto merged storage/myisam/mi_key.c: Auto merged storage/myisam/myisampack.c: Auto merged storage/myisammrg/myrg_open.c: Auto merged storage/ndb/include/ndbapi/NdbDictionary.hpp: Auto merged storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged storage/ndb/src/ndbapi/ndberror.c: Auto merged
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index b1e169b9427..cb8bac4d797 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -386,6 +386,9 @@ impossible position";
goto err;
}
+ if (thd->variables.sync_replication)
+ ha_repl_report_sent_binlog(thd, log_file_name, pos);
+
/*
We need to start a packet with something other than 255
to distinguish it from error
@@ -471,6 +474,10 @@ impossible position";
my_errno= ER_UNKNOWN_ERROR;
goto err;
}
+
+ if (thd->variables.sync_replication)
+ ha_repl_report_sent_binlog(thd, log_file_name, my_b_tell(&log));
+
/*
No need to save this event. We are only doing simple reads
(no real parsing of the events) so we don't need it. And so
@@ -528,6 +535,10 @@ impossible position";
my_errno= ER_UNKNOWN_ERROR;
goto err;
}
+
+ if (thd->variables.sync_replication)
+ ha_repl_report_sent_binlog(thd, log_file_name, my_b_tell(&log));
+
DBUG_PRINT("info", ("log event code %d",
(*packet)[LOG_EVENT_OFFSET+1] ));
if ((*packet)[LOG_EVENT_OFFSET+1] == LOAD_EVENT)
@@ -641,6 +652,9 @@ impossible position";
goto err;
}
+ if (thd->variables.sync_replication)
+ ha_repl_report_sent_binlog(thd, log_file_name, my_b_tell(&log));
+
if ((*packet)[LOG_EVENT_OFFSET+1] == LOAD_EVENT)
{
if (send_file(thd))
@@ -705,12 +719,19 @@ impossible position";
my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG;
goto err;
}
+
+ if (thd->variables.sync_replication)
+ ha_repl_report_sent_binlog(thd, log_file_name, 0);
+
packet->length(0);
packet->append('\0');
}
}
end:
+ if (thd->variables.sync_replication)
+ ha_repl_report_replication_stop(thd);
+
end_io_cache(&log);
(void)my_close(file, MYF(MY_WME));
@@ -722,6 +743,9 @@ end:
DBUG_VOID_RETURN;
err:
+ if (thd->variables.sync_replication)
+ ha_repl_report_replication_stop(thd);
+
thd->proc_info = "Waiting to finalize termination";
end_io_cache(&log);
/*