Debian Codegraph @

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

raw
1 -- source include/have_ndb.inc
2 -- source have_ndb_error_insert.inc
3 -- source suite/ndb/include/backup_restore_setup.inc
4
5 CREATE TABLE t1(k int not null primary key auto_increment) engine=ndb;
6
7 INSERT INTO t1 VALUES (NULL);
8
9 INSERT INTO t1 SELECT NULL FROM t1;
10 INSERT INTO t1 SELECT NULL FROM t1;
11 INSERT INTO t1 SELECT NULL FROM t1;
12 INSERT INTO t1 SELECT NULL FROM t1;
13
14 # Error insert to pause backup.
15 --exec $NDB_MGM -e'all error 10039' > /dev/null
16
17 # Start backup
18 --source suite/ndb/t/ndb_backup_nowait_start.inc
19
20 # Check if the error ER_GET_ERRMSG is thrown when
21 # ALTER TABLE is executed while the backup is in progress.
22
23 --error ER_GET_ERRMSG
24 ALTER TABLE t1 ADD COLUMN c3 INT COLUMN_FORMAT DYNAMIC;
25
26 # Error insert to resume backup.
27 --exec $NDB_MGM -e'all error 0' > /dev/null
28
29 # Wait backup completed
30 --source suite/ndb/t/ndb_backup_nowait_wait.inc
31
32 DROP TABLE t1;
33
34 --echo #
35 --echo # Bug#28563639: Backup aborts during cleanup of log-event-related triggers
36 --echo #
37 create table t1(
38 id int unsigned primary key,
39 val varchar(100) unique,
40 val2 varchar(100) unique,
41 val3 varchar(100) unique,
42 val4 varchar(100) unique,
43 val5 varchar(100) unique,
44 updates int unsigned
45 ) engine=ndb;
46
47 --exec $NDB_MGM -e'all error 10049' > /dev/null
48 --echo Start backup nowait
49 --source suite/ndb/t/ndb_backup_nowait_start.inc
50 --exec $NDB_MGM -e'all error 0' > /dev/null
51
52 --echo Wait for backup to complete
53 --source suite/ndb/t/ndb_backup_nowait_wait.inc
54
55 drop table t1;
56
57 --source suite/ndb/include/backup_restore_cleanup.inc