MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
restart_random_node.inc
1 ##
2 ## Restarts a single random NDB data node
3 ##
4 ## Parameters:
5 ## $waiter_timeout_start - How long wo tait for a single node to start, default from restart_node.inc
6 ## $waiter_timeout_stop - How long to wait for a single node to stop, default from restart_node.inc
7 ## $MTR_NDB_FIRST_NDBD_NODEID - The first node id of the NDBD data nodes
8 ## $MTR_NDB_NO_OF_NODES - The number of NDBD data nodes
9 ##
10 ## This include file has as a prerequisite that the NDBD node ids is in a numbered range without
11 ## holes which starts with MTR_NDB_FIRST_NDBD_NODEID and has no more than MTR_NDB_NO_OF_NODES nodes.
12 ##
13 ## The last two parameters are normally provided by
14 ## --source suite/ndb/include/ndb_info.inc
15 ##
16 ## In addition, $NDB_CONNECTSTRING, $NDB_MGM, $NDB_TOOLS_DIR and $NDB_TOOLS_OUTPUT
17 ## must be set (they are normally proivided by MTR).
18 ##
19 
20 --let $ndb_node_id = `SELECT FLOOR($MTR_NDB_FIRST_NDBD_NODEID + (RAND() * $MTR_NDB_NO_OF_NODES))`
21 --echo # Restarting random node $ndb_node_id
22 --source suite/ndb/include/restart_node.inc
23 --let $ndb_node_id=