summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-03-21 17:33:29 +0100
committerunknown <knielsen@knielsen-hq.org>2013-03-21 17:33:29 +0100
commitb6b84d68250ea13a1a90079120e303658465bfb7 (patch)
tree279e9d97c7df805c92ad319a826d08ae7b61387a /sql/rpl_rli.cc
parente590f89114bd205e30488cb8b1433f645babc170 (diff)
downloadmariadb-git-b6b84d68250ea13a1a90079120e303658465bfb7.tar.gz
MDEV-26: Global transaction ID.
Fix error handling when record_gtid() fails to update the mysql.rpl_slave_state table.
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r--sql/rpl_rli.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index 11249854c15..41bff96b5e5 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -1232,7 +1232,20 @@ void Relay_log_info::stmt_done(my_off_t event_master_log_pos,
else
{
inc_group_relay_log_pos(event_master_log_pos);
- rpl_global_gtid_slave_state.record_and_update_gtid(thd, this);
+ if (rpl_global_gtid_slave_state.record_and_update_gtid(thd, this))
+ {
+ report(WARNING_LEVEL, ER_CANNOT_UPDATE_GTID_STATE,
+ "Failed to update GTID state in %s.%s, slave state may become "
+ "inconsistent: %d: %s",
+ "mysql", rpl_gtid_slave_state_table_name.str,
+ thd->stmt_da->sql_errno(), thd->stmt_da->message());
+ /*
+ At this point we are not in a transaction (for example after DDL),
+ so we can not roll back. Anyway, normally updates to the slave
+ state table should not fail, and if they do, at least we made the
+ DBA aware of the problem in the error log.
+ */
+ }
flush_relay_log_info(this);
/*
Note that Rotate_log_event::do_apply_event() does not call this