Debian Codegraph @

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

raw
1 -- source include/have_ndb.inc
2
3 let $NDB_SAVED_BACKUPS=$MYSQL_TEST_DIR/suite/ndb/backups;
4
5 # snapshotend with redo log from little endian system
6 --exec $NDB_RESTORE -b 1 -n 1 -m $NDB_SAVED_BACKUPS/encrypted_le/BACKUP-1 >> $NDB_TOOLS_OUTPUT
7 --exec $NDB_RESTORE -b 1 -n 1 -p 1 -r $NDB_SAVED_BACKUPS/encrypted_le/BACKUP-1 >> $NDB_TOOLS_OUTPUT
8
9 select * from t0 order by id;
10 select * from t1 order by val;
11 select * from t2 order by id;
12 select * from t3 order by id;
13 select * from t4 order by id;
14 select id, sha1(val) from t5 order by id;
15 select * from t6 order by id;
16 select * from t7 order by id;
17 select id, sha1(val) from t8 order by id;
18 select count(*) from t9;
19
20 show create table t4;
21 insert into t4 (id) values (-1);
22 select * from t4 where id = -1;
23
24 drop tables t0,t1,t2,t3,t4,t5,t6,t7,t8,t9;
25 flush tables;
26
27 # snapshotstart with undo log from little endian system
28 --exec $NDB_RESTORE -b 2 -n 1 -m $NDB_SAVED_BACKUPS/encrypted_le/BACKUP-2 >> $NDB_TOOLS_OUTPUT
29 --exec $NDB_RESTORE -b 2 -n 1 -p 1 -r $NDB_SAVED_BACKUPS/encrypted_le/BACKUP-2 >> $NDB_TOOLS_OUTPUT
30
31 select * from t0 order by id;
32 select * from t1 order by val;
33 select * from t2 order by id;
34 select * from t3 order by id;
35 select * from t4 order by id;
36 select id, sha1(val) from t5 order by id;
37 select * from t6 order by id;
38 select * from t7 order by id;
39 select id, sha1(val) from t8 order by id;
40 select count(*) from t9;
41
42 drop tables t0,t1,t2,t3,t4,t5,t6,t7,t8,t9;
43 flush tables;
44
45 # snapshotend with redo log from big endian system
46 --exec $NDB_RESTORE -b 1 -n 1 -m $NDB_SAVED_BACKUPS/encrypted_be/BACKUP-1 >> $NDB_TOOLS_OUTPUT
47 --exec $NDB_RESTORE -b 1 -n 1 -p 1 -r $NDB_SAVED_BACKUPS/encrypted_be/BACKUP-1 >> $NDB_TOOLS_OUTPUT
48
49 select * from t0 order by id;
50 select * from t1 order by val;
51 select * from t2 order by id;
52 select * from t3 order by id;
53 select * from t4 order by id;
54 select id, sha1(val) from t5 order by id;
55 select * from t6 order by id;
56 select * from t7 order by id;
57 select id, sha1(val) from t8 order by id;
58 select count(*) from t9;
59
60 show create table t4;
61 insert into t4 (id) values (-1);
62 select * from t4 where id = -1;
63
64 drop tables t0,t1,t2,t3,t4,t5,t6,t7,t8,t9;
65 flush tables;
66
67 # snapshotstart with undo log from big endian system
68 --exec $NDB_RESTORE -b 2 -n 1 -m $NDB_SAVED_BACKUPS/encrypted_be/BACKUP-2 >> $NDB_TOOLS_OUTPUT
69 --exec $NDB_RESTORE -b 2 -n 1 -p 1 -r $NDB_SAVED_BACKUPS/encrypted_be/BACKUP-2 >> $NDB_TOOLS_OUTPUT
70
71 select * from t0 order by id;
72 select * from t1 order by val;
73 select * from t2 order by id;
74 select * from t3 order by id;
75 select * from t4 order by id;
76 select id, sha1(val) from t5 order by id;
77 select * from t6 order by id;
78 select * from t7 order by id;
79 select id, sha1(val) from t8 order by id;
80 select count(*) from t9;
81
82 drop tables t0,t1,t2,t3,t4,t5,t6,t7,t8,t9;
83 flush tables;
84
85 remove_file $NDB_TOOLS_OUTPUT;