diff options
author | Konstantin Osipov <kostja@sun.com> | 2010-02-02 12:22:17 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2010-02-02 12:22:17 +0300 |
commit | 3147bdd0ac34a5c62158b8c28da6ca77e0901f08 (patch) | |
tree | 919a1043e20b3f1f6a58331ae90a4a9529b0ab5e /sql/rpl_rli.cc | |
parent | 2c6015e8dc962bef8f353af920581d9b6bd7fd82 (diff) | |
parent | 5bce1e06429c3d58457051f0c439f130609df375 (diff) | |
download | mariadb-git-3147bdd0ac34a5c62158b8c28da6ca77e0901f08.tar.gz |
Merge next-mr -> next-4284.
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r-- | sql/rpl_rli.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index 2d7c6c61cd5..0461b810b29 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -184,10 +184,10 @@ a file name for --relay-log-index option", opt_relaylog_index_name); note, that if open() fails, we'll still have index file open but a destructor will take care of that */ - if (rli->relay_log.open_index_file(opt_relaylog_index_name, ln) || + if (rli->relay_log.open_index_file(opt_relaylog_index_name, ln, TRUE) || rli->relay_log.open(ln, LOG_BIN, 0, SEQ_READ_APPEND, 0, (max_relay_log_size ? max_relay_log_size : - max_binlog_size), 1)) + max_binlog_size), 1, TRUE)) { pthread_mutex_unlock(&rli->data_lock); sql_print_error("Failed in open_log() called from init_relay_log_info()"); @@ -1030,7 +1030,7 @@ err: false - condition not met */ -bool Relay_log_info::is_until_satisfied(my_off_t master_beg_pos) +bool Relay_log_info::is_until_satisfied(THD *thd, Log_event *ev) { const char *log_name; ulonglong log_pos; @@ -1040,8 +1040,12 @@ bool Relay_log_info::is_until_satisfied(my_off_t master_beg_pos) if (until_condition == UNTIL_MASTER_POS) { + if (ev && ev->server_id == (uint32) ::server_id && !replicate_same_server_id) + DBUG_RETURN(FALSE); log_name= group_master_log_name; - log_pos= master_beg_pos; + log_pos= (!ev)? group_master_log_pos : + ((thd->options & OPTION_BEGIN || !ev->log_pos) ? + group_master_log_pos : ev->log_pos - ev->data_written); } else { /* until_condition == UNTIL_RELAY_POS */ |