summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/ha_ndbcluster_binlog.cc17
-rw-r--r--storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp7
2 files changed, 15 insertions, 9 deletions
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index 6139234a50e..922380f47f9 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -2467,7 +2467,14 @@ ndbcluster_create_event_ops(NDB_SHARE *share, const NDBTAB *ndbtab,
DBUG_RETURN(0);
}
- if (!binlog_filter->db_ok(share->db))
+ int do_schema_share= 0, do_apply_status_share= 0;
+ if (!schema_share && strcmp(share->db, NDB_REP_DB) == 0 &&
+ strcmp(share->table_name, NDB_SCHEMA_TABLE) == 0)
+ do_schema_share= 1;
+ else if (!apply_status_share && strcmp(share->db, NDB_REP_DB) == 0 &&
+ strcmp(share->table_name, NDB_APPLY_TABLE) == 0)
+ do_apply_status_share= 1;
+ else if (!binlog_filter->db_ok(share->db))
{
share->flags|= NSF_NO_BINLOG;
DBUG_RETURN(0);
@@ -2485,15 +2492,7 @@ ndbcluster_create_event_ops(NDB_SHARE *share, const NDBTAB *ndbtab,
TABLE *table= share->table;
- int do_schema_share= 0, do_apply_status_share= 0;
int retries= 100;
- if (!schema_share && strcmp(share->db, NDB_REP_DB) == 0 &&
- strcmp(share->table_name, NDB_SCHEMA_TABLE) == 0)
- do_schema_share= 1;
- else if (!apply_status_share && strcmp(share->db, NDB_REP_DB) == 0 &&
- strcmp(share->table_name, NDB_APPLY_TABLE) == 0)
- do_apply_status_share= 1;
-
while (1)
{
pthread_mutex_lock(&injector_mutex);
diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
index 070a3baa686..98a8899af4a 100644
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
@@ -966,6 +966,13 @@ NdbEventBuffer::NdbEventBuffer(Ndb *ndb) :
NdbEventBuffer::~NdbEventBuffer()
{
// todo lock? what if receive thread writes here?
+ NdbEventOperationImpl* op= m_dropped_ev_op;
+ while ((op = m_dropped_ev_op))
+ {
+ m_dropped_ev_op = m_dropped_ev_op->m_next;
+ delete op->m_facade;
+ }
+
for (unsigned j= 0; j < m_allocated_data.size(); j++)
{
unsigned sz= m_allocated_data[j]->sz;