Loading storage/ndb/test/src/NDBT_Test.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -1110,6 +1110,7 @@ static int opt_timer; static char * opt_remote_mgm = NULL; static char * opt_testname = NULL; static int opt_verbose; static int opt_seed = 0; static struct my_option my_long_options[] = { Loading @@ -1129,6 +1130,9 @@ static struct my_option my_long_options[] = { "loops", 'l', "Number of loops", (gptr*) &opt_loops, (gptr*) &opt_loops, 0, GET_INT, REQUIRED_ARG, 5, 0, 0, 0, 0, 0 }, { "seed", 1024, "Random seed", (gptr*) &opt_seed, (gptr*) &opt_seed, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, { "testname", 'n', "Name of test to run", (gptr*) &opt_testname, (gptr*) &opt_testname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, Loading Loading @@ -1225,6 +1229,14 @@ int NDBT_TestSuite::execute(int argc, const char** argv){ return NDBT_ProgramExit(NDBT_FAILED); } if (opt_seed == 0) { opt_seed = NdbTick_CurrentMillisecond(); } ndbout_c("random seed: %u", opt_seed); srand(opt_seed); srandom(opt_seed); { Ndb ndb(&con, "TEST_DB"); ndb.init(1024); Loading Loading
storage/ndb/test/src/NDBT_Test.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -1110,6 +1110,7 @@ static int opt_timer; static char * opt_remote_mgm = NULL; static char * opt_testname = NULL; static int opt_verbose; static int opt_seed = 0; static struct my_option my_long_options[] = { Loading @@ -1129,6 +1130,9 @@ static struct my_option my_long_options[] = { "loops", 'l', "Number of loops", (gptr*) &opt_loops, (gptr*) &opt_loops, 0, GET_INT, REQUIRED_ARG, 5, 0, 0, 0, 0, 0 }, { "seed", 1024, "Random seed", (gptr*) &opt_seed, (gptr*) &opt_seed, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, { "testname", 'n', "Name of test to run", (gptr*) &opt_testname, (gptr*) &opt_testname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, Loading Loading @@ -1225,6 +1229,14 @@ int NDBT_TestSuite::execute(int argc, const char** argv){ return NDBT_ProgramExit(NDBT_FAILED); } if (opt_seed == 0) { opt_seed = NdbTick_CurrentMillisecond(); } ndbout_c("random seed: %u", opt_seed); srand(opt_seed); srandom(opt_seed); { Ndb ndb(&con, "TEST_DB"); ndb.init(1024); Loading