mariadb/mysql-test/include/wait_for_ndb_to_binlog.inc
Nuno Carvalho 825c74f6aa BUG#12364404 - UNDETERMINISTIC WAIT LOOP IN WAIT_FOR_NDB_TO_BINLOG.INC
The wait_for_ndb_to_binlog.inc include file used by the blow rpl_tests
common for rpl and rpl_ndb suite is simply doing a "sleep 5", this is
not deterministic and wastes lot of test time uneccessarily. The test
should be rewritten to check if the condition it wait for has been
reached or not.

For NDB engine all events will be added by NDB injector so tests only 
can continue after injector is ready, this test waits for proper
injector thread state.
2012-01-23 16:50:54 +00:00

26 lines
761 B
PHP

# ==== Purpose ====
#
# Several test primitives from mysql-test/extra/rpl_tests
# are shared for test cases for MyISAM, InnoDB, NDB and
# other engines.
# For NDB engine all events will be added by NDB injector
# so tests only can continue after injector is ready,
# this test waits for proper injector thread state.
#
# ==== Usage ====
#
# let $engine_type= NDB;
# --source include/wait_for_ndb_to_binlog.inc
#
# ==== Parameters =====
#
# $engine_type
# Type of engine. If type is NDB then it waits for injector
# thread proper state.
if (`SELECT UPPER(LEFT('$engine_type',3)) = 'NDB'`) {
let $show_statement= SHOW PROCESSLIST;
let $field= State;
let $condition= = 'Waiting for event from ndbcluster';
source include/wait_show_condition.inc;
}