Debian Codegraph @

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

raw
1 -- source include/have_multi_ndb.inc
2 -- source ndb_mgm.inc
3 -- source ndb_waiter.inc
4 -- source have_ndb_error_insert.inc
5
6
7 CREATE TABLE test.t1 (
8 pk1 INT NOT NULL PRIMARY KEY,
9 attr1 INT NOT NULL,
10 attr2 INT,
11 attr3 VARCHAR(10)
12 ) ENGINE=ndb;
13
14 INSERT INTO t1 VALUES (9410, 9412, NULL, '9412'), (9411, 9413, 17, '9413');
15
16 # Check whether the cluster is able to recover
17 # when a node fails during the SYSFILE write.
18
19 --echo -- Restart all data nodes to not-started state
20 --exec $_mgm_cmd -e "ALL RESTART -n" >> $NDB_TOOLS_OUTPUT
21 --exec $NDB_WAITER --not-started > $NDB_TOOLS_OUTPUT
22
23 --echo -- Inject error while system is restarting
24 # and writing sysfile
25 --exec $_mgm_cmd -e "all ERROR 1028"
26
27 --echo Start all data nodes
28 --exec $_mgm_cmd -e "ALL START"
29
30 --echo Wait for nodes to recover
31 --exec $NDB_WAITER >> $NDB_TOOLS_OUTPUT
32 --exec $_mgm_cmd -e "all ERROR 0"
33
34 --echo Wait for mysqld to connect to the cluster
35 --source include/ndb_not_readonly.inc
36
37 --echo Clean up
38 DROP TABLE test.t1;
39 --remove_file $NDB_TOOLS_OUTPUT