diff options
author | unknown <guilhem@gbichot2> | 2003-11-23 17:02:59 +0100 |
---|---|---|
committer | unknown <guilhem@gbichot2> | 2003-11-23 17:02:59 +0100 |
commit | bd6a70019e906cd49b7f81e6ce7242a0a43b8a37 (patch) | |
tree | 83cd5e156dfb886c15c3d3d13b272fe43f7e430b /sql/repl_failsafe.cc | |
parent | d0d8ba7815fc75164d79a9758a01e7efbe1b8022 (diff) | |
download | mariadb-git-bd6a70019e906cd49b7f81e6ce7242a0a43b8a37.tar.gz |
Replication:
Now the I/O thread (in flush_master_info()) flushes the relay log to disk
after reading every event. Slower but provides additionnal safety in case
of brutal crash.
I had to make the flush optional (i.e. add a if(some_bool_argument) in the function)
because sometimes flush_master_info() is called when there is no usable
relay log (the relay log's IO_CACHE is not initialized so can't be flushed).
mysql-test/r/rpl_loaddata_rule_m.result:
avoid a harmless error in the .err file; we don't need a slave in this test
(even though it's called 'rpl' because it's testing binlog-ignore-db).
mysql-test/t/rpl_loaddata_rule_m.test:
result update
sql/repl_failsafe.cc:
update call to flush_master_info() according to new prototype.
sql/slave.cc:
- Now the I/O thread (in flush_master_info()) flushes the relay log to disk
after reading every event. Slower but provides additionnal safety in case
of brutal crash.
I had to make the flush optional (i.e. add a if(some_bool_argument) in the function)
because sometimes flush_master_info() is called when there is no usable
relay log (the relay log's IO_CACHE is not initialized so can't be flushed).
- Update version in message.
- Remove warning about bug as it's not true anymore (since this changeset).
sql/slave.h:
new prototype
sql/sql_repl.cc:
update call to flush_master_info() according to new prototype.
Diffstat (limited to 'sql/repl_failsafe.cc')
-rw-r--r-- | sql/repl_failsafe.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 0d2da91e015..084f7386b7b 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -908,7 +908,12 @@ int load_master_data(THD* thd) // don't hit the magic number if (active_mi->master_log_pos < BIN_LOG_HEADER_SIZE) active_mi->master_log_pos = BIN_LOG_HEADER_SIZE; - flush_master_info(active_mi); + /* + Relay log's IO_CACHE may not be inited (even if we are sure that some + host was specified; there could have been a problem when replication + started, which led to relay log's IO_CACHE to not be inited. + */ + flush_master_info(active_mi, 0); } mysql_free_result(master_status_res); } |