diff options
author | unknown <knielsen@knielsen-hq.org> | 2013-03-21 17:33:29 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2013-03-21 17:33:29 +0100 |
commit | b6b84d68250ea13a1a90079120e303658465bfb7 (patch) | |
tree | 279e9d97c7df805c92ad319a826d08ae7b61387a /sql/rpl_gtid.cc | |
parent | e590f89114bd205e30488cb8b1433f645babc170 (diff) | |
download | mariadb-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_gtid.cc')
-rw-r--r-- | sql/rpl_gtid.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc index 6a57f7cdb9c..7f5aa0b780b 100644 --- a/sql/rpl_gtid.cc +++ b/sql/rpl_gtid.cc @@ -29,7 +29,7 @@ const LEX_STRING rpl_gtid_slave_state_table_name= - { STRING_WITH_LEN("rpl_slave_state") }; + { C_STRING_WITH_LEN("rpl_slave_state") }; void @@ -298,6 +298,12 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id, mysql_reset_thd_for_next_command(thd, 0); + DBUG_EXECUTE_IF("gtid_inject_record_gtid", + { + my_error(ER_CANNOT_UPDATE_GTID_STATE, MYF(0)); + return 1; + } ); + tlist.init_one_table(STRING_WITH_LEN("mysql"), rpl_gtid_slave_state_table_name.str, rpl_gtid_slave_state_table_name.length, @@ -328,6 +334,7 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id, if ((elem= get_element(gtid->domain_id)) == NULL) { unlock(); + my_error(ER_OUT_OF_RESOURCES, MYF(0)); err= 1; goto end; } |