summaryrefslogtreecommitdiff
path: root/sql/wsrep_mysqld.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2015-03-27 20:35:37 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2015-03-27 20:35:37 -0400
commitd7445ea6dfbd3be390792c636f755d3bb40d5fbf (patch)
tree7ed61ce2f39cac0f4de0fa63925c1e44d9073104 /sql/wsrep_mysqld.cc
parent6a204546ef91aa90dedb6b47353bbb568f0531b0 (diff)
downloadmariadb-git-d7445ea6dfbd3be390792c636f755d3bb40d5fbf.tar.gz
MDEV-7194: galera fails to replicate DDL queries when using binlog_checksum
Restore fix for MDEV-4328 (revno: 3391) that got accidentally overwritten while merging : http://bazaar.launchpad.net/~codership/codership-mysql/5.5-23/revision/3900 Added a test case.
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r--sql/wsrep_mysqld.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index d93c5a3a02d..a48e28b73f6 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -28,7 +28,6 @@
#include "log_event.h"
#include <slave.h>
-Format_description_log_event *wsrep_format_desc = NULL;
wsrep_t *wsrep = NULL;
my_bool wsrep_emulate_bin_log = FALSE; // activating parts of binlog interface
@@ -498,7 +497,6 @@ int wsrep_init()
wsrep_ready_set(FALSE);
assert(wsrep_provider);
- wsrep_format_desc= new Format_description_log_event(4);
wsrep_init_position();
if ((rcode= wsrep_load(wsrep_provider, &wsrep, wsrep_log_cb)) != WSREP_OK)
@@ -718,8 +716,6 @@ void wsrep_deinit(bool free_options)
provider_version[0]= '\0';
provider_vendor[0]= '\0';
- delete wsrep_format_desc;
- wsrep_format_desc= NULL;
wsrep_inited= 0;
if (free_options)
@@ -1133,6 +1129,12 @@ int wsrep_to_buf_helper(
return 1;
int ret(0);
+
+ Format_description_log_event *tmp_fd= new Format_description_log_event(4);
+ tmp_fd->checksum_alg= binlog_checksum_options;
+ tmp_fd->write(&tmp_io_cache);
+ delete tmp_fd;
+
/* if there is prepare query, add event for it */
if (thd->wsrep_TOI_pre_query)
{