diff options
author | Sachin Setiya <sachin.setiya@mariadb.com> | 2017-05-30 15:28:52 +0530 |
---|---|---|
committer | Sachin Setiya <sachin.setiya@mariadb.com> | 2017-05-30 15:28:52 +0530 |
commit | 92209ac6f69974169c543ae82da077f06f2b7c71 (patch) | |
tree | 1713781010a286fa9a493781a3eb001af062fd62 /sql/slave.cc | |
parent | 0e3170e30d2a4e8f1ed6fd4bbe935355f7370a34 (diff) | |
parent | 725e47bfb524f4b1d29076c8777056bedd5f00ea (diff) | |
download | mariadb-git-92209ac6f69974169c543ae82da077f06f2b7c71.tar.gz |
Merge tag 'mariadb-10.0.31' into 10.0-galera
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 8acf687a732..b1cda1129bd 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB + Copyright (c) 2009, 2017, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3629,7 +3629,8 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, DBUG_RETURN(1); } - if (opt_gtid_ignore_duplicates) + if (opt_gtid_ignore_duplicates && + rli->mi->using_gtid != Master_info::USE_GTID_NO) { int res= rpl_global_gtid_slave_state->check_duplicate_gtid (&serial_rgi->current_gtid, serial_rgi); @@ -5734,8 +5735,7 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) TODO: handling `when' for SHOW SLAVE STATUS' snds behind */ - if ((memcmp(mi->master_log_name, hb.get_log_ident(), hb.get_ident_len()) - && mi->master_log_name != NULL) + if (memcmp(mi->master_log_name, hb.get_log_ident(), hb.get_ident_len()) || mi->master_log_pos > hb.log_pos) { /* missed events of heartbeat from the past */ @@ -5886,9 +5886,8 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) mi->last_queued_gtid.seq_no == 1000) goto skip_relay_logging; }); - /* Fall through to default case ... */ #endif - + /* fall through */ default: default_action: if (mi->using_gtid != Master_info::USE_GTID_NO && mi->gtid_event_seen) @@ -6240,7 +6239,7 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi, mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir_ptr); /* we disallow empty users */ - if (mi->user == NULL || mi->user[0] == 0) + if (mi->user[0] == 0) { mi->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR, NULL, ER(ER_SLAVE_FATAL_ERROR), |