--source include/have_ndb.inc

--echo #
--echo # BUG#11764570 NDB_ERROR_REPORTER ONLY COLLECTS LOGS MATCHING NAME NDB_$ID*.
--echo #

--echo Make sure that ndb_mgmd creates ndb_<nodeid>_cluster.log file
--file_exists $MYSQLTEST_VARDIR/mysql_cluster.1/ndb_mgmd.1/ndb_3_cluster.log

--echo Make sure that ndb_mgmd does _not_ create logger.log file
--error 1
--file_exists $MYSQLTEST_VARDIR/mysql_cluster.1/ndb_mgmd.1/logger.log

# To validate Mgmd when its started on port that is already in use, Mgmd node is
# started on the Port which is used by ndb_mgmd started by MTR. The validation of
# the ports is done before creating Daemon.
--echo Bug32045786
--replace_regex /MySQL Cluster Management Server.*/MySQL Cluster Management Server/ /.*\[MgmtSrvr\]// /'Only one usage of each socket address.*'/ERROR_MESSAGE/ /'Address already in use'/ERROR_MESSAGE/
--replace_result $NDB_MGMD_PORT NDB_MGMD_PORT 98 ERROR_CODE 10048 ERROR_CODE 48 ERROR_CODE
--error 1
--exec $NDB_MGMD_EXE --defaults-group-suffix=.1.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --configdir=$MYSQLTEST_VARDIR/mysql_cluster.1/ndb_mgmd.1 --mycnf --ndb-nodeid=3 2>&1
