summaryrefslogtreecommitdiff
path: root/sql/sql_show.h
diff options
context:
space:
mode:
authorVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2014-05-05 22:22:15 +0530
committerVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2014-05-05 22:22:15 +0530
commit66d624b7d614c4477c4e63e35e39c54d06fb7d37 (patch)
tree3932fe811105a21ee4dadccd6e3b51475b89a789 /sql/sql_show.h
parent16b81798aa1c7d17317e42da816556679628f51e (diff)
downloadmariadb-git-66d624b7d614c4477c4e63e35e39c54d06fb7d37.tar.gz
Bug#17638477 UNINSTALL AND INSTALL SEMI-SYNC PLUGIN CAUSES SLAVES TO BREAK
Problem: Uninstallation of semi sync plugin causes replication to break. Analysis: A semisync enabled replication is mutual agreement between Master and Slave when the connection (I/O thread) is established. Once I/O thread is started and if semisync is enabled on both master and slave, master appends special magic header to events using semisync plugin functions and sends it to slave. And slave expects that each event will have that special magic header format and reads those bytes using semisync plugin functions. When semi sync replication is in use if users execute uninstallation of the plugin on master, slave gets confused while interpreting that event's content because it expects special magic header at the beginning of the event. Slave SQL thread will be stopped with "Missing magic number in the header" error. Similar problem will happen if uninstallation of the plugin happens on slave when semi sync replication is in in use. Master sends the events with magic header and slave does not know about the added magic header and thinks that it received a corrupted event. Hence slave SQL thread stops with "Found corrupted event" error. Fix: Uninstallation of semisync plugin will be blocked when semisync replication is in use and will throw 'ER_UNKNOWN_ERROR' error. To detect that semisync replication is in use, this patch uses semisync status variable values. > On Master, it checks for 'Rpl_semi_sync_master_status' to be OFF before allowing the uninstallation of rpl_semi_sync_master plugin. >> Rpl_semi_sync_master_status is OFF when >>> there is no dump thread running >>> there are no semisync slaves > On Slave, it checks for 'Rpl_semi_sync_slave_status' to be OFF before allowing the uninstallation of rpl_semi_sync_slave plugin. >> Rpl_semi_sync_slave_status is OFF when >>> there is no I/O thread running >>> replication is asynchronous replication.
Diffstat (limited to 'sql/sql_show.h')
-rw-r--r--sql/sql_show.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_show.h b/sql/sql_show.h
index 406c75d8cbe..b6d520441c7 100644
--- a/sql/sql_show.h
+++ b/sql/sql_show.h
@@ -113,6 +113,7 @@ int add_status_vars(SHOW_VAR *list);
void remove_status_vars(SHOW_VAR *list);
void init_status_vars();
void free_status_vars();
+bool get_status_var(THD* thd, SHOW_VAR *list, const char *name, char * const buff);
void reset_status_vars();
bool show_create_trigger(THD *thd, const sp_name *trg_name);
void view_store_options(THD *thd, TABLE_LIST *table, String *buff);