执行mysql-test-run.pl的测试结果分析如下:
CURRENT_TEST: rpl.rpl_ssl
=== SHOW MASTER STATUS ===
---- 1. ----
File slave-bin.000001
Position 357
Binlog_Do_DB
Binlog_Ignore_DB
==========================
=== SHOW SLAVE STATUS ===
---- 1. ----
Slave_IO_State
Master_Host 127.0.0.1
Master_User replssl
Master_Port 13000
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 357
Relay_Log_File slave-relay-bin.000001
Relay_Log_Pos 4
Relay_Master_Log_File master-bin.000001
Slave_IO_Running No
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 357
Relay_Log_Space 106
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed Yes
Master_SSL_CA_File /usr/share/mysql-test/std_data/cacert.pem
Master_SSL_CA_Path
Master_SSL_Cert /usr/share/mysql-test/std_data/client-cert.pem
Master_SSL_Cipher
Master_SSL_Key /usr/share/mysql-test/std_data/client-key.pem
Seconds_Behind_Master
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 2026
Last_IO_Error error connecting to master ‘[email protected]:13000‘ - retry-time: 1 retries: 10
Last_SQL_Errno 0
Last_SQL_Error
=========================
=== SHOW PROCESSLIST ===
---- 1. ----
Id 105
User root
Host localhost:51189
db test
Command Sleep
Time 300
State
Info
---- 2. ----
Id 106
User root
Host localhost:51190
db test
Command Sleep
Time 300
State
Info
---- 3. ----
Id 109
User root
Host localhost:51196
db test
Command Query
Time 0
State
Info SHOW PROCESSLIST
---- 4. ----
Id 110
User root
Host localhost:51197
db test
Command Sleep
Time 300
State
Info
---- 5. ----
Id 112
User system user
Host
db
Command Connect
Time 300
State Has read all relay log; waiting for the slave I/O thread to update it
Info
========================
analyze: sync_with_master
mysqltest: At line 26: sync_slave_with_master failed: ‘select master_pos_wait(‘master-bin.000001‘, 444, 300)‘ returned -1 indicating timeout after 300 seconds
The result from queries just before the failure was:
include/master-slave.inc
[connection master]
grant replication slave on *.* to [email protected] require ssl;
create table t1 (t int auto_increment, KEY(t));
stop slave;
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‘;
start slave;
insert into t1 values(1);
== /usr/share/mysql-test/var/tmp/analyze-sync_with_master-mysqld.1.err ==
############################## default ##############################
**** SHOW WARNINGS on default ****
SHOW WARNINGS;
Level Code Message
**** SELECT replication-related variables on default ****
SELECT NOW(), @@SERVER_ID;
NOW() @@SERVER_ID
2016-06-22 13:16:28 1
**** SHOW SLAVE STATUS on default ****
SHOW SLAVE STATUS;
**** SHOW MASTER STATUS on default ****
SHOW MASTER STATUS;
File master-bin.000001
Position 444
Binlog_Do_DB
Binlog_Ignore_DB
**** SHOW SLAVE HOSTS on default ****
SHOW SLAVE HOSTS;
Server_id 2
Host 127.0.0.1
Port 13001
Rpl_recovery_rank 0
Master_id 1
**** SHOW PROCESSLIST on default ****
SHOW PROCESSLIST;
Id User Host db Command Time State Info
109 root localhost:48082 NULL Binlog Dump 301 Has sent all binlog to slave; waiting for binlog to be updated NULL
122 root localhost NULL Query 0 NULL SHOW PROCESSLIST
**** SHOW BINARY LOGS on default ****
SHOW BINARY LOGS;
Log_name File_size
master-bin.000001 444
**** SHOW BINLOG EVENTS on default ****
binlog_name = ‘master-bin.000001‘
SHOW BINLOG EVENTS IN ‘master-bin.000001‘;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server ver: 5.1.66-log, Binlog ver: 4
master-bin.000001 106 Query 1 248 use `test`; grant replication slave on *.* to [email protected] require ssl
master-bin.000001 248 Query 1 357 use `test`; create table t1 (t int auto_increment, KEY(t))
master-bin.000001 357 Query 1 444 use `test`; insert into t1 values(1)
== /usr/share/mysql-test/var/tmp/analyze-sync_with_master-mysqld.2.err ==
############################## default ##############################
**** SHOW WARNINGS on default ****
SHOW WARNINGS;
Level Code Message
**** SELECT replication-related variables on default ****
SELECT NOW(), @@SERVER_ID;
NOW() @@SERVER_ID
2016-06-22 13:16:28 2
**** SHOW SLAVE STATUS on default ****
SHOW SLAVE STATUS;
Slave_IO_State
Master_Host 127.0.0.1
Master_User replssl
Master_Port 13000
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 357
Relay_Log_File slave-relay-bin.000001
Relay_Log_Pos 4
Relay_Master_Log_File master-bin.000001
Slave_IO_Running No
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 357
Relay_Log_Space 106
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed Yes
Master_SSL_CA_File /usr/share/mysql-test/std_data/cacert.pem
Master_SSL_CA_Path
Master_SSL_Cert /usr/share/mysql-test/std_data/client-cert.pem
Master_SSL_Cipher
Master_SSL_Key /usr/share/mysql-test/std_data/client-key.pem
Seconds_Behind_Master NULL
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 2026
Last_IO_Error error connecting to master ‘[email protected]:13000‘ - retry-time: 1 retries: 10
Last_SQL_Errno 0
Last_SQL_Error
**** SHOW MASTER STATUS on default ****
SHOW MASTER STATUS;
File slave-bin.000001
Position 357
Binlog_Do_DB
Binlog_Ignore_DB
**** SHOW SLAVE HOSTS on default ****
SHOW SLAVE HOSTS;
**** SHOW PROCESSLIST on default ****
SHOW PROCESSLIST;
Id User Host db Command Time State Info
112 system user NULL Connect 301 Has read all relay log; waiting for the slave I/O thread to update it NULL
113 root localhost NULL Query 0 NULL SHOW PROCESSLIST
**** SHOW BINARY LOGS on default ****
SHOW BINARY LOGS;
Log_name File_size
slave-bin.000001 357
**** SHOW BINLOG EVENTS on default ****
binlog_name = ‘slave-bin.000001‘
SHOW BINLOG EVENTS IN ‘slave-bin.000001‘;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 4 Format_desc 2 106 Server ver: 5.1.66-log, Binlog ver: 4
slave-bin.000001 106 Query 1 248 use `test`; grant replication slave on *.* to [email protected] require ssl
slave-bin.000001 248 Query 1 357 use `test`; create table t1 (t int auto_increment, KEY(t))
- saving ‘/usr/share/mysql-test/var/log/rpl.rpl_ssl-mix/‘ to ‘/usr/share/mysql-test/var/log/rpl.rpl_ssl-mix/‘
Only 340 of 1634 completed.
mysql-test-run: *** ERROR: Not all tests completed