| 1 |
--source include/have_debug.inc |
| 2 |
# This test crashes MySQL Server on purpose. |
| 3 |
--source include/not_valgrind.inc |
| 4 |
--source include/not_crashrep.inc |
| 5 |
|
| 6 |
# Connect to all |
| 7 |
--source connect.inc |
| 8 |
|
| 9 |
--echo # |
| 10 |
--echo # Test participant crash during schema operation |
| 11 |
--echo # |
| 12 |
|
| 13 |
CREATE TABLE t1( |
| 14 |
a int primary key |
| 15 |
) engine = NDB; |
| 16 |
|
| 17 |
--echo # Setup participant to crash when schema operation starts |
| 18 |
connection mysqld6; |
| 19 |
set GLOBAL debug="+d,ndb_schema_op_start_crash"; |
| 20 |
--echo # Write file to make mtr.pl restart the server |
| 21 |
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.6.1.expect |
| 22 |
|
| 23 |
--echo # Run schema operation to trigger participant failure |
| 24 |
connection mysqld1; |
| 25 |
--replace_regex /Node [0-9]+:/Node <nodeid>/ |
| 26 |
ALTER TABLE t1 ALGORITHM=copy, ADD COLUMN b int; |
| 27 |
|
| 28 |
--echo # Check that schema operation suceeded on another MySQL Server |
| 29 |
connection mysqld2; |
| 30 |
SELECT * FROM t1; |
| 31 |
|
| 32 |
DROP TABLE t1; |
| 33 |
|
| 34 |
--echo # Wait for failed participant to finish restarting |
| 35 |
connection mysqld6; |
| 36 |
--enable_reconnect |
| 37 |
--source include/wait_until_connected_again.inc |
| 38 |
--disable_reconnect |