Debian Codegraph @

mysql-test/suite/ndb/t/ndb_startup.test

raw
1 --source include/have_ndb.inc
2 --source include/have_debug.inc
3
4
5 let MYSQLD_DATADIR= `select @@datadir`;
6 # Setup path to server output log file
7 let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err;
8
9 # Setup MYSQLD_CMD_11 with correct group suffix to first
10 # mysqld in the cluster
11 let $MYSQLD_CMD_11 = `select REPLACE("$MYSQLD_CMD",
12 "defaults-group-suffix=.1",
13 "defaults-group-suffix=.1.1")`;
14 let $args= --loose-console > $error_log 2>&1;
15
16 # Use innodb-read-only to avoid that innodb starts recovery
17 # threads etc. since that will only cause mystery crashes
18 # when the mysqld startup is aborted due to the invalid
19 # option tests performed below. Would have been nice to
20 # skip innodb for these test but that is not an option in 5.7
21 let $args = --innodb-read-only $args;
22
23 # Ignore the warning generated by ndbcluster's binlog thread
24 # when mysqld is restarted
25 --disable_query_log ONCE
26 call mtr.add_suppression("mysqld startup An incident event has been written");
27
28 --echo # Stop the running server
29 let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.1.expect;
30 --exec echo "wait" > $restart_file
31 --shutdown_server
32 --source include/wait_until_disconnected.inc
33
34 --echo # Start server with provoked error in ndbcluster_init()
35 --echo # - the mysqld should write an error to the log and shutdown
36 --exec $MYSQLD_CMD_11 --debug="+d,ndbcluster_init_fail1" $args
37
38 --echo # Check the log file for expected error
39 let SEARCH_PATTERN= ndbcluster_init_abort1;
40 let SEARCH_FILE= $error_log;
41 --source include/search_pattern.inc
42 --remove_file $SEARCH_FILE
43
44 --echo # Start server with another provoked error in ndbcluster_init()
45 --echo # - the mysqld should write an error to the log and shutdown
46 --exec $MYSQLD_CMD_11 --debug="+d,ndbcluster_init_fail2" $args
47
48 --echo # Check the log file for expected error
49 let SEARCH_PATTERN= ndbcluster_init_abort2;
50 let SEARCH_FILE= $error_log;
51 --source include/search_pattern.inc
52 --remove_file $SEARCH_FILE
53
54 --echo # Cleanup
55 --enable_reconnect
56 --exec echo "restart" > $restart_file
57 --source include/wait_until_connected_again.inc