-- source include/have_ndb.inc -- source have_ndb_error_insert.inc -- source suite/ndb/include/backup_restore_setup.inc CREATE TABLE t1(k int not null primary key auto_increment) engine=ndb; INSERT INTO t1 VALUES (NULL); INSERT INTO t1 SELECT NULL FROM t1; INSERT INTO t1 SELECT NULL FROM t1; INSERT INTO t1 SELECT NULL FROM t1; INSERT INTO t1 SELECT NULL FROM t1; # Error insert to pause backup. --exec $NDB_MGM -e'all error 10039' > /dev/null --exec $NDB_MGM -e 'start backup wait started' > /dev/null # Check if the error ER_GET_ERRMSG is thrown when # ALTER TABLE is executed while the backup is in progress. --error ER_GET_ERRMSG ALTER TABLE t1 ADD COLUMN c3 INT COLUMN_FORMAT DYNAMIC; # Error insert to resume backup. --exec $NDB_MGM -e'all error 0' > /dev/null # Dropping table in the end to ensure consistency in mtr. # This won't go through until the backup is completed. # Hence, executing DROP TABLE in a loop with a gap of one # second between successive attempts until the table is # dropped successfully, after the backup is completed. let $mysql_errno = ER_GET_ERRMSG; while($mysql_errno) { sleep 1; --error 0,1306 DROP TABLE t1; } --echo Test for Bug#28563639: Backup aborts during cleanup of log-event-related triggers use test; create table t1(id int unsigned primary key, val varchar(100) unique, val2 varchar(100) unique, val3 varchar(100) unique, val4 varchar(100) unique, val5 varchar(100) unique, updates int unsigned) engine=ndb; --exec $NDB_MGM -e'all error 10049' > /dev/null --echo Start backup nowait --source suite/ndb/t/ndb_backup_nowait_start.inc --exec $NDB_MGM -e'all error 0' > /dev/null --echo Wait for backup to complete --source suite/ndb/t/ndb_backup_nowait_start.inc drop table t1; --source suite/ndb/include/backup_restore_cleanup.inc