@@ -480,7 +480,9 @@ static void ndbcluster_binlog_wait(THD *thd)
480
480
{
481
481
DBUG_ENTER (" ndbcluster_binlog_wait" );
482
482
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);
484
486
/*
485
487
Binlog Injector should not wait for itself
486
488
*/
@@ -539,6 +541,9 @@ static void ndbcluster_binlog_wait(THD *thd)
539
541
Uint32 (start_handled_epoch & 0xffffffff ),
540
542
Uint32 ((ndb_latest_handled_binlog_epoch >> 32 ) & 0xffffffff ),
541
543
Uint32 (ndb_latest_handled_binlog_epoch & 0xffffffff ));
544
+
545
+ // Fail on wait/deadlock timeout in debug compile
546
+ DBUG_ASSERT (false );
542
547
}
543
548
544
549
thd->proc_info = save_info;
@@ -874,19 +879,6 @@ static void ndbcluster_reset_slave(THD *thd)
874
879
Initialize the binlog part of the ndb handlerton
875
880
*/
876
881
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
-
890
882
static int ndbcluster_binlog_func (handlerton *hton, THD *thd,
891
883
enum_binlog_func fn,
892
884
void *arg)
@@ -916,7 +908,6 @@ static int ndbcluster_binlog_func(handlerton *hton, THD *thd,
916
908
917
909
void ndbcluster_binlog_init (handlerton* h)
918
910
{
919
- h->flush_logs = ndbcluster_flush_logs;
920
911
h->binlog_func = ndbcluster_binlog_func;
921
912
h->binlog_log_query = ndbcluster_binlog_log_query;
922
913
}
0 commit comments