blob: a69e78cd94074691f6dc73b5398f6f6ad3bc1f19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
#
# The test checks that basic DDL and DML events are encrypted
# in the relay and binary logs on slave.
# The test is to be run with all binlog formats
# (combinations for rpl_init.inc take care of that).
#
# The test runs with the non-encrypted master and encrypted slave.
# It generates a sequence of events on master and checks that
# relay logs and binary logs are encrypted on slave.
#
--source encryption_algorithms.inc
--source include/have_innodb.inc
--echo #################
--echo # Initialization
--echo #################
--let $rpl_topology= 1->2
--source include/rpl_init.inc
--enable_connect_log
--connection server_2
# We stop SQL thread because we want to have
# all relay logs at the end of the test flow
--disable_connect_log
--source include/stop_slave_sql.inc
--enable_connect_log
--echo #################
--echo # Test flow
--echo #################
--connection server_1
--source testdata.inc
--echo #################
--echo # Master binlog checks
--echo #################
--let $master_datadir= `SELECT @@datadir`
--let SEARCH_FILE= $master_datadir/master-bin.0*
--let SEARCH_PATTERN= _to_encrypt
--source include/search_pattern_in_file.inc
--let SEARCH_FILE= $master_datadir/master-bin.0*
--let SEARCH_PATTERN= COMMIT
--source include/search_pattern_in_file.inc
--let SEARCH_FILE= $master_datadir/master-bin.0*
--let SEARCH_PATTERN= TIMESTAMP
--source include/search_pattern_in_file.inc
--disable_connect_log
--source include/save_master_pos.inc
--enable_connect_log
--echo #################
--echo # Relay log checks
--echo #################
--connection server_2
--disable_connect_log
--source include/sync_io_with_master.inc
--enable_connect_log
--let $slave_datadir= `SELECT @@datadir`
--let SEARCH_FILE= $slave_datadir/slave-relay-bin.0*
--let SEARCH_PATTERN= _to_encrypt
--source include/search_pattern_in_file.inc
--let SEARCH_FILE= $slave_datadir/slave-relay-bin.0*
--let SEARCH_PATTERN= COMMIT
--source include/search_pattern_in_file.inc
--let SEARCH_FILE= $slave_datadir/slave-relay-bin.0*
--let SEARCH_PATTERN= TIMESTAMP
--source include/search_pattern_in_file.inc
--echo #################
--echo # Slave binlog checks
--echo #################
# Re-enable SQL thread, let it catch up with IO thread
# and check slave binary logs
--disable_connect_log
--source include/start_slave.inc
--source include/sync_slave_sql_with_io.inc
--enable_connect_log
--disable_connect_log
--source include/sync_io_with_master.inc
--enable_connect_log
--let SEARCH_FILE= $slave_datadir/slave-bin.0*
--let SEARCH_PATTERN= _to_encrypt
--source include/search_pattern_in_file.inc
--let SEARCH_FILE= $slave_datadir/slave-bin.0*
--let SEARCH_PATTERN= COMMIT
--source include/search_pattern_in_file.inc
--let SEARCH_FILE= $slave_datadir/slave-bin.0*
--let SEARCH_PATTERN= TIMESTAMP
--source include/search_pattern_in_file.inc
--echo ##########
--echo # Cleanup
--echo ##########
--disable_connect_log
--source include/rpl_end.inc
|