1# Include this script only after using shutdown_mysqld.inc 2# where $_expect_file_name was initialized. 3# Write file to make mysql-test-run.pl start up the server again 4 5# restart_noprint defines how much is printed to the .result file 6# if 0 (default) then '# result' and restart_parameters are printed 7# if 1 then print #result but not the content of restart_parameters 8# if 2 then nothing is printed 9 10if (!$restart_noprint) 11{ 12 --let $restart_noprint=0 13} 14 15if ($restart_parameters) 16{ 17 --exec echo "restart: $restart_parameters" > $_expect_file_name 18 if (!$restart_noprint) 19 { 20 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR 21 --exec echo "# restart: $restart_parameters" 22 } 23 if ($restart_noprint == 1) 24 { 25 --exec echo "# restart: with restart_parameters" 26 } 27} 28if (!$restart_parameters) 29{ 30 --exec echo "restart" > $_expect_file_name 31 if ($restart_noprint < 2) 32 { 33 --exec echo "# restart" 34 } 35} 36 37# Turn on reconnect 38--enable_reconnect 39 40# Call script that will poll the server waiting for it to be back online again 41--source include/wait_until_connected_again.inc 42 43# Turn off reconnect again 44--disable_reconnect 45