| 1 |
# |
| 2 |
# Test participants' restart during a schema distribution |
| 3 |
# |
| 4 |
# Case 1 : Participant restarts before the coordinator starts waiting on a schema op |
| 5 |
# Activate the sync points required for the test |
| 6 |
SET DEBUG_SYNC="ndb_schema_before_write WAIT_FOR reached_check_wakeup_clients"; |
| 7 |
SET GLOBAL DEBUG="+d,ndb_check_wakeup_clients_syncpoint"; |
| 8 |
SET DEBUG_SYNC="ndb_schema_after_write SIGNAL continue_check_wakeup_clients"; |
| 9 |
# Execute a DDL through send which will cause the |
| 10 |
# client to wait until a participant (mysqld6) unsubscribes |
| 11 |
CREATE TABLE t1 (a INT) ENGINE NDB; |
| 12 |
# Shutdown a participant Server |
| 13 |
# Verify that the DDL was successful |
| 14 |
SHOW CREATE TABLE t1; |
| 15 |
Table Create Table |
| 16 |
t1 CREATE TABLE `t1` ( |
| 17 |
`a` int DEFAULT NULL |
| 18 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 19 |
# Cleanup |
| 20 |
# restart |
| 21 |
set GLOBAL debug="-d,ndb_check_wakeup_clients_syncpoint"; |
| 22 |
set debug_sync="RESET"; |
| 23 |
DROP TABLE t1; |
| 24 |
# Case 2 : Participant restarts after replying to the |
| 25 |
# schema op but the coordinator is waiting on other participants |
| 26 |
# Defer sending schema op ack from mysqld2 |
| 27 |
# to make the coordinator wait for it |
| 28 |
set GLOBAL debug="+d,ndb_defer_sending_participant_ack"; |
| 29 |
# Execute a DDL through send on mysqld1 |
| 30 |
CREATE TABLE t1 (a INT) ENGINE NDB; |
| 31 |
# Wait for the participant mysqld6 to send the ack so |
| 32 |
# that we can restart it and test the coordinator |
| 33 |
# Shutdown a participant Server |
| 34 |
# Resume sending the ack from participant mysqld2 |
| 35 |
set GLOBAL debug="-d,ndb_defer_sending_participant_ack"; |
| 36 |
SET DEBUG_SYNC="now SIGNAL resume_sending_participant_ack"; |
| 37 |
# Verify that the DDL was successful without any warnings |
| 38 |
SHOW CREATE TABLE t1; |
| 39 |
Table Create Table |
| 40 |
t1 CREATE TABLE `t1` ( |
| 41 |
`a` int DEFAULT NULL |
| 42 |
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 43 |
# Cleanup |
| 44 |
# restart |
| 45 |
DROP TABLE t1; |