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 118 119 120 121 122 123 124
|
include/master-slave.inc
[connection master]
# Asserted this: On master, the table should return an empty set.
connection slave;
# Verify that SELECT works for every field and produces an output
# similar to the corresponding field in SHOW SLAVE STATUS(SSS).
include/assert.inc [Value returned by SSS and PS table for Host should be same.]
include/assert.inc [Value returned by SSS and PS table for Port should be same.]
include/assert.inc [Value returned by SSS and PS table for User should be same.]
include/assert.inc [Value returned by SSS and PS table for Using_Gtid should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_Allowed should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_CA_File should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_CA_Path should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_Certificate should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_Cipher should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_Key should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_Verify_Server_Certificate should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_Crl_File should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_Crl_Path should be same.]
include/assert.inc [Value returned by SSS and PS table for Connection_Retry_Interval should be same.]
include/assert.inc [Value returned by PS table for Connection_Retry_Count should be 10.]
# Heartbeat_Interval is part of I_S and P_S. We will compare the
# two to make sure both match.
include/assert.inc [Value returned by IS and PS table for Heartbeat_Interval should be same.]
# Change configuration parameters and verify that these changes
# are shown correctly by SELECTs from PS table.
connection master;
create user replssl@localhost;
grant replication slave on *.* to replssl@localhost require ssl;
include/sync_slave_sql_with_master.inc
include/stop_slave.inc
change master to
master_user= 'replssl',
master_password= '',
master_ssl= 1,
master_ssl_ca= 'MYSQL_TEST_DIR/std_data/cacert.pem',
master_ssl_cert= 'MYSQL_TEST_DIR/std_data/client-cert.pem',
master_ssl_key= 'MYSQL_TEST_DIR/std_data/client-key.pem';
include/start_slave.inc
connection slave;
# Checking SSL parameters, they were empty in tests done in the
# previous section.
include/assert.inc [Value returned by SSS and PS table for SSL_Allowed should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_CA_File should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_CA_Path should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_Certificate should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_Cipher should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_Key should be same.]
include/assert.inc [Value returned by SSS and PS table for SSL_Verify_Server_Certificate should be same.]
connection master;
drop user replssl@localhost;
connection slave;
include/stop_slave.inc
CHANGE MASTER TO
master_host= '127.0.0.1',
master_user= 'root',
master_password= '',
master_ssl_ca= '',
master_ssl_cert= '',
master_ssl_key= '',
master_ssl_verify_server_cert=0,
master_ssl=1,
master_use_gtid=no;
include/start_slave.inc
# Test with different MASTER_USE_GTID values
# 1) Test for MASTER_USE_GTID=NO
include/stop_slave.inc
change master to
master_user = 'root',
master_use_gtid = NO;
include/assert.inc [Value returned by SSS and PS table for Using_Gtid should be same.]
# 2) Test for Auto_position= CURRENT_POS.
change master to
master_user = 'root',
master_use_gtid= CURRENT_POS;
include/assert.inc [Value returned by SSS and PS table for Using_Gtid should be same.]
# 3) Test for Auto_position= SLAVE_POS
change master to
master_user = 'root',
master_use_gtid= SLAVE_POS;
include/assert.inc [Value returned by SSS and PS table for Using_Gtid should be same.]
# Test INOGRE_SERVER_IDS
# 1) Test for IGNORE_SERVER_IDS= (10, 100);
connection slave;
change master to IGNORE_SERVER_IDS= (10, 100);
include/assert.inc [Value returned by SSS and PS table for Ignore_server_ids should be same.]
CHANGE MASTER TO IGNORE_SERVER_IDS=();
# 2) Test for IGNORE_DOMAIN_IDS(2)
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(2), MASTER_USE_GTID=slave_pos;
include/start_slave.inc
include/assert.inc [Value returned by SSS and PS table for Replicate_Ignore_Domain_Ids should be same.]
include/stop_slave.inc
# 3) Test for DO_DOMAIN_IDS(1)
CHANGE MASTER TO DO_DOMAIN_IDS=(1), IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos;
include/start_slave.inc
include/assert.inc [Value returned by SSS and PS table for Replicate_Do_Domain_Ids should be same.]
include/stop_slave.inc
CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=();
include/start_slave.inc
include/rpl_end.inc
|