Skip to content

Commit a7c3b1c

Browse files
author
Maitrayi Sabaratnam
committed
Merge from 7.3
2 parents 11fb98f + f0c0859 commit a7c3b1c

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

mysql-test/suite/ndb_binlog/t/disabled.def

-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99
# Do not use any TAB characters for whitespace.
1010
#
1111
##############################################################################
12-
ndb_binlog_purge : Bug#16884594 30/5/13 FC Timeouts due to ha_flush_logs deadlocks
1312

sql/ha_ndbcluster_binlog.cc

+6-15
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,9 @@ static void ndbcluster_binlog_wait(THD *thd)
480480
{
481481
DBUG_ENTER("ndbcluster_binlog_wait");
482482
DBUG_ASSERT(thd);
483-
483+
DBUG_ASSERT(thd_sql_command(thd) == SQLCOM_SHOW_BINLOG_EVENTS ||
484+
thd_sql_command(thd) == SQLCOM_FLUSH ||
485+
thd_sql_command(thd) == SQLCOM_RESET);
484486
/*
485487
Binlog Injector should not wait for itself
486488
*/
@@ -539,6 +541,9 @@ static void ndbcluster_binlog_wait(THD *thd)
539541
Uint32(start_handled_epoch & 0xffffffff),
540542
Uint32((ndb_latest_handled_binlog_epoch >> 32) & 0xffffffff),
541543
Uint32(ndb_latest_handled_binlog_epoch & 0xffffffff));
544+
545+
// Fail on wait/deadlock timeout in debug compile
546+
DBUG_ASSERT(false);
542547
}
543548

544549
thd->proc_info= save_info;
@@ -874,19 +879,6 @@ static void ndbcluster_reset_slave(THD *thd)
874879
Initialize the binlog part of the ndb handlerton
875880
*/
876881

877-
/**
878-
Upon the sql command flush logs, we need to ensure that all outstanding
879-
changes made to ndb by the current thread have entered the binary log
880-
in order to get a deterministic behavior on the rotation of the log.
881-
'current_thd' should not be NULL.
882-
*/
883-
static bool ndbcluster_flush_logs(handlerton *hton)
884-
{
885-
ndbcluster_binlog_wait(current_thd);
886-
return FALSE;
887-
}
888-
889-
890882
static int ndbcluster_binlog_func(handlerton *hton, THD *thd,
891883
enum_binlog_func fn,
892884
void *arg)
@@ -916,7 +908,6 @@ static int ndbcluster_binlog_func(handlerton *hton, THD *thd,
916908

917909
void ndbcluster_binlog_init(handlerton* h)
918910
{
919-
h->flush_logs= ndbcluster_flush_logs;
920911
h->binlog_func= ndbcluster_binlog_func;
921912
h->binlog_log_query= ndbcluster_binlog_log_query;
922913
}

0 commit comments

Comments
 (0)