Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
9f2bee02
Commit
9f2bee02
authored
Mar 29, 2007
by
msvensson@pilot.blaudden
Browse files
Options
Browse Files
Download
Plain Diff
Merge pilot.blaudden:/home/msvensson/mysql/bug19991/my51-bug19991
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
parents
3ec564e7
f865bd1d
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
340 additions
and
80 deletions
+340
-80
mysql-test/r/rpl_000015.result
mysql-test/r/rpl_000015.result
+7
-7
mysql-test/r/rpl_change_master.result
mysql-test/r/rpl_change_master.result
+4
-4
mysql-test/r/rpl_empty_master_crash.result
mysql-test/r/rpl_empty_master_crash.result
+1
-1
mysql-test/r/rpl_flushlog_loop.result
mysql-test/r/rpl_flushlog_loop.result
+1
-0
mysql-test/r/rpl_loaddata.result
mysql-test/r/rpl_loaddata.result
+6
-6
mysql-test/r/rpl_log_pos.result
mysql-test/r/rpl_log_pos.result
+8
-8
mysql-test/r/rpl_rbr_to_sbr.result
mysql-test/r/rpl_rbr_to_sbr.result
+1
-0
mysql-test/r/rpl_redirect.result
mysql-test/r/rpl_redirect.result
+1
-1
mysql-test/r/rpl_replicate_do.result
mysql-test/r/rpl_replicate_do.result
+2
-2
mysql-test/r/rpl_rotate_logs.result
mysql-test/r/rpl_rotate_logs.result
+6
-6
mysql-test/r/rpl_row_max_relay_size.result
mysql-test/r/rpl_row_max_relay_size.result
+6
-0
mysql-test/r/rpl_server_id1.result
mysql-test/r/rpl_server_id1.result
+2
-2
mysql-test/r/rpl_server_id2.result
mysql-test/r/rpl_server_id2.result
+2
-2
mysql-test/r/rpl_slave_status.result
mysql-test/r/rpl_slave_status.result
+1
-0
mysql-test/r/rpl_ssl1.result
mysql-test/r/rpl_ssl1.result
+95
-0
mysql-test/r/rpl_ssl_verify_server.result
mysql-test/r/rpl_ssl_verify_server.result
+57
-0
mysql-test/r/rpl_stm_log.result
mysql-test/r/rpl_stm_log.result
+2
-2
mysql-test/r/rpl_stm_max_relay_size.result
mysql-test/r/rpl_stm_max_relay_size.result
+6
-0
mysql-test/r/rpl_stm_reset_slave.result
mysql-test/r/rpl_stm_reset_slave.result
+8
-8
mysql-test/r/rpl_stm_until.result
mysql-test/r/rpl_stm_until.result
+4
-0
mysql-test/t/rpl_ssl1.test
mysql-test/t/rpl_ssl1.test
+2
-2
mysql-test/t/rpl_ssl_verify_server.test
mysql-test/t/rpl_ssl_verify_server.test
+34
-0
sql/lex.h
sql/lex.h
+1
-0
sql/repl_failsafe.cc
sql/repl_failsafe.cc
+4
-0
sql/rpl_mi.cc
sql/rpl_mi.cc
+50
-22
sql/rpl_mi.h
sql/rpl_mi.h
+1
-0
sql/slave.cc
sql/slave.cc
+9
-0
sql/sql_lex.h
sql/sql_lex.h
+6
-6
sql/sql_repl.cc
sql/sql_repl.cc
+7
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+6
-0
No files found.
mysql-test/r/rpl_000015.result
View file @
9f2bee02
...
@@ -4,20 +4,20 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
...
@@ -4,20 +4,20 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 102
master-bin.000001 102
reset slave;
reset slave;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
change master to master_host='127.0.0.1';
change master to master_host='127.0.0.1';
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 test DEFAULT_MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No #
# 127.0.0.1 test DEFAULT_MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No #
No
change master to master_host='127.0.0.1',master_user='root',
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT;
master_password='',master_port=MASTER_PORT;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No #
# 127.0.0.1 root MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No #
No
start slave;
start slave;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 102 # # master-bin.000001 Yes Yes 0 0 102 # None 0 No #
# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 102 # # master-bin.000001 Yes Yes 0 0 102 # None 0 No #
No
drop table if exists t1;
drop table if exists t1;
create table t1 (n int, PRIMARY KEY(n));
create table t1 (n int, PRIMARY KEY(n));
insert into t1 values (10),(45),(90);
insert into t1 values (10),(45),(90);
...
...
mysql-test/r/rpl_change_master.result
View file @
9f2bee02
...
@@ -12,12 +12,12 @@ insert into t1 values(1);
...
@@ -12,12 +12,12 @@ insert into t1 values(1);
insert into t1 values(2);
insert into t1 values(2);
stop slave;
stop slave;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 187 # None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 187 # None 0 No #
No
change master to master_user='root';
change master to master_user='root';
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 187 # None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 187 # None 0 No #
No
start slave;
start slave;
select * from t1;
select * from t1;
n
n
...
...
mysql-test/r/rpl_empty_master_crash.result
View file @
9f2bee02
...
@@ -5,7 +5,7 @@ reset slave;
...
@@ -5,7 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
start slave;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
load table t1 from master;
load table t1 from master;
ERROR 08S01: Error connecting to master: Master is not configured
ERROR 08S01: Error connecting to master: Master is not configured
load table t1 from master;
load table t1 from master;
...
...
mysql-test/r/rpl_flushlog_loop.result
View file @
9f2bee02
...
@@ -51,3 +51,4 @@ Master_SSL_Cert
...
@@ -51,3 +51,4 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
mysql-test/r/rpl_loaddata.result
View file @
9f2bee02
...
@@ -38,8 +38,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
...
@@ -38,8 +38,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
set global sql_slave_skip_counter=1;
set global sql_slave_skip_counter=1;
start slave;
start slave;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1793 # # master-bin.000001 Yes Yes # 0 0 1793 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1793 # # master-bin.000001 Yes Yes # 0 0 1793 # None 0 No #
No
set sql_log_bin=0;
set sql_log_bin=0;
delete from t1;
delete from t1;
set sql_log_bin=1;
set sql_log_bin=1;
...
@@ -48,8 +48,8 @@ stop slave;
...
@@ -48,8 +48,8 @@ stop slave;
change master to master_user='test';
change master to master_user='test';
change master to master_user='root';
change master to master_user='root';
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1828 # # master-bin.000001 No No # 0 0 1828 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1828 # # master-bin.000001 No No # 0 0 1828 # None 0 No #
No
set global sql_slave_skip_counter=1;
set global sql_slave_skip_counter=1;
start slave;
start slave;
set sql_log_bin=0;
set sql_log_bin=0;
...
@@ -59,8 +59,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
...
@@ -59,8 +59,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
stop slave;
stop slave;
reset slave;
reset slave;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No #
No
reset master;
reset master;
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
unique(day)) engine=MyISAM;
unique(day)) engine=MyISAM;
...
...
mysql-test/r/rpl_log_pos.result
View file @
9f2bee02
...
@@ -8,26 +8,26 @@ show master status;
...
@@ -8,26 +8,26 @@ show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 102 <Binlog_Ignore_DB>
master-bin.000001 102 <Binlog_Ignore_DB>
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes 0 0 102 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes 0 0 102 # None 0 No #
No
stop slave;
stop slave;
change master to master_log_pos=74;
change master to master_log_pos=74;
start slave;
start slave;
stop slave;
stop slave;
change master to master_log_pos=74;
change master to master_log_pos=74;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 74 # # master-bin.000001 No No 0 0 74 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 74 # # master-bin.000001 No No 0 0 74 # None 0 No #
No
start slave;
start slave;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 74 # # master-bin.000001 No Yes 0 0 74 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 74 # # master-bin.000001 No Yes 0 0 74 # None 0 No #
No
stop slave;
stop slave;
change master to master_log_pos=177;
change master to master_log_pos=177;
start slave;
start slave;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 177 # # master-bin.000001 No Yes 0 0 177 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 177 # # master-bin.000001 No Yes 0 0 177 # None 0 No #
No
show master status;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 102 <Binlog_Ignore_DB>
master-bin.000001 102 <Binlog_Ignore_DB>
...
...
mysql-test/r/rpl_rbr_to_sbr.result
View file @
9f2bee02
...
@@ -55,6 +55,7 @@ Master_SSL_Cert
...
@@ -55,6 +55,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
SHOW BINLOG EVENTS;
SHOW BINLOG EVENTS;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
...
...
mysql-test/r/rpl_redirect.result
View file @
9f2bee02
...
@@ -5,7 +5,7 @@ reset slave;
...
@@ -5,7 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
start slave;
SHOW SLAVE STATUS;
SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
SHOW SLAVE HOSTS;
SHOW SLAVE HOSTS;
Server_id Host Port Rpl_recovery_rank Master_id
Server_id Host Port Rpl_recovery_rank Master_id
2 127.0.0.1 SLAVE_PORT 2 1
2 127.0.0.1 SLAVE_PORT 2 1
...
...
mysql-test/r/rpl_replicate_do.result
View file @
9f2bee02
...
@@ -27,8 +27,8 @@ select * from t11;
...
@@ -27,8 +27,8 @@ select * from t11;
ERROR 42S02: Table 'test.t11' doesn't exist
ERROR 42S02: Table 'test.t11' doesn't exist
drop table if exists t1,t2,t11;
drop table if exists t1,t2,t11;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 # # # master-bin.000001 Yes Yes test.t1 # 0 0 # # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 # # # master-bin.000001 Yes Yes test.t1 # 0 0 # # None 0 No #
No
create table t1 (ts timestamp);
create table t1 (ts timestamp);
set one_shot time_zone='met';
set one_shot time_zone='met';
insert into t1 values('2005-08-12 00:00:00');
insert into t1 values('2005-08-12 00:00:00');
...
...
mysql-test/r/rpl_rotate_logs.result
View file @
9f2bee02
...
@@ -15,8 +15,8 @@ insert into temp_table values ("testing temporary tables");
...
@@ -15,8 +15,8 @@ insert into temp_table values ("testing temporary tables");
create table t1 (s text);
create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard');
insert into t1 values('Could not break slave'),('Tried hard');
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 552 # # master-bin.000001 Yes Yes # 0 0 552 # None 0 No #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 552 # # master-bin.000001 Yes Yes # 0 0 552 # None 0 No #
No
select * from t1;
select * from t1;
s
s
Could not break slave
Could not break slave
...
@@ -56,8 +56,8 @@ Log_name File_size
...
@@ -56,8 +56,8 @@ Log_name File_size
master-bin.000003 411
master-bin.000003 411
insert into t2 values (65);
insert into t2 values (65);
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 500 # # master-bin.000003 Yes Yes # 0 0 500 # None 0 No #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 500 # # master-bin.000003 Yes Yes # 0 0 500 # None 0 No #
No
select * from t2;
select * from t2;
m
m
34
34
...
@@ -84,8 +84,8 @@ select * from t4;
...
@@ -84,8 +84,8 @@ select * from t4;
a
a
testing temporary tables part 2
testing temporary tables part 2
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2036 # # master-bin.000005 Yes Yes # 0 0 2036 # None 0 No #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2036 # # master-bin.000005 Yes Yes # 0 0 2036 # None 0 No #
No
lock tables t3 read;
lock tables t3 read;
select count(*) from t3 where n >= 4;
select count(*) from t3 where n >= 4;
count(*)
count(*)
...
...
mysql-test/r/rpl_row_max_relay_size.result
View file @
9f2bee02
...
@@ -57,6 +57,7 @@ Master_SSL_Cert
...
@@ -57,6 +57,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
#
#
# Test 2
# Test 2
#
#
...
@@ -100,6 +101,7 @@ Master_SSL_Cert
...
@@ -100,6 +101,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
#
#
# Test 3: max_relay_log_size = 0
# Test 3: max_relay_log_size = 0
#
#
...
@@ -143,6 +145,7 @@ Master_SSL_Cert
...
@@ -143,6 +145,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
#
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
#
...
@@ -183,6 +186,7 @@ Master_SSL_Cert
...
@@ -183,6 +186,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
#
#
# Test 5
# Test 5
#
#
...
@@ -224,6 +228,7 @@ Master_SSL_Cert
...
@@ -224,6 +228,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
#
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
#
...
@@ -263,6 +268,7 @@ Master_SSL_Cert
...
@@ -263,6 +268,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
flush logs;
flush logs;
show master status;
show master status;
File master-bin.000002
File master-bin.000002
...
...
mysql-test/r/rpl_server_id1.result
View file @
9f2bee02
...
@@ -9,8 +9,8 @@ reset master;
...
@@ -9,8 +9,8 @@ reset master;
stop slave;
stop slave;
change master to master_port=SLAVE_PORT;
change master to master_port=SLAVE_PORT;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 102 None 0 No NULL
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 102 None 0 No NULL
No
start slave;
start slave;
insert into t1 values (1);
insert into t1 values (1);
show status like "slave_running";
show status like "slave_running";
...
...
mysql-test/r/rpl_server_id2.result
View file @
9f2bee02
...
@@ -9,8 +9,8 @@ reset master;
...
@@ -9,8 +9,8 @@ reset master;
stop slave;
stop slave;
change master to master_port=SLAVE_PORT;
change master to master_port=SLAVE_PORT;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 102 None 0 No NULL
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 102 None 0 No NULL
No
start slave;
start slave;
insert into t1 values (1);
insert into t1 values (1);
select * from t1;
select * from t1;
...
...
mysql-test/r/rpl_slave_status.result
View file @
9f2bee02
...
@@ -52,6 +52,7 @@ Master_SSL_Cert
...
@@ -52,6 +52,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master NULL
Seconds_Behind_Master NULL
Master_SSL_Verify_Server_Cert No
drop table t1;
drop table t1;
delete from mysql.user where user='rpl';
delete from mysql.user where user='rpl';
drop table t1;
drop table t1;
mysql-test/r/rpl_
openssl
.result
→
mysql-test/r/rpl_
ssl1
.result
View file @
9f2bee02
...
@@ -19,13 +19,77 @@ select * from t1;
...
@@ -19,13 +19,77 @@ select * from t1;
t
t
1
1
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State #
# 127.0.0.1 replssl MASTER_MYPORT 1 # # # # # # Yes # 0 0 # # None 0 Yes MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem #
Master_Host 127.0.0.1
Master_User replssl
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File #
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File #
Slave_IO_Running #
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 #
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed Yes
Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_CA_Path
Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem
Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
stop slave;
stop slave;
change master to master_user='root',master_password='', master_ssl=0;
change master to master_user='root',master_password='', master_ssl=0;
start slave;
start slave;
drop user replssl@localhost;
drop user replssl@localhost;
drop table t1;
drop table t1;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State #
# 127.0.0.1 root MASTER_MYPORT 1 # # # # # # Yes # 0 0 # # None 0 No MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File #
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File #
Slave_IO_Running #
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 #
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_CA_Path
Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem
Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
mysql-test/r/rpl_ssl_verify_server.result
0 → 100644
View file @
9f2bee02
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
stop slave;
change master to
master_host="localhost",
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',
master_ssl_verify_server_cert=1;
start slave;
create table t1 (t int);
insert into t1 values (1);
on slave
select * from t1;
t
1
show slave status;
Slave_IO_State #
Master_Host localhost
Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File #
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File #
Slave_IO_Running #
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 #
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed Yes
Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_CA_Path
Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem
Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert Yes
drop table t1;
mysql-test/r/rpl_stm_log.result
View file @
9f2bee02
...
@@ -91,8 +91,8 @@ slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
...
@@ -91,8 +91,8 @@ slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
slave-bin.000002 # Query 1 # use `test`; insert into t2 values (1)
slave-bin.000002 # Query 1 # use `test`; insert into t2 values (1)
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 388 # # master-bin.000002 Yes Yes # 0 0 388 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 388 # # master-bin.000002 Yes Yes # 0 0 388 # None 0 No #
No
show binlog events in 'slave-bin.000005' from 4;
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
DROP TABLE t1;
...
...
mysql-test/r/rpl_stm_max_relay_size.result
View file @
9f2bee02
...
@@ -55,6 +55,7 @@ Master_SSL_Cert
...
@@ -55,6 +55,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
#
#
# Test 2
# Test 2
#
#
...
@@ -98,6 +99,7 @@ Master_SSL_Cert
...
@@ -98,6 +99,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
#
#
# Test 3: max_relay_log_size = 0
# Test 3: max_relay_log_size = 0
#
#
...
@@ -141,6 +143,7 @@ Master_SSL_Cert
...
@@ -141,6 +143,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
#
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
#
...
@@ -181,6 +184,7 @@ Master_SSL_Cert
...
@@ -181,6 +184,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
#
#
# Test 5
# Test 5
#
#
...
@@ -222,6 +226,7 @@ Master_SSL_Cert
...
@@ -222,6 +226,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
#
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
#
...
@@ -261,6 +266,7 @@ Master_SSL_Cert
...
@@ -261,6 +266,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
flush logs;
flush logs;
show master status;
show master status;
File master-bin.000002
File master-bin.000002
...
...
mysql-test/r/rpl_stm_reset_slave.result
View file @
9f2bee02
...
@@ -5,21 +5,21 @@ reset slave;
...
@@ -5,21 +5,21 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
start slave;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No #
No
stop slave;
stop slave;
change master to master_user='test';
change master to master_user='test';
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 No No # 0 0 102 # None 0 No #
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 No No # 0 0 102 # None 0 No #
No
reset slave;
reset slave;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No #
No
start slave;
start slave;
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
Master_SSL_Verify_Server_Cert
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No #
No
stop slave;
stop slave;
reset slave;
reset slave;
start slave;
start slave;
...
...
mysql-test/r/rpl_stm_until.result
View file @
9f2bee02
...
@@ -53,6 +53,7 @@ Master_SSL_Cert
...
@@ -53,6 +53,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1;
select * from t1;
n
n
...
@@ -94,6 +95,7 @@ Master_SSL_Cert
...
@@ -94,6 +95,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
select * from t2;
select * from t2;
n
n
...
@@ -133,6 +135,7 @@ Master_SSL_Cert
...
@@ -133,6 +135,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
start slave;
start slave;
stop slave;
stop slave;
start slave until master_log_file='master-bin.000001', master_log_pos=776;
start slave until master_log_file='master-bin.000001', master_log_pos=776;
...
@@ -170,6 +173,7 @@ Master_SSL_Cert
...
@@ -170,6 +173,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Cipher
Master_SSL_Key
Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
start slave until master_log_file='master-bin', master_log_pos=561;
start slave until master_log_file='master-bin', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
...
...
mysql-test/t/rpl_
openssl
.test
→
mysql-test/t/rpl_
ssl1
.test
View file @
9f2bee02
...
@@ -46,7 +46,7 @@ select * from t1;
...
@@ -46,7 +46,7 @@ select * from t1;
#checking show slave status
#checking show slave status
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
$MASTER_MYPORT
MASTER_MYPORT
--
replace_column
1
# 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 #
--
replace_column
1
# 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 #
show
slave
status
;
query_vertical
show
slave
status
;
#checking if replication works without ssl also performing clean up
#checking if replication works without ssl also performing clean up
stop
slave
;
stop
slave
;
...
@@ -60,6 +60,6 @@ connection slave;
...
@@ -60,6 +60,6 @@ connection slave;
sync_with_master
;
sync_with_master
;
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
$MASTER_MYPORT
MASTER_MYPORT
--
replace_column
1
# 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 #
--
replace_column
1
# 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 #
show
slave
status
;
query_vertical
show
slave
status
;
# End of 4.1 tests
# End of 4.1 tests
mysql-test/t/rpl_ssl_verify_server.test
0 → 100644
View file @
9f2bee02
source
include
/
have_openssl
.
inc
;
source
include
/
master
-
slave
.
inc
;
# Start replication with ssl_verify_server_cert turned on
connection
slave
;
stop
slave
;
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
eval
change
master
to
master_host
=
"localhost"
,
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'
,
master_ssl_verify_server_cert
=
1
;
start
slave
;
connection
master
;
create
table
t1
(
t
int
);
insert
into
t1
values
(
1
);
sync_slave_with_master
;
echo
on
slave
;
#checking that replication is ok
select
*
from
t1
;
#checking show slave status
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
$MASTER_MYPORT
MASTER_MYPORT
--
replace_column
1
# 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 #
query_vertical
show
slave
status
;
connection
master
;
drop
table
t1
;
sync_slave_with_master
;
sql/lex.h
View file @
9f2bee02
...
@@ -312,6 +312,7 @@ static SYMBOL symbols[] = {
...
@@ -312,6 +312,7 @@ static SYMBOL symbols[] = {
{
"MASTER_SSL_CERT"
,
SYM
(
MASTER_SSL_CERT_SYM
)},
{
"MASTER_SSL_CERT"
,
SYM
(
MASTER_SSL_CERT_SYM
)},
{
"MASTER_SSL_CIPHER"
,
SYM
(
MASTER_SSL_CIPHER_SYM
)},
{
"MASTER_SSL_CIPHER"
,
SYM
(
MASTER_SSL_CIPHER_SYM
)},
{
"MASTER_SSL_KEY"
,
SYM
(
MASTER_SSL_KEY_SYM
)},
{
"MASTER_SSL_KEY"
,
SYM
(
MASTER_SSL_KEY_SYM
)},
{
"MASTER_SSL_VERIFY_SERVER_CERT"
,
SYM
(
MASTER_SSL_VERIFY_SERVER_CERT_SYM
)},
{
"MASTER_USER"
,
SYM
(
MASTER_USER_SYM
)},
{
"MASTER_USER"
,
SYM
(
MASTER_USER_SYM
)},
{
"MATCH"
,
SYM
(
MATCH
)},
{
"MATCH"
,
SYM
(
MATCH
)},
{
"MAX_CONNECTIONS_PER_HOUR"
,
SYM
(
MAX_CONNECTIONS_PER_HOUR
)},
{
"MAX_CONNECTIONS_PER_HOUR"
,
SYM
(
MAX_CONNECTIONS_PER_HOUR
)},
...
...
sql/repl_failsafe.cc
View file @
9f2bee02
...
@@ -692,12 +692,16 @@ int connect_to_master(THD *thd, MYSQL* mysql, MASTER_INFO* mi)
...
@@ -692,12 +692,16 @@ int connect_to_master(THD *thd, MYSQL* mysql, MASTER_INFO* mi)
#ifdef HAVE_OPENSSL
#ifdef HAVE_OPENSSL
if
(
mi
->
ssl
)
if
(
mi
->
ssl
)
{
mysql_ssl_set
(
mysql
,
mysql_ssl_set
(
mysql
,
mi
->
ssl_key
[
0
]
?
mi
->
ssl_key
:
0
,
mi
->
ssl_key
[
0
]
?
mi
->
ssl_key
:
0
,
mi
->
ssl_cert
[
0
]
?
mi
->
ssl_cert
:
0
,
mi
->
ssl_cert
[
0
]
?
mi
->
ssl_cert
:
0
,
mi
->
ssl_ca
[
0
]
?
mi
->
ssl_ca
:
0
,
mi
->
ssl_ca
[
0
]
?
mi
->
ssl_ca
:
0
,
mi
->
ssl_capath
[
0
]
?
mi
->
ssl_capath
:
0
,
mi
->
ssl_capath
[
0
]
?
mi
->
ssl_capath
:
0
,
mi
->
ssl_cipher
[
0
]
?
mi
->
ssl_cipher
:
0
);
mi
->
ssl_cipher
[
0
]
?
mi
->
ssl_cipher
:
0
);
mysql_options
(
mysql
,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT
,
&
mi
->
ssl_verify_server_cert
);
}
#endif
#endif
mysql_options
(
mysql
,
MYSQL_SET_CHARSET_NAME
,
default_charset_info
->
csname
);
mysql_options
(
mysql
,
MYSQL_SET_CHARSET_NAME
,
default_charset_info
->
csname
);
...
...
sql/rpl_mi.cc
View file @
9f2bee02
...
@@ -29,12 +29,13 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f,
...
@@ -29,12 +29,13 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f,
MASTER_INFO
::
MASTER_INFO
()
MASTER_INFO
::
MASTER_INFO
()
:
ssl
(
0
),
fd
(
-
1
),
io_thd
(
0
),
inited
(
0
),
:
ssl
(
0
),
fd
(
-
1
),
io_thd
(
0
),
inited
(
0
),
abort_slave
(
0
),
slave_running
(
0
),
slave_run_id
(
0
)
abort_slave
(
0
),
slave_running
(
0
),
slave_run_id
(
0
),
ssl_verify_server_cert
(
0
)
{
{
host
[
0
]
=
0
;
user
[
0
]
=
0
;
password
[
0
]
=
0
;
host
[
0
]
=
0
;
user
[
0
]
=
0
;
password
[
0
]
=
0
;
ssl_ca
[
0
]
=
0
;
ssl_capath
[
0
]
=
0
;
ssl_cert
[
0
]
=
0
;
ssl_ca
[
0
]
=
0
;
ssl_capath
[
0
]
=
0
;
ssl_cert
[
0
]
=
0
;
ssl_cipher
[
0
]
=
0
;
ssl_key
[
0
]
=
0
;
ssl_cipher
[
0
]
=
0
;
ssl_key
[
0
]
=
0
;
bzero
((
char
*
)
&
file
,
sizeof
(
file
));
bzero
((
char
*
)
&
file
,
sizeof
(
file
));
pthread_mutex_init
(
&
run_lock
,
MY_MUTEX_INIT_FAST
);
pthread_mutex_init
(
&
run_lock
,
MY_MUTEX_INIT_FAST
);
pthread_mutex_init
(
&
data_lock
,
MY_MUTEX_INIT_FAST
);
pthread_mutex_init
(
&
data_lock
,
MY_MUTEX_INIT_FAST
);
...
@@ -80,12 +81,21 @@ void init_master_info_with_options(MASTER_INFO* mi)
...
@@ -80,12 +81,21 @@ void init_master_info_with_options(MASTER_INFO* mi)
strmake
(
mi
->
ssl_cipher
,
master_ssl_cipher
,
sizeof
(
mi
->
ssl_cipher
)
-
1
);
strmake
(
mi
->
ssl_cipher
,
master_ssl_cipher
,
sizeof
(
mi
->
ssl_cipher
)
-
1
);
if
(
master_ssl_key
)
if
(
master_ssl_key
)
strmake
(
mi
->
ssl_key
,
master_ssl_key
,
sizeof
(
mi
->
ssl_key
)
-
1
);
strmake
(
mi
->
ssl_key
,
master_ssl_key
,
sizeof
(
mi
->
ssl_key
)
-
1
);
/* Intentionally init ssl_verify_server_cert to 0, no option available */
mi
->
ssl_verify_server_cert
=
0
;
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
#define LINES_IN_MASTER_INFO_WITH_SSL 14
enum
{
LINES_IN_MASTER_INFO_WITH_SSL
=
14
,
/* 5.1.16 added value of master_ssl_verify_server_cert */
LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT
=
15
,
/* Number of lines currently used when saving master info file */
LINES_IN_MASTER_INFO
=
LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT
};
int
init_master_info
(
MASTER_INFO
*
mi
,
const
char
*
master_info_fname
,
int
init_master_info
(
MASTER_INFO
*
mi
,
const
char
*
master_info_fname
,
const
char
*
slave_info_fname
,
const
char
*
slave_info_fname
,
...
@@ -184,7 +194,8 @@ file '%s')", fname);
...
@@ -184,7 +194,8 @@ file '%s')", fname);
}
}
mi
->
fd
=
fd
;
mi
->
fd
=
fd
;
int
port
,
connect_retry
,
master_log_pos
,
ssl
=
0
,
lines
;
int
port
,
connect_retry
,
master_log_pos
,
lines
;
int
ssl
=
0
,
ssl_verify_server_cert
=
0
;
char
*
first_non_digit
;
char
*
first_non_digit
;
/*
/*
...
@@ -195,7 +206,8 @@ file '%s')", fname);
...
@@ -195,7 +206,8 @@ file '%s')", fname);
file since versions before 4.1.x could generate files with more
file since versions before 4.1.x could generate files with more
lines than needed.
lines than needed.
If first line doesn't contain a number or contain number less than
If first line doesn't contain a number or contain number less than
14 then such file is treated like file from pre 4.1.1 version.
LINES_IN_MASTER_INFO_WITH_SSL then such file is treated like file
from pre 4.1.1 version.
There is no ambiguity when reading an old master.info, as before
There is no ambiguity when reading an old master.info, as before
4.1.1, the first line contained the binlog's name, which is either
4.1.1, the first line contained the binlog's name, which is either
empty or has an extension (contains a '.'), so can't be confused
empty or has an extension (contains a '.'), so can't be confused
...
@@ -219,7 +231,8 @@ file '%s')", fname);
...
@@ -219,7 +231,8 @@ file '%s')", fname);
if
(
mi
->
master_log_name
[
0
]
!=
'\0'
&&
if
(
mi
->
master_log_name
[
0
]
!=
'\0'
&&
*
first_non_digit
==
'\0'
&&
lines
>=
LINES_IN_MASTER_INFO_WITH_SSL
)
*
first_non_digit
==
'\0'
&&
lines
>=
LINES_IN_MASTER_INFO_WITH_SSL
)
{
// Seems to be new format
{
/* Seems to be new format => read master log name from next line */
if
(
init_strvar_from_file
(
mi
->
master_log_name
,
if
(
init_strvar_from_file
(
mi
->
master_log_name
,
sizeof
(
mi
->
master_log_name
),
&
mi
->
file
,
""
))
sizeof
(
mi
->
master_log_name
),
&
mi
->
file
,
""
))
goto
errwithmsg
;
goto
errwithmsg
;
...
@@ -245,19 +258,31 @@ file '%s')", fname);
...
@@ -245,19 +258,31 @@ file '%s')", fname);
slave will try connect to master, so in this case warning
slave will try connect to master, so in this case warning
is printed.
is printed.
*/
*/
if
(
lines
>=
LINES_IN_MASTER_INFO_WITH_SSL
&&
if
(
lines
>=
LINES_IN_MASTER_INFO_WITH_SSL
)
(
init_intvar_from_file
(
&
ssl
,
&
mi
->
file
,
master_ssl
)
||
{
init_strvar_from_file
(
mi
->
ssl_ca
,
sizeof
(
mi
->
ssl_ca
),
if
(
init_intvar_from_file
(
&
ssl
,
&
mi
->
file
,
master_ssl
)
||
&
mi
->
file
,
master_ssl_ca
)
||
init_strvar_from_file
(
mi
->
ssl_ca
,
sizeof
(
mi
->
ssl_ca
),
init_strvar_from_file
(
mi
->
ssl_capath
,
sizeof
(
mi
->
ssl_capath
),
&
mi
->
file
,
master_ssl_ca
)
||
&
mi
->
file
,
master_ssl_capath
)
||
init_strvar_from_file
(
mi
->
ssl_capath
,
sizeof
(
mi
->
ssl_capath
),
init_strvar_from_file
(
mi
->
ssl_cert
,
sizeof
(
mi
->
ssl_cert
),
&
mi
->
file
,
master_ssl_capath
)
||
&
mi
->
file
,
master_ssl_cert
)
||
init_strvar_from_file
(
mi
->
ssl_cert
,
sizeof
(
mi
->
ssl_cert
),
init_strvar_from_file
(
mi
->
ssl_cipher
,
sizeof
(
mi
->
ssl_cipher
),
&
mi
->
file
,
master_ssl_cert
)
||
&
mi
->
file
,
master_ssl_cipher
)
||
init_strvar_from_file
(
mi
->
ssl_cipher
,
sizeof
(
mi
->
ssl_cipher
),
init_strvar_from_file
(
mi
->
ssl_key
,
sizeof
(
mi
->
ssl_key
),
&
mi
->
file
,
master_ssl_cipher
)
||
&
mi
->
file
,
master_ssl_key
)))
init_strvar_from_file
(
mi
->
ssl_key
,
sizeof
(
mi
->
ssl_key
),
goto
errwithmsg
;
&
mi
->
file
,
master_ssl_key
))
goto
errwithmsg
;
/*
Starting from 5.1.16 ssl_verify_server_cert might be
in the file
*/
if
(
lines
>=
LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT
&&
init_intvar_from_file
(
&
ssl_verify_server_cert
,
&
mi
->
file
,
0
))
goto
errwithmsg
;
}
#ifndef HAVE_OPENSSL
#ifndef HAVE_OPENSSL
if
(
ssl
)
if
(
ssl
)
sql_print_warning
(
"SSL information in the master info file "
sql_print_warning
(
"SSL information in the master info file "
...
@@ -273,6 +298,7 @@ file '%s')", fname);
...
@@ -273,6 +298,7 @@ file '%s')", fname);
mi
->
port
=
(
uint
)
port
;
mi
->
port
=
(
uint
)
port
;
mi
->
connect_retry
=
(
uint
)
connect_retry
;
mi
->
connect_retry
=
(
uint
)
connect_retry
;
mi
->
ssl
=
(
my_bool
)
ssl
;
mi
->
ssl
=
(
my_bool
)
ssl
;
mi
->
ssl_verify_server_cert
=
ssl_verify_server_cert
;
}
}
DBUG_PRINT
(
"master_info"
,(
"log_file_name: %s position: %ld"
,
DBUG_PRINT
(
"master_info"
,(
"log_file_name: %s position: %ld"
,
mi
->
master_log_name
,
mi
->
master_log_name
,
...
@@ -315,6 +341,7 @@ int flush_master_info(MASTER_INFO* mi, bool flush_relay_log_cache)
...
@@ -315,6 +341,7 @@ int flush_master_info(MASTER_INFO* mi, bool flush_relay_log_cache)
{
{
IO_CACHE
*
file
=
&
mi
->
file
;
IO_CACHE
*
file
=
&
mi
->
file
;
char
lbuf
[
22
];
char
lbuf
[
22
];
DBUG_ENTER
(
"flush_master_info"
);
DBUG_ENTER
(
"flush_master_info"
);
DBUG_PRINT
(
"enter"
,(
"master_pos: %ld"
,
(
long
)
mi
->
master_log_pos
));
DBUG_PRINT
(
"enter"
,(
"master_pos: %ld"
,
(
long
)
mi
->
master_log_pos
));
...
@@ -352,13 +379,14 @@ int flush_master_info(MASTER_INFO* mi, bool flush_relay_log_cache)
...
@@ -352,13 +379,14 @@ int flush_master_info(MASTER_INFO* mi, bool flush_relay_log_cache)
*/
*/
my_b_seek
(
file
,
0L
);
my_b_seek
(
file
,
0L
);
my_b_printf
(
file
,
"%u
\n
%s
\n
%s
\n
%s
\n
%s
\n
%s
\n
%d
\n
%d
\n
%d
\n
%s
\n
%s
\n
%s
\n
%s
\n
%s
\n
"
,
my_b_printf
(
file
,
LINES_IN_MASTER_INFO_WITH_SSL
,
"%u
\n
%s
\n
%s
\n
%s
\n
%s
\n
%s
\n
%d
\n
%d
\n
%d
\n
%s
\n
%s
\n
%s
\n
%s
\n
%s
\n
%d
\n
"
,
LINES_IN_MASTER_INFO
,
mi
->
master_log_name
,
llstr
(
mi
->
master_log_pos
,
lbuf
),
mi
->
master_log_name
,
llstr
(
mi
->
master_log_pos
,
lbuf
),
mi
->
host
,
mi
->
user
,
mi
->
host
,
mi
->
user
,
mi
->
password
,
mi
->
port
,
mi
->
connect_retry
,
mi
->
password
,
mi
->
port
,
mi
->
connect_retry
,
(
int
)(
mi
->
ssl
),
mi
->
ssl_ca
,
mi
->
ssl_capath
,
mi
->
ssl_cert
,
(
int
)(
mi
->
ssl
),
mi
->
ssl_ca
,
mi
->
ssl_capath
,
mi
->
ssl_cert
,
mi
->
ssl_cipher
,
mi
->
ssl_key
);
mi
->
ssl_cipher
,
mi
->
ssl_key
,
mi
->
ssl_verify_server_cert
);
DBUG_RETURN
(
-
flush_io_cache
(
file
));
DBUG_RETURN
(
-
flush_io_cache
(
file
));
}
}
...
...
sql/rpl_mi.h
View file @
9f2bee02
...
@@ -65,6 +65,7 @@ class MASTER_INFO
...
@@ -65,6 +65,7 @@ class MASTER_INFO
my_bool
ssl
;
// enables use of SSL connection if true
my_bool
ssl
;
// enables use of SSL connection if true
char
ssl_ca
[
FN_REFLEN
],
ssl_capath
[
FN_REFLEN
],
ssl_cert
[
FN_REFLEN
];
char
ssl_ca
[
FN_REFLEN
],
ssl_capath
[
FN_REFLEN
],
ssl_cert
[
FN_REFLEN
];
char
ssl_cipher
[
FN_REFLEN
],
ssl_key
[
FN_REFLEN
];
char
ssl_cipher
[
FN_REFLEN
],
ssl_key
[
FN_REFLEN
];
my_bool
ssl_verify_server_cert
;
my_off_t
master_log_pos
;
my_off_t
master_log_pos
;
File
fd
;
// we keep the file open, so we need to remember the file pointer
File
fd
;
// we keep the file open, so we need to remember the file pointer
...
...
sql/slave.cc
View file @
9f2bee02
...
@@ -1252,6 +1252,8 @@ bool show_master_info(THD* thd, MASTER_INFO* mi)
...
@@ -1252,6 +1252,8 @@ bool show_master_info(THD* thd, MASTER_INFO* mi)
sizeof
(
mi
->
ssl_key
)));
sizeof
(
mi
->
ssl_key
)));
field_list
.
push_back
(
new
Item_return_int
(
"Seconds_Behind_Master"
,
10
,
field_list
.
push_back
(
new
Item_return_int
(
"Seconds_Behind_Master"
,
10
,
MYSQL_TYPE_LONGLONG
));
MYSQL_TYPE_LONGLONG
));
field_list
.
push_back
(
new
Item_empty_string
(
"Master_SSL_Verify_Server_Cert"
,
3
));
if
(
protocol
->
send_fields
(
&
field_list
,
if
(
protocol
->
send_fields
(
&
field_list
,
Protocol
::
SEND_NUM_ROWS
|
Protocol
::
SEND_EOF
))
Protocol
::
SEND_NUM_ROWS
|
Protocol
::
SEND_EOF
))
...
@@ -1358,7 +1360,10 @@ bool show_master_info(THD* thd, MASTER_INFO* mi)
...
@@ -1358,7 +1360,10 @@ bool show_master_info(THD* thd, MASTER_INFO* mi)
max
(
0
,
time_diff
)
:
0
));
max
(
0
,
time_diff
)
:
0
));
}
}
else
else
{
protocol
->
store_null
();
protocol
->
store_null
();
}
protocol
->
store
(
mi
->
ssl_verify_server_cert
?
"Yes"
:
"No"
,
&
my_charset_bin
);
pthread_mutex_unlock
(
&
mi
->
rli
.
data_lock
);
pthread_mutex_unlock
(
&
mi
->
rli
.
data_lock
);
pthread_mutex_unlock
(
&
mi
->
data_lock
);
pthread_mutex_unlock
(
&
mi
->
data_lock
);
...
@@ -3099,12 +3104,16 @@ static int connect_to_master(THD* thd, MYSQL* mysql, MASTER_INFO* mi,
...
@@ -3099,12 +3104,16 @@ static int connect_to_master(THD* thd, MYSQL* mysql, MASTER_INFO* mi,
#ifdef HAVE_OPENSSL
#ifdef HAVE_OPENSSL
if
(
mi
->
ssl
)
if
(
mi
->
ssl
)
{
mysql_ssl_set
(
mysql
,
mysql_ssl_set
(
mysql
,
mi
->
ssl_key
[
0
]
?
mi
->
ssl_key
:
0
,
mi
->
ssl_key
[
0
]
?
mi
->
ssl_key
:
0
,
mi
->
ssl_cert
[
0
]
?
mi
->
ssl_cert
:
0
,
mi
->
ssl_cert
[
0
]
?
mi
->
ssl_cert
:
0
,
mi
->
ssl_ca
[
0
]
?
mi
->
ssl_ca
:
0
,
mi
->
ssl_ca
[
0
]
?
mi
->
ssl_ca
:
0
,
mi
->
ssl_capath
[
0
]
?
mi
->
ssl_capath
:
0
,
mi
->
ssl_capath
[
0
]
?
mi
->
ssl_capath
:
0
,
mi
->
ssl_cipher
[
0
]
?
mi
->
ssl_cipher
:
0
);
mi
->
ssl_cipher
[
0
]
?
mi
->
ssl_cipher
:
0
);
mysql_options
(
mysql
,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT
,
&
mi
->
ssl_verify_server_cert
);
}
#endif
#endif
mysql_options
(
mysql
,
MYSQL_SET_CHARSET_NAME
,
default_charset_info
->
csname
);
mysql_options
(
mysql
,
MYSQL_SET_CHARSET_NAME
,
default_charset_info
->
csname
);
...
...
sql/sql_lex.h
View file @
9f2bee02
...
@@ -188,12 +188,12 @@ typedef struct st_lex_master_info
...
@@ -188,12 +188,12 @@ typedef struct st_lex_master_info
uint
port
,
connect_retry
;
uint
port
,
connect_retry
;
ulonglong
pos
;
ulonglong
pos
;
ulong
server_id
;
ulong
server_id
;
/*
/*
Variable for MASTER_SSL option.
Enum is used for making it possible to detect if the user
MASTER_SSL=0 in CHANGE MASTER TO corresponds to SSL_DISABLE
changed variable or if it should be left at old value
MASTER_SSL=1 corresponds to SSL_ENABLE
*/
*/
enum
{
SSL_UNCHANGED
,
SSL_DISABLE
,
SSL_ENABLE
}
enum
{
SSL_UNCHANGED
=
0
,
SSL_DISABLE
,
SSL_ENABLE
}
ssl
;
ssl
,
ssl_verify_server_cert
;
char
*
ssl_key
,
*
ssl_cert
,
*
ssl_ca
,
*
ssl_capath
,
*
ssl_cipher
;
char
*
ssl_key
,
*
ssl_cert
,
*
ssl_ca
,
*
ssl_capath
,
*
ssl_cipher
;
char
*
relay_log_name
;
char
*
relay_log_name
;
ulong
relay_log_pos
;
ulong
relay_log_pos
;
...
...
sql/sql_repl.cc
View file @
9f2bee02
...
@@ -1130,6 +1130,11 @@ bool change_master(THD* thd, MASTER_INFO* mi)
...
@@ -1130,6 +1130,11 @@ bool change_master(THD* thd, MASTER_INFO* mi)
if
(
lex_mi
->
ssl
!=
LEX_MASTER_INFO
::
SSL_UNCHANGED
)
if
(
lex_mi
->
ssl
!=
LEX_MASTER_INFO
::
SSL_UNCHANGED
)
mi
->
ssl
=
(
lex_mi
->
ssl
==
LEX_MASTER_INFO
::
SSL_ENABLE
);
mi
->
ssl
=
(
lex_mi
->
ssl
==
LEX_MASTER_INFO
::
SSL_ENABLE
);
if
(
lex_mi
->
ssl_verify_server_cert
!=
LEX_MASTER_INFO
::
SSL_UNCHANGED
)
mi
->
ssl_verify_server_cert
=
(
lex_mi
->
ssl_verify_server_cert
==
LEX_MASTER_INFO
::
SSL_ENABLE
);
if
(
lex_mi
->
ssl_ca
)
if
(
lex_mi
->
ssl_ca
)
strmake
(
mi
->
ssl_ca
,
lex_mi
->
ssl_ca
,
sizeof
(
mi
->
ssl_ca
)
-
1
);
strmake
(
mi
->
ssl_ca
,
lex_mi
->
ssl_ca
,
sizeof
(
mi
->
ssl_ca
)
-
1
);
if
(
lex_mi
->
ssl_capath
)
if
(
lex_mi
->
ssl_capath
)
...
@@ -1142,7 +1147,8 @@ bool change_master(THD* thd, MASTER_INFO* mi)
...
@@ -1142,7 +1147,8 @@ bool change_master(THD* thd, MASTER_INFO* mi)
strmake
(
mi
->
ssl_key
,
lex_mi
->
ssl_key
,
sizeof
(
mi
->
ssl_key
)
-
1
);
strmake
(
mi
->
ssl_key
,
lex_mi
->
ssl_key
,
sizeof
(
mi
->
ssl_key
)
-
1
);
#ifndef HAVE_OPENSSL
#ifndef HAVE_OPENSSL
if
(
lex_mi
->
ssl
||
lex_mi
->
ssl_ca
||
lex_mi
->
ssl_capath
||
if
(
lex_mi
->
ssl
||
lex_mi
->
ssl_ca
||
lex_mi
->
ssl_capath
||
lex_mi
->
ssl_cert
||
lex_mi
->
ssl_cipher
||
lex_mi
->
ssl_key
)
lex_mi
->
ssl_cert
||
lex_mi
->
ssl_cipher
||
lex_mi
->
ssl_key
||
lex_mi
->
ssl_verify_server_cert
)
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_SLAVE_IGNORED_SSL_PARAMS
,
ER
(
ER_SLAVE_IGNORED_SSL_PARAMS
));
ER_SLAVE_IGNORED_SSL_PARAMS
,
ER
(
ER_SLAVE_IGNORED_SSL_PARAMS
));
#endif
#endif
...
...
sql/sql_yacc.yy
View file @
9f2bee02
...
@@ -780,6 +780,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
...
@@ -780,6 +780,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token MASTER_SSL_CIPHER_SYM
%token MASTER_SSL_CIPHER_SYM
%token MASTER_SSL_KEY_SYM
%token MASTER_SSL_KEY_SYM
%token MASTER_SSL_SYM
%token MASTER_SSL_SYM
%token MASTER_SSL_VERIFY_SERVER_CERT_SYM
%token MASTER_SYM
%token MASTER_SYM
%token MASTER_USER_SYM
%token MASTER_USER_SYM
%token MATCH /* SQL-2003-R */
%token MATCH /* SQL-2003-R */
...
@@ -1528,6 +1529,11 @@ master_def:
...
@@ -1528,6 +1529,11 @@ master_def:
{
{
Lex->mi.ssl_key= $3.str;
Lex->mi.ssl_key= $3.str;
}
}
| MASTER_SSL_VERIFY_SERVER_CERT_SYM EQ ulong_num
{
Lex->mi.ssl_verify_server_cert= $3 ?
LEX_MASTER_INFO::SSL_ENABLE : LEX_MASTER_INFO::SSL_DISABLE;
}
|
|
master_file_def
master_file_def
;
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment