diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-01-09 00:32:28 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-01-09 00:32:28 -0500 |
commit | dd80c22c2d97d81abbf08c05576ce420708eccce (patch) | |
tree | 5f3a69bfa2461bcdc69cd791393e2f471102c3fc /sql/rpl_mi.cc | |
parent | 54b26b494b76804dbaf9f016ccae9c505d0ed4b3 (diff) | |
download | mariadb-git-dd80c22c2d97d81abbf08c05576ce420708eccce.tar.gz |
MDEV-7123 : MariaDB 10.0.14 Galera node shutdown with signal 11
wsrep-patch uses same connection name for constructing Master_info
objects. As a result all existing wsrep Master_info objects refer
to same rpl_filter object. This could lead to race when multiple
threads try to delete/destruct Master_info object, as they would
all try to delete the same relay_log object.
Fixed by adding a check in Master_info's destructor to not free
the "wsrep" rpl_filter, so that its reused by current & subsequent
wsrep threads and later reclaimed by free_all_rpl_filters() during
server shutdown.
Diffstat (limited to 'sql/rpl_mi.cc')
-rw-r--r-- | sql/rpl_mi.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc index 78218e0418e..e513297e99f 100644 --- a/sql/rpl_mi.cc +++ b/sql/rpl_mi.cc @@ -89,6 +89,13 @@ Master_info::Master_info(LEX_STRING *connection_name_arg, Master_info::~Master_info() { +#ifdef WITH_WSREP + /* + Do not free "wsrep" rpl_filter. It will eventually be freed by + free_all_rpl_filters() when server terminates. + */ + if (strncmp(connection_name.str, STRING_WITH_LEN("wsrep"))) +#endif rpl_filters.delete_element(connection_name.str, connection_name.length, (void (*)(const char*, uchar*)) free_rpl_filter); my_free(connection_name.str); |