Debian Codegraph @

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

raw
1 --source include/have_ndb.inc
2
3 # Test is using error insert, check that binaries support it
4 --source have_ndb_error_insert.inc
5 --source suite/ndb/include/backup_restore_setup.inc
6
7 create table t1 (a1 int primary key, b1 int) engine ndb;
8 create table t2 (a2 int primary key, b2 text) engine ndb;
9 insert into t1 values (1,11),(2,22);
10 insert into t2 values (1,repeat('x',10000)),(2,repeat('y',20000));
11 select a1,crc32(b2) from t1,t2 where a1=a2 order by a1;
12
13 --echo # run backup
14 --source include/ndb_backup.inc
15 drop table t1,t2;
16
17 --echo # error insert 6215
18 --exec $NDB_MGM -e "all error 6215" >> $NDB_TOOLS_OUTPUT
19
20 --echo # run restore
21 --exec $NDB_RESTORE -b $the_backup_id -n 1 -m $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
22 --exec $NDB_RESTORE -b $the_backup_id -n 1 -r $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
23 --exec $NDB_RESTORE -b $the_backup_id -n 2 -r $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
24
25 --echo # error insert clear
26 --exec $NDB_MGM -e "all error 0" >> $NDB_TOOLS_OUTPUT
27
28 select a1,crc32(b2) from t1,t2 where a1=a2 order by a1;
29 drop table t1,t2;
30
31 --source suite/ndb/include/backup_restore_cleanup.inc
32 --remove_file $NDB_TOOLS_OUTPUT