MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
restart_mysqld.inc
1 
2 if ($rpl_inited)
3 {
4  if (!$allow_rpl_inited)
5  {
6  --die ERROR IN TEST: When using the replication test framework (master-slave.inc, rpl_init.inc etc), use rpl_restart_server.inc instead of restart_mysqld.inc. If you know what you are doing and you really have to use restart_mysqld.inc, set allow_rpl_inited=1 before you source restart_mysqld.inc
7  }
8 }
9 
10 # Write file to make mysql-test-run.pl expect the "crash", but don't start
11 # it until it's told to
12 --let $_server_id= `SELECT @@server_id`
13 --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
14 --exec echo "wait" > $_expect_file_name
15 
16 # Send shutdown to the connected server and give
17 # it 10 seconds to die before zapping it
18 shutdown_server 10;
19 
20 # Write file to make mysql-test-run.pl start up the server again
21 --exec echo "restart" > $_expect_file_name
22 
23 # Turn on reconnect
24 --enable_reconnect
25 
26 # Call script that will poll the server waiting for it to be back online again
27 --source include/wait_until_connected_again.inc
28 
29 # Turn off reconnect again
30 --disable_reconnect
31