summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmysql-test/mysql-test-run.pl2
-rw-r--r--sql/ha_ndbcluster_binlog.cc26
2 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index a14272eb164..82b894c28af 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -2316,6 +2316,7 @@ sub mysqld_arguments ($$$$$$) {
mtr_add_arg($args, "%s--ndbcluster", $prefix);
mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
$opt_ndbconnectstring);
+ mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
}
}
@@ -2383,6 +2384,7 @@ sub mysqld_arguments ($$$$$$) {
mtr_add_arg($args, "%s--ndbcluster", $prefix);
mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
$opt_ndbconnectstring_slave);
+ mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
}
} # end slave
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index 9f415e88def..5ce5fa79d89 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -1470,6 +1470,14 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
(void) pthread_mutex_lock(&share->mutex);
bitmap_clear_all(&share->subscriber_bitmap[node_id]);
DBUG_PRINT("info",("NODE_FAILURE UNSUBSCRIBE[%d]", node_id));
+ if (ndb_extra_logging)
+ {
+ sql_print_information("NDB Binlog: Node: %d, down,"
+ " Subscriber bitmask %x%x",
+ pOp->getNdbdNodeId(),
+ share->subscriber_bitmap[node_id].bitmap[1],
+ share->subscriber_bitmap[node_id].bitmap[0]);
+ }
(void) pthread_mutex_unlock(&share->mutex);
(void) pthread_cond_signal(&injector_cond);
break;
@@ -1482,6 +1490,15 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
(void) pthread_mutex_lock(&share->mutex);
bitmap_set_bit(&share->subscriber_bitmap[node_id], req_id);
DBUG_PRINT("info",("SUBSCRIBE[%d] %d", node_id, req_id));
+ if (ndb_extra_logging)
+ {
+ sql_print_information("NDB Binlog: Node: %d, subscribe from node %d,"
+ " Subscriber bitmask %x%x",
+ pOp->getNdbdNodeId(),
+ req_id,
+ share->subscriber_bitmap[node_id].bitmap[1],
+ share->subscriber_bitmap[node_id].bitmap[0]);
+ }
(void) pthread_mutex_unlock(&share->mutex);
(void) pthread_cond_signal(&injector_cond);
break;
@@ -1494,6 +1511,15 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
(void) pthread_mutex_lock(&share->mutex);
bitmap_clear_bit(&share->subscriber_bitmap[node_id], req_id);
DBUG_PRINT("info",("UNSUBSCRIBE[%d] %d", node_id, req_id));
+ if (ndb_extra_logging)
+ {
+ sql_print_information("NDB Binlog: Node: %d, unsubscribe from node %d,"
+ " Subscriber bitmask %x%x",
+ pOp->getNdbdNodeId(),
+ req_id,
+ share->subscriber_bitmap[node_id].bitmap[1],
+ share->subscriber_bitmap[node_id].bitmap[0]);
+ }
(void) pthread_mutex_unlock(&share->mutex);
(void) pthread_cond_signal(&injector_cond);
break;