1
source include/have_ssl_communication.inc;
2
source include/master-slave.inc;
4
# create a user for replication that requires ssl encryption
6
grant replication slave on *.* to replssl@localhost require ssl;
7
create table t1 (t int auto_increment, KEY(t));
9
sync_slave_with_master;
11
# Set slave to use SSL for connection to master
13
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
15
master_user='replssl',
18
master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem',
19
master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem',
20
master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem';
23
# Switch to master and insert one record, then sync it to slave
25
insert into t1 values(1);
26
sync_slave_with_master;
28
# The record should now be on slave
31
# The slave is synced and waiting/reading from master
32
# SHOW SLAVE STATUS will show "Waiting for master to send event"
33
let $status_items= Master_SSL_Allowed, Master_SSL_CA_Path, Master_SSL_CA_File, Master_SSL_Cert, Master_SSL_Key;
34
source include/show_slave_status.inc;
35
source include/check_slave_is_running.inc;
37
# Stop the slave, as reported in bug#21871 it would hang
42
# Do the same thing a number of times
45
# 2007-11-27 mats Bug #32756 Starting and stopping the slave in a loop can lose rows
46
# After discussions with Engineering, I'm disabling this part of the test to avoid it causing
54
insert into t1 values (NULL);
55
select * from t1; # Some variance
57
select * from t1; # Some variance
66
# INSERT one more record to make sure
67
# the sync has something to do
68
insert into t1 values (NULL);
69
let $master_count= `select count(*) from t1`;
71
sync_slave_with_master;
72
--source include/wait_for_slave_to_start.inc
73
source include/show_slave_status.inc;
74
source include/check_slave_is_running.inc;
76
let $slave_count= `select count(*) from t1`;
78
if ($slave_count != $master_count)
80
echo master and slave differed in number of rows;
81
echo master: $master_count;
82
echo slave: $slave_count;
92
query_vertical show slave status;
96
drop user replssl@localhost;
98
sync_slave_with_master;
100
--source include/stop_slave.inc
102
master_user = 'root',
105
master_ssl_cert = '',
108
--echo End of 5.0 tests
109
--let $rpl_only_running_threads= 1
110
--source include/rpl_end.inc