mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge 10.0 -> 10.1.
Conflicts: mysql-test/suite/multi_source/multisource.result sql/sql_base.cc
This commit is contained in:
@ -9,15 +9,36 @@ master_user='root';
|
||||
start slave 'master1';
|
||||
set default_master_connection = 'master1';
|
||||
include/wait_for_slave_to_start.inc
|
||||
show slave 'master1' 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 Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode
|
||||
Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No conservative
|
||||
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 Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode
|
||||
Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No conservative
|
||||
show all slaves status;
|
||||
Connection_name Slave_SQL_State 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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
|
||||
master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No conservative 0 1073741824 7 0 60.000
|
||||
#
|
||||
# Checking SHOW SLAVE 'master1' STATUS
|
||||
#
|
||||
Master_Port = 'MYPORT_1'
|
||||
Relay_Log_File = 'mysqld-relay-bin-master1.000002'
|
||||
Slave_IO_Running = 'Yes'
|
||||
Slave_SQL_Running = 'Yes'
|
||||
Last_Errno = '0'
|
||||
Last_SQL_Errno = '0'
|
||||
#
|
||||
# Checking SHOW SLAVE STATUS
|
||||
#
|
||||
Master_Port = 'MYPORT_1'
|
||||
Relay_Log_File = 'mysqld-relay-bin-master1.000002'
|
||||
Slave_IO_Running = 'Yes'
|
||||
Slave_SQL_Running = 'Yes'
|
||||
Last_Errno = '0'
|
||||
Last_SQL_Errno = '0'
|
||||
#
|
||||
# Checking SHOW ALL SLAVES STATUS
|
||||
#
|
||||
Connection_name = 'master1'
|
||||
Master_Port = 'MYPORT_1'
|
||||
Relay_Log_File = 'mysqld-relay-bin-master1.000002'
|
||||
Slave_IO_Running = 'Yes'
|
||||
Slave_SQL_Running = 'Yes'
|
||||
Last_Errno = '0'
|
||||
Last_SQL_Errno = '0'
|
||||
Slave_heartbeat_period = '60.000'
|
||||
#
|
||||
drop database if exists db1;
|
||||
create database db1;
|
||||
use db1;
|
||||
@ -74,10 +95,26 @@ master_host='127.0.0.1',
|
||||
master_user='root';
|
||||
start slave;
|
||||
include/wait_for_slave_to_start.inc
|
||||
show all slaves status;
|
||||
Connection_name Slave_SQL_State 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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
|
||||
Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin.000002 601 master-bin.000001 Yes Yes 0 0 313 899 None 0 No 0 No 0 0 2 No conservative 0 1073741824 7 0 60.000 0-1-4
|
||||
master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 988 mysqld-relay-bin-master1.000002 1276 master-bin.000001 Yes Yes 0 0 988 1582 None 0 No 0 No 0 0 1 No conservative 0 1073741824 17 0 60.000 0-1-4
|
||||
#
|
||||
# Checking SHOW ALL SLAVES STATUS
|
||||
#
|
||||
Connection_name = ''
|
||||
Connection_name = 'master1'
|
||||
Master_Port = 'MYPORT_2'
|
||||
Master_Port = 'MYPORT_1'
|
||||
Relay_Log_File = 'mysqld-relay-bin.000002'
|
||||
Relay_Log_File = 'mysqld-relay-bin-master1.000002'
|
||||
Slave_IO_Running = 'Yes'
|
||||
Slave_IO_Running = 'Yes'
|
||||
Slave_SQL_Running = 'Yes'
|
||||
Slave_SQL_Running = 'Yes'
|
||||
Last_Errno = '0'
|
||||
Last_Errno = '0'
|
||||
Last_SQL_Errno = '0'
|
||||
Last_SQL_Errno = '0'
|
||||
Slave_heartbeat_period = '60.000'
|
||||
Slave_heartbeat_period = '60.000'
|
||||
#
|
||||
insert into t1 (f1) values ('three');
|
||||
drop database if exists db2;
|
||||
create database db2;
|
||||
@ -104,10 +141,26 @@ Log_name File_size
|
||||
master-bin.000002 367
|
||||
insert into t1 (f1) values ('four');
|
||||
create table db1.t3 (f1 int) engine=InnoDB;
|
||||
show all slaves status;
|
||||
Connection_name Slave_SQL_State 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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
|
||||
Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 921 mysqld-relay-bin.000002 1209 master-bin.000001 Yes Yes 0 0 921 1507 None 0 No 0 No 0 0 2 No conservative 0 1073741824 17 0 60.000 0-1-7
|
||||
master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000002 740 mysqld-relay-bin-master1.000004 1028 master-bin.000002 Yes Yes 0 0 740 1378 None 0 No 0 No 0 0 1 No conservative 0 1073741824 37 0 60.000 0-1-7
|
||||
#
|
||||
# Checking SHOW ALL SLAVES STATUS
|
||||
#
|
||||
Connection_name = ''
|
||||
Connection_name = 'master1'
|
||||
Master_Port = 'MYPORT_2'
|
||||
Master_Port = 'MYPORT_1'
|
||||
Relay_Log_File = 'mysqld-relay-bin.000002'
|
||||
Relay_Log_File = 'mysqld-relay-bin-master1.000004'
|
||||
Slave_IO_Running = 'Yes'
|
||||
Slave_IO_Running = 'Yes'
|
||||
Slave_SQL_Running = 'Yes'
|
||||
Slave_SQL_Running = 'Yes'
|
||||
Last_Errno = '0'
|
||||
Last_Errno = '0'
|
||||
Last_SQL_Errno = '0'
|
||||
Last_SQL_Errno = '0'
|
||||
Slave_heartbeat_period = '60.000'
|
||||
Slave_heartbeat_period = '60.000'
|
||||
#
|
||||
select * from db1.t1;
|
||||
i f1
|
||||
1 one
|
||||
|
@ -49,12 +49,28 @@ let $field= Slave_IO_State;
|
||||
let $condition= = 'Waiting for master to send event';
|
||||
--source include/wait_show_condition.inc
|
||||
|
||||
--replace_result $SERVER_MYPORT_1 MYPORT_1
|
||||
show slave 'master1' status;
|
||||
--replace_result $SERVER_MYPORT_1 MYPORT_1
|
||||
show slave status;
|
||||
--replace_result $SERVER_MYPORT_1 MYPORT_1
|
||||
show all slaves status;
|
||||
--echo #
|
||||
--echo # Checking SHOW SLAVE 'master1' STATUS
|
||||
--echo #
|
||||
--let $status_items= Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno
|
||||
--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/
|
||||
--let $slave_name= 'master1'
|
||||
--source include/show_slave_status.inc
|
||||
--let $slave_name=
|
||||
|
||||
--echo #
|
||||
--echo # Checking SHOW SLAVE STATUS
|
||||
--echo #
|
||||
--source include/show_slave_status.inc
|
||||
|
||||
--echo #
|
||||
--echo # Checking SHOW ALL SLAVES STATUS
|
||||
--echo #
|
||||
--let $all_slaves_status= 1
|
||||
--let $status_items= Connection_name, Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno, Slave_heartbeat_period
|
||||
--source include/show_slave_status.inc
|
||||
--let $all_slaves_status=
|
||||
--echo #
|
||||
|
||||
|
||||
# Check that replication actually works
|
||||
@ -144,8 +160,15 @@ let $field= Slave_IO_State;
|
||||
let $condition= = 'Waiting for master to send event';
|
||||
--source include/wait_show_condition.inc
|
||||
|
||||
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2
|
||||
show all slaves status;
|
||||
--echo #
|
||||
--echo # Checking SHOW ALL SLAVES STATUS
|
||||
--echo #
|
||||
--let $all_slaves_status= 1
|
||||
--let $status_items= Connection_name, Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno, Slave_heartbeat_period
|
||||
--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/ /$SERVER_MYPORT_2/MYPORT_2/
|
||||
--source include/show_slave_status.inc
|
||||
--let $all_slaves_status=
|
||||
--echo #
|
||||
|
||||
# Check that replication from two servers actually works
|
||||
|
||||
@ -214,8 +237,15 @@ let $field= Slave_IO_State;
|
||||
let $condition= = 'Waiting for master to send event';
|
||||
--source include/wait_show_condition.inc
|
||||
|
||||
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2
|
||||
show all slaves status;
|
||||
--echo #
|
||||
--echo # Checking SHOW ALL SLAVES STATUS
|
||||
--echo #
|
||||
--let $all_slaves_status= 1
|
||||
--let $status_items= Connection_name, Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno, Slave_heartbeat_period
|
||||
--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/ /$SERVER_MYPORT_2/MYPORT_2/
|
||||
--source include/show_slave_status.inc
|
||||
--let $all_slaves_status=
|
||||
--echo #
|
||||
|
||||
--sorted_result
|
||||
select * from db1.t1;
|
||||
|
Reference in New Issue
Block a user