Debian Codegraph @

mysql-test/suite/binlog_encryption/encryption_combo.result

raw
1 #################
2 # Initialization
3 #################
4 include/rpl_init.inc [topology=1->2]
5 connection server_2;
6 include/stop_slave.inc
7 #####################################################
8 # Part 1: unencrypted master
9 #####################################################
10 connection server_1;
11 CREATE TABLE table1_no_encryption (
12 pk INT AUTO_INCREMENT PRIMARY KEY,
13 ts TIMESTAMP NULL,
14 b BLOB
15 ) ENGINE=MyISAM;
16 INSERT INTO table1_no_encryption VALUES (NULL,NOW(),'data_no_encryption');
17 INSERT INTO table1_no_encryption SELECT NULL,NOW(),b FROM table1_no_encryption;
18 FLUSH BINARY LOGS;
19 SET binlog_format=ROW;
20 INSERT INTO table1_no_encryption SELECT NULL,NOW(),b FROM table1_no_encryption;
21 INSERT INTO table1_no_encryption SELECT NULL,NOW(),b FROM table1_no_encryption;
22 FOUND 11 /table1_no_encryption/ in master-bin.0*
23 #####################################################
24 # Part 2: restart master, now with binlog encryption
25 #####################################################
26 connection default;
27 connection server_1;
28 CREATE TABLE table2_to_encrypt (
29 pk INT AUTO_INCREMENT PRIMARY KEY,
30 ts TIMESTAMP NULL,
31 b BLOB
32 ) ENGINE=MyISAM;
33 INSERT INTO table2_to_encrypt VALUES (NULL,NOW(),'data_to_encrypt');
34 INSERT INTO table2_to_encrypt SELECT NULL,NOW(),b FROM table2_to_encrypt;
35 FLUSH BINARY LOGS;
36 SET binlog_format=ROW;
37 INSERT INTO table2_to_encrypt SELECT NULL,NOW(),b FROM table2_to_encrypt;
38 INSERT INTO table2_to_encrypt SELECT NULL,NOW(),b FROM table2_to_encrypt;
39 NOT FOUND /table2_to_encrypt/ in master-bin.0*
40 #####################################################
41 # Part 3: restart master again without encryption
42 #####################################################
43 connection default;
44 connection server_1;
45 CREATE TABLE table3_no_encryption (
46 pk INT AUTO_INCREMENT PRIMARY KEY,
47 ts TIMESTAMP NULL,
48 b BLOB
49 ) ENGINE=MyISAM;
50 INSERT INTO table3_no_encryption VALUES (NULL,NOW(),'data_no_encryption');
51 INSERT INTO table3_no_encryption SELECT NULL,NOW(),b FROM table3_no_encryption;
52 INSERT INTO table3_no_encryption SELECT NULL,NOW(),b FROM table3_no_encryption;
53 #####################################################
54 # Check: resume replication and check that it works
55 #####################################################
56 connection server_2;
57 include/start_slave.inc
58 SHOW TABLES;
59 Tables_in_test
60 table1_no_encryption
61 table2_to_encrypt
62 table3_no_encryption
63 ##########
64 # Cleanup
65 ##########
66 connection server_1;
67 SELECT COUNT(*) FROM table1_no_encryption;
68 COUNT(*)
69 8
70 SELECT COUNT(*) FROM table2_to_encrypt;
71 COUNT(*)
72 8
73 SELECT COUNT(*) FROM table3_no_encryption;
74 COUNT(*)
75 4
76 DROP TABLE table1_no_encryption, table2_to_encrypt, table3_no_encryption;
77 connection server_2;
78 include/rpl_end.inc