mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-6676: Optimistic parallel replication
Adjust the configuration options, as discussed on the maria-developers@ mailing list. The option to hint a transaction to not be replicated in parallel is now called @@skip_parallel_replication, consistent with @@skip_replication. And the --slave-parallel-mode is now simplified to have just one of the following values: none minimal conservative optimistic aggressive This reflects successively harder efforts to find opportunities to run things in parallel on the slave. It allows to extend the server with more automatic heuristics in the future without having to introduce a new configuration option for each and every one.
This commit is contained in:
@ -66,7 +66,7 @@ if ($tmp)
|
|||||||
--echo Gtid_IO_Pos #
|
--echo Gtid_IO_Pos #
|
||||||
--echo Replicate_Do_Domain_Ids
|
--echo Replicate_Do_Domain_Ids
|
||||||
--echo Replicate_Ignore_Domain_Ids
|
--echo Replicate_Ignore_Domain_Ids
|
||||||
--echo Parallel_Mode domain,follow_master_commit
|
--echo Parallel_Mode conservative
|
||||||
}
|
}
|
||||||
if (!$tmp) {
|
if (!$tmp) {
|
||||||
# Note: after WL#5177, fields 13-18 shall not be filtered-out.
|
# Note: after WL#5177, fields 13-18 shall not be filtered-out.
|
||||||
|
@ -922,15 +922,14 @@ The following options may be given as the first argument:
|
|||||||
replication. Only used when --slave-parallel-threads > 0.
|
replication. Only used when --slave-parallel-threads > 0.
|
||||||
--slave-parallel-mode=name
|
--slave-parallel-mode=name
|
||||||
Controls what transactions are applied in parallel when
|
Controls what transactions are applied in parallel when
|
||||||
using --slave-parallel-threads. Syntax:
|
using --slave-parallel-threads. Possible values:
|
||||||
slave_parallel_mode=value[,value...], where "value" could
|
"optimistic" tries to apply most transactional DML in
|
||||||
be one or more of: "domain", to apply different
|
parallel, and handles any conflicts with rollback and
|
||||||
replication domains in parallel; "follow_master_commit",
|
retry. "conservative" limits parallelism in an effort to
|
||||||
to apply in parallel transactions that group-committed
|
avoid any conflicts. "aggressive" tries to maximise the
|
||||||
together on the master; "transactional", to
|
parallelism, possibly at the cost of increased conflict
|
||||||
optimistically try to apply all transactional DML in
|
rate. "minimal" only parallelizes the commit steps of
|
||||||
parallel; and "waiting" to extend "transactional" to even
|
transactions. "none" disables parallel apply completely.
|
||||||
transactions that had to wait on the master.
|
|
||||||
--slave-parallel-threads=#
|
--slave-parallel-threads=#
|
||||||
If non-zero, number of threads to spawn to apply in
|
If non-zero, number of threads to spawn to apply in
|
||||||
parallel events on the slave that were group-committed on
|
parallel events on the slave that were group-committed on
|
||||||
@ -1351,7 +1350,7 @@ slave-exec-mode STRICT
|
|||||||
slave-max-allowed-packet 1073741824
|
slave-max-allowed-packet 1073741824
|
||||||
slave-net-timeout 3600
|
slave-net-timeout 3600
|
||||||
slave-parallel-max-queued 131072
|
slave-parallel-max-queued 131072
|
||||||
slave-parallel-mode domain,follow_master_commit
|
slave-parallel-mode conservative
|
||||||
slave-parallel-threads 0
|
slave-parallel-threads 0
|
||||||
slave-run-triggers-for-rbr NO
|
slave-run-triggers-for-rbr NO
|
||||||
slave-skip-errors (No default value)
|
slave-skip-errors (No default value)
|
||||||
|
@ -341,7 +341,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
|
@ -2258,7 +2258,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -3892,7 +3892,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -4271,7 +4271,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -4850,7 +4850,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
|
@ -2258,7 +2258,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -3915,7 +3915,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -4300,7 +4300,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -4889,7 +4889,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
|
@ -137,7 +137,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
|
@ -81,7 +81,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -334,7 +334,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -506,7 +506,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -749,7 +749,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -1002,7 +1002,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -1174,7 +1174,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
|
@ -41,7 +41,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
@ -253,7 +253,7 @@ ROLLBACK/*!*/;
|
|||||||
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
|
||||||
# at #
|
# at #
|
||||||
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
|
||||||
/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/;
|
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||||
|
@ -85,16 +85,16 @@ MASTER 2.2
|
|||||||
#
|
#
|
||||||
show all slaves status;
|
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
|
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_1 60 master-bin.000001 313 relay.000002 601 master-bin.000001 Yes Yes 0 0 313 888 None 0 No 0 No 0 0 1 No domain,follow_master_commit 0 1073741824 7 0 60.000
|
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 relay.000002 601 master-bin.000001 Yes Yes 0 0 313 888 None 0 No 0 No 0 0 1 No conservative 0 1073741824 7 0 60.000
|
||||||
MASTER 2.2 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 relay-master@00202@002e2.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 7 0 60.000
|
MASTER 2.2 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 relay-master@00202@002e2.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 2 No conservative 0 1073741824 7 0 60.000
|
||||||
include/wait_for_slave_to_start.inc
|
include/wait_for_slave_to_start.inc
|
||||||
set default_master_connection = 'MASTER 2.2';
|
set default_master_connection = 'MASTER 2.2';
|
||||||
include/wait_for_slave_to_start.inc
|
include/wait_for_slave_to_start.inc
|
||||||
set default_master_connection = '';
|
set default_master_connection = '';
|
||||||
show all slaves status;
|
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
|
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_1 60 master-bin.000001 313 relay.000004 536 master-bin.000001 Yes Yes 0 0 313 823 None 0 No 0 No 0 0 1 No domain,follow_master_commit 0 1073741824 6 0 60.000
|
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 relay.000004 536 master-bin.000001 Yes Yes 0 0 313 823 None 0 No 0 No 0 0 1 No conservative 0 1073741824 6 0 60.000
|
||||||
MASTER 2.2 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 relay-master@00202@002e2.000004 536 master-bin.000001 Yes Yes 0 0 313 842 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 6 0 60.000
|
MASTER 2.2 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 relay-master@00202@002e2.000004 536 master-bin.000001 Yes Yes 0 0 313 842 None 0 No 0 No 0 0 2 No conservative 0 1073741824 6 0 60.000
|
||||||
#
|
#
|
||||||
# List of files matching '*info*' pattern
|
# List of files matching '*info*' pattern
|
||||||
# after slave server restart
|
# after slave server restart
|
||||||
|
@ -11,13 +11,13 @@ set default_master_connection = 'master1';
|
|||||||
include/wait_for_slave_to_start.inc
|
include/wait_for_slave_to_start.inc
|
||||||
show slave 'master1' status;
|
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
|
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 domain,follow_master_commit
|
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;
|
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
|
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 domain,follow_master_commit
|
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;
|
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
|
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 domain,follow_master_commit 0 1073741824 7 0 60.000
|
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
|
||||||
drop database if exists db1;
|
drop database if exists db1;
|
||||||
create database db1;
|
create database db1;
|
||||||
use db1;
|
use db1;
|
||||||
@ -76,8 +76,8 @@ start slave;
|
|||||||
include/wait_for_slave_to_start.inc
|
include/wait_for_slave_to_start.inc
|
||||||
show all slaves status;
|
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
|
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 domain,follow_master_commit 0 1073741824 7 0 60.000 0-1-4
|
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 domain,follow_master_commit 0 1073741824 17 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
|
||||||
insert into t1 (f1) values ('three');
|
insert into t1 (f1) values ('three');
|
||||||
drop database if exists db2;
|
drop database if exists db2;
|
||||||
create database db2;
|
create database db2;
|
||||||
@ -106,8 +106,8 @@ insert into t1 (f1) values ('four');
|
|||||||
create table db1.t3 (f1 int) engine=InnoDB;
|
create table db1.t3 (f1 int) engine=InnoDB;
|
||||||
show all slaves status;
|
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
|
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 domain,follow_master_commit 0 1073741824 17 0 60.000 0-1-7
|
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 domain,follow_master_commit 0 1073741824 37 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
|
||||||
select * from db1.t1;
|
select * from db1.t1;
|
||||||
i f1
|
i f1
|
||||||
1 one
|
1 one
|
||||||
|
@ -11,14 +11,14 @@ insert into t1 values (1),(2);
|
|||||||
stop slave 'master1';
|
stop slave 'master1';
|
||||||
show slave 'master1' status;
|
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
|
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
|
||||||
127.0.0.1 root MYPORT_1 60 master-bin.000001 802 mysqld-relay-bin-master1.000002 1090 master-bin.000001 No No 0 0 802 1396 None 0 No NULL No 0 0 1 No domain,follow_master_commit
|
127.0.0.1 root MYPORT_1 60 master-bin.000001 802 mysqld-relay-bin-master1.000002 1090 master-bin.000001 No No 0 0 802 1396 None 0 No NULL No 0 0 1 No conservative
|
||||||
mysqld-relay-bin-master1.000001
|
mysqld-relay-bin-master1.000001
|
||||||
mysqld-relay-bin-master1.000002
|
mysqld-relay-bin-master1.000002
|
||||||
mysqld-relay-bin-master1.index
|
mysqld-relay-bin-master1.index
|
||||||
reset slave 'master1';
|
reset slave 'master1';
|
||||||
show slave 'master1' status;
|
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
|
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
|
||||||
127.0.0.1 root MYPORT_1 60 4 1090 No No 0 0 0 1396 None 0 No NULL No 0 0 1 No domain,follow_master_commit
|
127.0.0.1 root MYPORT_1 60 4 1090 No No 0 0 0 1396 None 0 No NULL No 0 0 1 No conservative
|
||||||
reset slave 'master1' all;
|
reset slave 'master1' all;
|
||||||
show slave 'master1' status;
|
show slave 'master1' status;
|
||||||
ERROR HY000: There is no master connection 'master1'
|
ERROR HY000: There is no master connection 'master1'
|
||||||
|
@ -11,8 +11,8 @@ include/wait_for_slave_to_start.inc
|
|||||||
set default_master_connection = '';
|
set default_master_connection = '';
|
||||||
show all slaves status;
|
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
|
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
|
||||||
slave1 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-slave1.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 1 No domain,follow_master_commit 0 1073741824 7 0 60.000
|
slave1 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-slave1.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 1 No conservative 0 1073741824 7 0 60.000
|
||||||
slave2 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-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 7 0 60.000
|
slave2 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-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No conservative 0 1073741824 7 0 60.000
|
||||||
start all slaves;
|
start all slaves;
|
||||||
stop slave 'slave1';
|
stop slave 'slave1';
|
||||||
show slave 'slave1' status;
|
show slave 'slave1' status;
|
||||||
@ -62,22 +62,22 @@ Using_Gtid No
|
|||||||
Gtid_IO_Pos
|
Gtid_IO_Pos
|
||||||
Replicate_Do_Domain_Ids
|
Replicate_Do_Domain_Ids
|
||||||
Replicate_Ignore_Domain_Ids
|
Replicate_Ignore_Domain_Ids
|
||||||
Parallel_Mode domain,follow_master_commit
|
Parallel_Mode conservative
|
||||||
reset slave 'slave1';
|
reset slave 'slave1';
|
||||||
show all slaves status;
|
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
|
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
|
||||||
slave1 127.0.0.1 root MYPORT_1 60 4 601 No No 0 0 0 906 None 0 No NULL No 0 0 1 No domain,follow_master_commit 0 1073741824 7 0 60.000
|
slave1 127.0.0.1 root MYPORT_1 60 4 601 No No 0 0 0 906 None 0 No NULL No 0 0 1 No conservative 0 1073741824 7 0 60.000
|
||||||
slave2 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-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 7 0 60.000
|
slave2 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-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No conservative 0 1073741824 7 0 60.000
|
||||||
reset slave 'slave1' all;
|
reset slave 'slave1' all;
|
||||||
show all slaves status;
|
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
|
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
|
||||||
slave2 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-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 7 0 60.000
|
slave2 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-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No conservative 0 1073741824 7 0 60.000
|
||||||
stop all slaves;
|
stop all slaves;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1938 SLAVE 'slave2' stopped
|
Note 1938 SLAVE 'slave2' stopped
|
||||||
show all slaves status;
|
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
|
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
|
||||||
slave2 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 No No 0 0 313 906 None 0 No NULL No 0 0 2 No domain,follow_master_commit 0 1073741824 7 0 60.000
|
slave2 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 No No 0 0 313 906 None 0 No NULL No 0 0 2 No conservative 0 1073741824 7 0 60.000
|
||||||
stop all slaves;
|
stop all slaves;
|
||||||
include/reset_master_slave.inc
|
include/reset_master_slave.inc
|
||||||
include/reset_master_slave.inc
|
include/reset_master_slave.inc
|
||||||
|
@ -1138,18 +1138,16 @@ SET GLOBAL slave_parallel_threads=0;
|
|||||||
SET GLOBAL slave_parallel_threads=10;
|
SET GLOBAL slave_parallel_threads=10;
|
||||||
include/start_slave.inc
|
include/start_slave.inc
|
||||||
*** MDEV-6676 - test syntax of @@slave_parallel_mode ***
|
*** MDEV-6676 - test syntax of @@slave_parallel_mode ***
|
||||||
Parallel_Mode = 'domain,follow_master_commit'
|
Parallel_Mode = 'conservative'
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
SET GLOBAL slave_parallel_mode='domain,follow_master_commit,transactional';
|
SET GLOBAL slave_parallel_mode='aggressive';
|
||||||
ERROR HY000: Invalid use of 'transactional' option for slave_parallel_mode
|
Parallel_Mode = 'aggressive'
|
||||||
SET GLOBAL slave_parallel_mode='waiting,transactional,domain';
|
SET GLOBAL slave_parallel_mode='conservative';
|
||||||
Parallel_Mode = 'domain,transactional,waiting'
|
Parallel_Mode = 'conservative'
|
||||||
SET GLOBAL slave_parallel_mode='domain,follow_master_commit';
|
|
||||||
Parallel_Mode = 'domain,follow_master_commit'
|
|
||||||
*** MDEV-6676 - test that empty parallel_mode does not replicate in parallel ***
|
*** MDEV-6676 - test that empty parallel_mode does not replicate in parallel ***
|
||||||
INSERT INTO t2 VALUES (1040);
|
INSERT INTO t2 VALUES (1040);
|
||||||
include/save_master_gtid.inc
|
include/save_master_gtid.inc
|
||||||
SET GLOBAL slave_parallel_mode='';
|
SET GLOBAL slave_parallel_mode='none';
|
||||||
SET @old_dbug= @@GLOBAL.debug_dbug;
|
SET @old_dbug= @@GLOBAL.debug_dbug;
|
||||||
SET GLOBAL debug_dbug="+d,slave_crash_if_parallel_apply";
|
SET GLOBAL debug_dbug="+d,slave_crash_if_parallel_apply";
|
||||||
include/start_slave.inc
|
include/start_slave.inc
|
||||||
@ -1177,7 +1175,7 @@ INSERT INTO t2 VALUES (1045);
|
|||||||
INSERT INTO t2 VALUES (1046);
|
INSERT INTO t2 VALUES (1046);
|
||||||
SET gtid_domain_id = 0;
|
SET gtid_domain_id = 0;
|
||||||
include/save_master_gtid.inc
|
include/save_master_gtid.inc
|
||||||
SET GLOBAL slave_parallel_mode=follow_master_commit;
|
SET GLOBAL slave_parallel_mode=minimal;
|
||||||
include/start_slave.inc
|
include/start_slave.inc
|
||||||
include/sync_with_master_gtid.inc
|
include/sync_with_master_gtid.inc
|
||||||
SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
|
SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
|
||||||
@ -1190,7 +1188,7 @@ a
|
|||||||
1045
|
1045
|
||||||
1046
|
1046
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
SET GLOBAL slave_parallel_mode='domain,follow_master_commit';
|
SET GLOBAL slave_parallel_mode='conservative';
|
||||||
include/start_slave.inc
|
include/start_slave.inc
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
|
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
|
||||||
|
@ -6,26 +6,26 @@ include/stop_slave.inc
|
|||||||
SET GLOBAL slave_parallel_threads=10;
|
SET GLOBAL slave_parallel_threads=10;
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional,waiting';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
|
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
SET GLOBAL slave_parallel_threads=10;
|
SET GLOBAL slave_parallel_threads=10;
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional,waiting';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
|
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
SET GLOBAL slave_parallel_threads=10;
|
SET GLOBAL slave_parallel_threads=10;
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional,waiting';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
*** MDEV-6676: Test that @@replicate_allow_parallel is preserved in slave binlog ***
|
*** MDEV-6676: Test that @@skip_parallel_replication is preserved in slave binlog ***
|
||||||
INSERT INTO t1 VALUES(1,1);
|
INSERT INTO t1 VALUES(1,1);
|
||||||
BEGIN;
|
BEGIN;
|
||||||
INSERT INTO t1 VALUES(2,1);
|
INSERT INTO t1 VALUES(2,1);
|
||||||
INSERT INTO t1 VALUES(3,1);
|
INSERT INTO t1 VALUES(3,1);
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET SESSION replicate_allow_parallel=0;
|
SET SESSION skip_parallel_replication=1;
|
||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
@ -36,7 +36,7 @@ UPDATE t1 SET b=b+1 WHERE a=2;
|
|||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
SET SESSION replicate_allow_parallel=1;
|
SET SESSION skip_parallel_replication=0;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
a b
|
a b
|
||||||
1 1
|
1 1
|
||||||
@ -73,13 +73,13 @@ Ok, no retry
|
|||||||
*** MDEV-6676: Test that the FL_WAITED flag in GTID is preserved in slave binlog ***
|
*** MDEV-6676: Test that the FL_WAITED flag in GTID is preserved in slave binlog ***
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
BEGIN;
|
BEGIN;
|
||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
SET debug_sync="thd_report_wait_for SIGNAL waiting1";
|
SET debug_sync="thd_report_wait_for SIGNAL waiting1";
|
||||||
|
@ -6,7 +6,7 @@ include/stop_slave.inc
|
|||||||
SET GLOBAL slave_parallel_threads=10;
|
SET GLOBAL slave_parallel_threads=10;
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
INSERT INTO t1 VALUES(1,1);
|
INSERT INTO t1 VALUES(1,1);
|
||||||
BEGIN;
|
BEGIN;
|
||||||
INSERT INTO t1 VALUES(2,1);
|
INSERT INTO t1 VALUES(2,1);
|
||||||
@ -121,10 +121,10 @@ c
|
|||||||
204
|
204
|
||||||
205
|
205
|
||||||
206
|
206
|
||||||
*** Test @@replicate_allow_parallel. ***
|
*** Test @@skip_parallel_replication. ***
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
UPDATE t1 SET b=10 WHERE a=3;
|
UPDATE t1 SET b=10 WHERE a=3;
|
||||||
SET SESSION replicate_allow_parallel=0;
|
SET SESSION skip_parallel_replication=1;
|
||||||
UPDATE t1 SET b=20 WHERE a=3;
|
UPDATE t1 SET b=20 WHERE a=3;
|
||||||
UPDATE t1 SET b=30 WHERE a=3;
|
UPDATE t1 SET b=30 WHERE a=3;
|
||||||
UPDATE t1 SET b=50 WHERE a=3;
|
UPDATE t1 SET b=50 WHERE a=3;
|
||||||
@ -134,7 +134,7 @@ UPDATE t1 SET b=210 WHERE a=3;
|
|||||||
UPDATE t1 SET b=340 WHERE a=3;
|
UPDATE t1 SET b=340 WHERE a=3;
|
||||||
UPDATE t1 SET b=550 WHERE a=3;
|
UPDATE t1 SET b=550 WHERE a=3;
|
||||||
UPDATE t1 SET b=890 WHERE a=3;
|
UPDATE t1 SET b=890 WHERE a=3;
|
||||||
SET SESSION replicate_allow_parallel=1;
|
SET SESSION skip_parallel_replication=0;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
a b
|
a b
|
||||||
1 2
|
1 2
|
||||||
|
@ -11,7 +11,7 @@ SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
|||||||
SET GLOBAL slave_parallel_threads=10;
|
SET GLOBAL slave_parallel_threads=10;
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional,waiting';
|
SET GLOBAL slave_parallel_mode='aggressive';
|
||||||
*** Test that we replicate correctly when using READ COMMITTED and --log-slave-updates=0 on the slave ***
|
*** Test that we replicate correctly when using READ COMMITTED and --log-slave-updates=0 on the slave ***
|
||||||
INSERT INTO t1 SELECT 4, COUNT(*) FROM t2;
|
INSERT INTO t1 SELECT 4, COUNT(*) FROM t2;
|
||||||
INSERT INTO t2 SELECT 4, COUNT(*) FROM t1;
|
INSERT INTO t2 SELECT 4, COUNT(*) FROM t1;
|
||||||
|
@ -1847,12 +1847,10 @@ SET GLOBAL slave_parallel_threads=10;
|
|||||||
--let $status_items= Parallel_Mode
|
--let $status_items= Parallel_Mode
|
||||||
--source include/show_slave_status.inc
|
--source include/show_slave_status.inc
|
||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
--error ER_INVALID_SLAVE_PARALLEL_MODE
|
SET GLOBAL slave_parallel_mode='aggressive';
|
||||||
SET GLOBAL slave_parallel_mode='domain,follow_master_commit,transactional';
|
|
||||||
SET GLOBAL slave_parallel_mode='waiting,transactional,domain';
|
|
||||||
--let $status_items= Parallel_Mode
|
--let $status_items= Parallel_Mode
|
||||||
--source include/show_slave_status.inc
|
--source include/show_slave_status.inc
|
||||||
SET GLOBAL slave_parallel_mode='domain,follow_master_commit';
|
SET GLOBAL slave_parallel_mode='conservative';
|
||||||
--let $status_items= Parallel_Mode
|
--let $status_items= Parallel_Mode
|
||||||
--source include/show_slave_status.inc
|
--source include/show_slave_status.inc
|
||||||
|
|
||||||
@ -1863,7 +1861,7 @@ INSERT INTO t2 VALUES (1040);
|
|||||||
--source include/save_master_gtid.inc
|
--source include/save_master_gtid.inc
|
||||||
|
|
||||||
--connection server_2
|
--connection server_2
|
||||||
SET GLOBAL slave_parallel_mode='';
|
SET GLOBAL slave_parallel_mode='none';
|
||||||
# Test that we do not use parallel apply, by injecting an unconditional
|
# Test that we do not use parallel apply, by injecting an unconditional
|
||||||
# crash in the parallel apply code.
|
# crash in the parallel apply code.
|
||||||
SET @old_dbug= @@GLOBAL.debug_dbug;
|
SET @old_dbug= @@GLOBAL.debug_dbug;
|
||||||
@ -1897,12 +1895,12 @@ INSERT INTO t2 VALUES (1046);
|
|||||||
SET gtid_domain_id = 0;
|
SET gtid_domain_id = 0;
|
||||||
--source include/save_master_gtid.inc
|
--source include/save_master_gtid.inc
|
||||||
--connection server_2
|
--connection server_2
|
||||||
SET GLOBAL slave_parallel_mode=follow_master_commit;
|
SET GLOBAL slave_parallel_mode=minimal;
|
||||||
--source include/start_slave.inc
|
--source include/start_slave.inc
|
||||||
--source include/sync_with_master_gtid.inc
|
--source include/sync_with_master_gtid.inc
|
||||||
SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
|
SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
|
||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
SET GLOBAL slave_parallel_mode='domain,follow_master_commit';
|
SET GLOBAL slave_parallel_mode='conservative';
|
||||||
--source include/start_slave.inc
|
--source include/start_slave.inc
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
|
|||||||
SET GLOBAL slave_parallel_threads=10;
|
SET GLOBAL slave_parallel_threads=10;
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional,waiting';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
|
|
||||||
|
|
||||||
--connection server_3
|
--connection server_3
|
||||||
@ -29,7 +29,7 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
|
|||||||
SET GLOBAL slave_parallel_threads=10;
|
SET GLOBAL slave_parallel_threads=10;
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional,waiting';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
|
|
||||||
|
|
||||||
--connection server_4
|
--connection server_4
|
||||||
@ -39,10 +39,10 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
|
|||||||
SET GLOBAL slave_parallel_threads=10;
|
SET GLOBAL slave_parallel_threads=10;
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional,waiting';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
|
|
||||||
|
|
||||||
--echo *** MDEV-6676: Test that @@replicate_allow_parallel is preserved in slave binlog ***
|
--echo *** MDEV-6676: Test that @@skip_parallel_replication is preserved in slave binlog ***
|
||||||
--connection server_1
|
--connection server_1
|
||||||
|
|
||||||
INSERT INTO t1 VALUES(1,1);
|
INSERT INTO t1 VALUES(1,1);
|
||||||
@ -52,10 +52,10 @@ INSERT INTO t1 VALUES(3,1);
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
# Do a lot of updates on same row in sequence. These would be likely to cause
|
# Do a lot of updates on same row in sequence. These would be likely to cause
|
||||||
# conflicts and rollbacks in optimistic parallel replication, but we disable
|
# conflicts and rollbacks in optimistic parallel replication, but we disable
|
||||||
# that by disabling @@replicate_allow_parallel. We can test that the flag is
|
# that by enabling @@skip_parallel_replication. We can test that the flag is
|
||||||
# preserved down the replication hierarchy by checking that no slave retries
|
# preserved down the replication hierarchy by checking that no slave retries
|
||||||
# are made.
|
# are made.
|
||||||
SET SESSION replicate_allow_parallel=0;
|
SET SESSION skip_parallel_replication=1;
|
||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
@ -66,7 +66,7 @@ UPDATE t1 SET b=b+1 WHERE a=2;
|
|||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
UPDATE t1 SET b=b+1 WHERE a=2;
|
UPDATE t1 SET b=b+1 WHERE a=2;
|
||||||
SET SESSION replicate_allow_parallel=1;
|
SET SESSION skip_parallel_replication=0;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
--source include/save_master_gtid.inc
|
--source include/save_master_gtid.inc
|
||||||
|
|
||||||
@ -112,19 +112,19 @@ eval SELECT IF($retry1=$retry2, "Ok, no retry",
|
|||||||
--connection server_2
|
--connection server_2
|
||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
|
|
||||||
|
|
||||||
--connection server_3
|
--connection server_3
|
||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
|
|
||||||
|
|
||||||
--connection server_4
|
--connection server_4
|
||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
|
|
||||||
--connection server_1
|
--connection server_1
|
||||||
# Do a lot of updates on same row in sequence. Ensure that all of these but the
|
# Do a lot of updates on same row in sequence. Ensure that all of these but the
|
||||||
|
@ -15,7 +15,7 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
|
|||||||
SET GLOBAL slave_parallel_threads=10;
|
SET GLOBAL slave_parallel_threads=10;
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional';
|
SET GLOBAL slave_parallel_mode='optimistic';
|
||||||
|
|
||||||
|
|
||||||
--connection server_1
|
--connection server_1
|
||||||
@ -106,7 +106,7 @@ SELECT * FROM t3 ORDER BY c;
|
|||||||
#SHOW STATUS LIKE 'Slave_retried_transactions';
|
#SHOW STATUS LIKE 'Slave_retried_transactions';
|
||||||
|
|
||||||
|
|
||||||
--echo *** Test @@replicate_allow_parallel. ***
|
--echo *** Test @@skip_parallel_replication. ***
|
||||||
|
|
||||||
--connection server_2
|
--connection server_2
|
||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
@ -114,11 +114,11 @@ SELECT * FROM t3 ORDER BY c;
|
|||||||
|
|
||||||
--connection server_1
|
--connection server_1
|
||||||
# We do a bunch of conflicting transactions on the master with
|
# We do a bunch of conflicting transactions on the master with
|
||||||
# replicate_allow_parallel set to false, and check that we do not
|
# skip_parallel_replication set to true, and check that we do not
|
||||||
# get any retries on the slave.
|
# get any retries on the slave.
|
||||||
|
|
||||||
UPDATE t1 SET b=10 WHERE a=3;
|
UPDATE t1 SET b=10 WHERE a=3;
|
||||||
SET SESSION replicate_allow_parallel=0;
|
SET SESSION skip_parallel_replication=1;
|
||||||
UPDATE t1 SET b=20 WHERE a=3;
|
UPDATE t1 SET b=20 WHERE a=3;
|
||||||
UPDATE t1 SET b=30 WHERE a=3;
|
UPDATE t1 SET b=30 WHERE a=3;
|
||||||
UPDATE t1 SET b=50 WHERE a=3;
|
UPDATE t1 SET b=50 WHERE a=3;
|
||||||
@ -128,7 +128,7 @@ UPDATE t1 SET b=210 WHERE a=3;
|
|||||||
UPDATE t1 SET b=340 WHERE a=3;
|
UPDATE t1 SET b=340 WHERE a=3;
|
||||||
UPDATE t1 SET b=550 WHERE a=3;
|
UPDATE t1 SET b=550 WHERE a=3;
|
||||||
UPDATE t1 SET b=890 WHERE a=3;
|
UPDATE t1 SET b=890 WHERE a=3;
|
||||||
SET SESSION replicate_allow_parallel=1;
|
SET SESSION skip_parallel_replication=0;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
--source include/save_master_gtid.inc
|
--source include/save_master_gtid.inc
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
|||||||
SET GLOBAL slave_parallel_threads=10;
|
SET GLOBAL slave_parallel_threads=10;
|
||||||
CHANGE MASTER TO master_use_gtid=slave_pos;
|
CHANGE MASTER TO master_use_gtid=slave_pos;
|
||||||
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
|
||||||
SET GLOBAL slave_parallel_mode='domain,transactional,waiting';
|
SET GLOBAL slave_parallel_mode='aggressive';
|
||||||
|
|
||||||
|
|
||||||
--echo *** Test that we replicate correctly when using READ COMMITTED and --log-slave-updates=0 on the slave ***
|
--echo *** Test that we replicate correctly when using READ COMMITTED and --log-slave-updates=0 on the slave ***
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
SELECT @@global.replicate_allow_parallel;
|
|
||||||
ERROR HY000: Variable 'replicate_allow_parallel' is a SESSION variable
|
|
||||||
SET GLOBAL replicate_allow_parallel= 1;
|
|
||||||
ERROR HY000: Variable 'replicate_allow_parallel' is a SESSION variable and can't be used with SET GLOBAL
|
|
||||||
SELECT @@session.replicate_allow_parallel;
|
|
||||||
@@session.replicate_allow_parallel
|
|
||||||
1
|
|
||||||
SET SESSION replicate_allow_parallel= 0;
|
|
||||||
SELECT @@session.replicate_allow_parallel;
|
|
||||||
@@session.replicate_allow_parallel
|
|
||||||
0
|
|
||||||
SET SESSION replicate_allow_parallel= 1;
|
|
||||||
SELECT @@session.replicate_allow_parallel;
|
|
||||||
@@session.replicate_allow_parallel
|
|
||||||
1
|
|
@ -0,0 +1,15 @@
|
|||||||
|
SELECT @@global.skip_parallel_replication;
|
||||||
|
ERROR HY000: Variable 'skip_parallel_replication' is a SESSION variable
|
||||||
|
SET GLOBAL skip_parallel_replication= 0;
|
||||||
|
ERROR HY000: Variable 'skip_parallel_replication' is a SESSION variable and can't be used with SET GLOBAL
|
||||||
|
SELECT @@session.skip_parallel_replication;
|
||||||
|
@@session.skip_parallel_replication
|
||||||
|
0
|
||||||
|
SET SESSION skip_parallel_replication= 1;
|
||||||
|
SELECT @@session.skip_parallel_replication;
|
||||||
|
@@session.skip_parallel_replication
|
||||||
|
1
|
||||||
|
SET SESSION skip_parallel_replication= 0;
|
||||||
|
SELECT @@session.skip_parallel_replication;
|
||||||
|
@@session.skip_parallel_replication
|
||||||
|
0
|
@ -1,8 +1,8 @@
|
|||||||
SET SESSION slave_parallel_mode= '';
|
SET SESSION slave_parallel_mode= none;
|
||||||
ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
|
ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
|
||||||
SELECT @@slave_parallel_mode;
|
SELECT @@slave_parallel_mode;
|
||||||
@@slave_parallel_mode
|
@@slave_parallel_mode
|
||||||
domain
|
minimal
|
||||||
SELECT @@m1.slave_parallel_mode;
|
SELECT @@m1.slave_parallel_mode;
|
||||||
@@m1.slave_parallel_mode
|
@@m1.slave_parallel_mode
|
||||||
NULL
|
NULL
|
||||||
@ -12,39 +12,39 @@ Warning 1617 There is no master connection 'm1'
|
|||||||
CHANGE MASTER TO master_host='127.0.0.1', master_port=3310, master_user='root';
|
CHANGE MASTER TO master_host='127.0.0.1', master_port=3310, master_user='root';
|
||||||
SELECT @@``.slave_parallel_mode;
|
SELECT @@``.slave_parallel_mode;
|
||||||
@@``.slave_parallel_mode
|
@@``.slave_parallel_mode
|
||||||
domain
|
minimal
|
||||||
SELECT @@slave_parallel_mode;
|
SELECT @@slave_parallel_mode;
|
||||||
@@slave_parallel_mode
|
@@slave_parallel_mode
|
||||||
domain
|
minimal
|
||||||
Parallel_Mode = 'domain'
|
Parallel_Mode = 'minimal'
|
||||||
SELECT @@m2.slave_parallel_mode;
|
SELECT @@m2.slave_parallel_mode;
|
||||||
@@m2.slave_parallel_mode
|
@@m2.slave_parallel_mode
|
||||||
NULL
|
NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1617 There is no master connection 'm2'
|
Warning 1617 There is no master connection 'm2'
|
||||||
Warning 1617 There is no master connection 'm2'
|
Warning 1617 There is no master connection 'm2'
|
||||||
SET GLOBAL m2.slave_parallel_mode = '';
|
SET GLOBAL m2.slave_parallel_mode = none;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1617 There is no master connection 'm2'
|
Warning 1617 There is no master connection 'm2'
|
||||||
CHANGE MASTER 'm1' TO master_host='127.0.0.1', master_port=3311, master_user='root';
|
CHANGE MASTER 'm1' TO master_host='127.0.0.1', master_port=3311, master_user='root';
|
||||||
SELECT @@m1.slave_parallel_mode;
|
SELECT @@m1.slave_parallel_mode;
|
||||||
@@m1.slave_parallel_mode
|
@@m1.slave_parallel_mode
|
||||||
transactional
|
optimistic
|
||||||
Parallel_Mode = 'domain'
|
Parallel_Mode = 'minimal'
|
||||||
SET GLOBAL m1.slave_parallel_mode= follow_master_commit;
|
SET GLOBAL m1.slave_parallel_mode= conservative;
|
||||||
Parallel_Mode = 'domain'
|
Parallel_Mode = 'minimal'
|
||||||
SET default_master_connection= 'm1';
|
SET default_master_connection= 'm1';
|
||||||
SELECT @@slave_parallel_mode;
|
SELECT @@slave_parallel_mode;
|
||||||
@@slave_parallel_mode
|
@@slave_parallel_mode
|
||||||
follow_master_commit
|
conservative
|
||||||
SET GLOBAL slave_parallel_mode= waiting;
|
SET GLOBAL slave_parallel_mode= aggressive;
|
||||||
SELECT @@slave_parallel_mode;
|
SELECT @@slave_parallel_mode;
|
||||||
@@slave_parallel_mode
|
@@slave_parallel_mode
|
||||||
waiting
|
aggressive
|
||||||
Parallel_Mode = 'waiting'
|
Parallel_Mode = 'aggressive'
|
||||||
SET default_master_connection= '';
|
SET default_master_connection= '';
|
||||||
SELECT @@slave_parallel_mode;
|
SELECT @@slave_parallel_mode;
|
||||||
@@slave_parallel_mode
|
@@slave_parallel_mode
|
||||||
domain
|
minimal
|
||||||
RESET SLAVE ALL;
|
RESET SLAVE ALL;
|
||||||
RESET SLAVE 'm1' ALL;
|
RESET SLAVE 'm1' ALL;
|
||||||
|
@ -3395,20 +3395,6 @@ NUMERIC_BLOCK_SIZE 1
|
|||||||
ENUM_VALUE_LIST NULL
|
ENUM_VALUE_LIST NULL
|
||||||
READ_ONLY YES
|
READ_ONLY YES
|
||||||
COMMAND_LINE_ARGUMENT REQUIRED
|
COMMAND_LINE_ARGUMENT REQUIRED
|
||||||
VARIABLE_NAME REPLICATE_ALLOW_PARALLEL
|
|
||||||
SESSION_VALUE ON
|
|
||||||
GLOBAL_VALUE NULL
|
|
||||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
|
||||||
DEFAULT_VALUE ON
|
|
||||||
VARIABLE_SCOPE SESSION ONLY
|
|
||||||
VARIABLE_TYPE BOOLEAN
|
|
||||||
VARIABLE_COMMENT If set when a transaction is written to the binlog, that transaction is allowed to replicate in parallel on a slave where slave_parallel_mode is set to "transactional". Can be cleared for transactions that are likely to cause a conflict if replicated in parallel, to avoid unnecessary rollback and retry.
|
|
||||||
NUMERIC_MIN_VALUE NULL
|
|
||||||
NUMERIC_MAX_VALUE NULL
|
|
||||||
NUMERIC_BLOCK_SIZE NULL
|
|
||||||
ENUM_VALUE_LIST OFF,ON
|
|
||||||
READ_ONLY NO
|
|
||||||
COMMAND_LINE_ARGUMENT NULL
|
|
||||||
VARIABLE_NAME REPLICATE_ANNOTATE_ROW_EVENTS
|
VARIABLE_NAME REPLICATE_ANNOTATE_ROW_EVENTS
|
||||||
SESSION_VALUE NULL
|
SESSION_VALUE NULL
|
||||||
GLOBAL_VALUE OFF
|
GLOBAL_VALUE OFF
|
||||||
@ -3675,6 +3661,20 @@ NUMERIC_BLOCK_SIZE NULL
|
|||||||
ENUM_VALUE_LIST OFF,ON
|
ENUM_VALUE_LIST OFF,ON
|
||||||
READ_ONLY YES
|
READ_ONLY YES
|
||||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||||
|
VARIABLE_NAME SKIP_PARALLEL_REPLICATION
|
||||||
|
SESSION_VALUE OFF
|
||||||
|
GLOBAL_VALUE NULL
|
||||||
|
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||||
|
DEFAULT_VALUE OFF
|
||||||
|
VARIABLE_SCOPE SESSION ONLY
|
||||||
|
VARIABLE_TYPE BOOLEAN
|
||||||
|
VARIABLE_COMMENT If set when a transaction is written to the binlog, parallel apply of that transaction will be avoided on a slave where slave_parallel_mode is not "aggressive". Can be used to avoid unnecessary rollback and retry for transactions that are likely to cause a conflict if replicated in parallel.
|
||||||
|
NUMERIC_MIN_VALUE NULL
|
||||||
|
NUMERIC_MAX_VALUE NULL
|
||||||
|
NUMERIC_BLOCK_SIZE NULL
|
||||||
|
ENUM_VALUE_LIST OFF,ON
|
||||||
|
READ_ONLY NO
|
||||||
|
COMMAND_LINE_ARGUMENT NULL
|
||||||
VARIABLE_NAME SKIP_REPLICATION
|
VARIABLE_NAME SKIP_REPLICATION
|
||||||
SESSION_VALUE OFF
|
SESSION_VALUE OFF
|
||||||
GLOBAL_VALUE NULL
|
GLOBAL_VALUE NULL
|
||||||
@ -3817,16 +3817,16 @@ READ_ONLY NO
|
|||||||
COMMAND_LINE_ARGUMENT REQUIRED
|
COMMAND_LINE_ARGUMENT REQUIRED
|
||||||
VARIABLE_NAME SLAVE_PARALLEL_MODE
|
VARIABLE_NAME SLAVE_PARALLEL_MODE
|
||||||
SESSION_VALUE NULL
|
SESSION_VALUE NULL
|
||||||
GLOBAL_VALUE domain,follow_master_commit
|
GLOBAL_VALUE conservative
|
||||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||||
DEFAULT_VALUE domain,follow_master_commit
|
DEFAULT_VALUE conservative
|
||||||
VARIABLE_SCOPE GLOBAL
|
VARIABLE_SCOPE GLOBAL
|
||||||
VARIABLE_TYPE SET
|
VARIABLE_TYPE ENUM
|
||||||
VARIABLE_COMMENT Controls what transactions are applied in parallel when using --slave-parallel-threads. Syntax: slave_parallel_mode=value[,value...], where "value" could be one or more of: "domain", to apply different replication domains in parallel; "follow_master_commit", to apply in parallel transactions that group-committed together on the master; "transactional", to optimistically try to apply all transactional DML in parallel; and "waiting" to extend "transactional" to even transactions that had to wait on the master.
|
VARIABLE_COMMENT Controls what transactions are applied in parallel when using --slave-parallel-threads. Possible values: "optimistic" tries to apply most transactional DML in parallel, and handles any conflicts with rollback and retry. "conservative" limits parallelism in an effort to avoid any conflicts. "aggressive" tries to maximise the parallelism, possibly at the cost of increased conflict rate. "minimal" only parallelizes the commit steps of transactions. "none" disables parallel apply completely.
|
||||||
NUMERIC_MIN_VALUE NULL
|
NUMERIC_MIN_VALUE NULL
|
||||||
NUMERIC_MAX_VALUE NULL
|
NUMERIC_MAX_VALUE NULL
|
||||||
NUMERIC_BLOCK_SIZE NULL
|
NUMERIC_BLOCK_SIZE NULL
|
||||||
ENUM_VALUE_LIST domain,follow_master_commit,transactional,waiting
|
ENUM_VALUE_LIST none,minimal,conservative,optimistic,aggressive
|
||||||
READ_ONLY NO
|
READ_ONLY NO
|
||||||
COMMAND_LINE_ARGUMENT NULL
|
COMMAND_LINE_ARGUMENT NULL
|
||||||
VARIABLE_NAME SLAVE_PARALLEL_THREADS
|
VARIABLE_NAME SLAVE_PARALLEL_THREADS
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
--source include/not_embedded.inc
|
|
||||||
|
|
||||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
|
||||||
SELECT @@global.replicate_allow_parallel;
|
|
||||||
|
|
||||||
--error ER_LOCAL_VARIABLE
|
|
||||||
SET GLOBAL replicate_allow_parallel= 1;
|
|
||||||
SELECT @@session.replicate_allow_parallel;
|
|
||||||
SET SESSION replicate_allow_parallel= 0;
|
|
||||||
SELECT @@session.replicate_allow_parallel;
|
|
||||||
SET SESSION replicate_allow_parallel= 1;
|
|
||||||
SELECT @@session.replicate_allow_parallel;
|
|
||||||
|
|
||||||
# More testing of the actual functionality in rpl.rpl_parallel_* tests.
|
|
@ -0,0 +1,14 @@
|
|||||||
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
|
SELECT @@global.skip_parallel_replication;
|
||||||
|
|
||||||
|
--error ER_LOCAL_VARIABLE
|
||||||
|
SET GLOBAL skip_parallel_replication= 0;
|
||||||
|
SELECT @@session.skip_parallel_replication;
|
||||||
|
SET SESSION skip_parallel_replication= 1;
|
||||||
|
SELECT @@session.skip_parallel_replication;
|
||||||
|
SET SESSION skip_parallel_replication= 0;
|
||||||
|
SELECT @@session.skip_parallel_replication;
|
||||||
|
|
||||||
|
# More testing of the actual functionality in rpl.rpl_parallel_* tests.
|
@ -1 +1 @@
|
|||||||
--slave-parallel-mode=domain --m1.slave-parallel-mode=transactional --m2.slave-parallel-mode=domain,follow_master_commit,waiting
|
--slave-parallel-mode=minimal --m1.slave-parallel-mode=optimistic --m2.slave-parallel-mode=aggressive
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# Also tests some command line options, in slave_parallel_mode_basic-master.opt
|
# Also tests some command line options, in slave_parallel_mode_basic-master.opt
|
||||||
|
|
||||||
--error ER_GLOBAL_VARIABLE
|
--error ER_GLOBAL_VARIABLE
|
||||||
SET SESSION slave_parallel_mode= '';
|
SET SESSION slave_parallel_mode= none;
|
||||||
|
|
||||||
SELECT @@slave_parallel_mode;
|
SELECT @@slave_parallel_mode;
|
||||||
SELECT @@m1.slave_parallel_mode;
|
SELECT @@m1.slave_parallel_mode;
|
||||||
@ -15,16 +15,16 @@ SELECT @@slave_parallel_mode;
|
|||||||
--source include/show_slave_status.inc
|
--source include/show_slave_status.inc
|
||||||
|
|
||||||
SELECT @@m2.slave_parallel_mode;
|
SELECT @@m2.slave_parallel_mode;
|
||||||
SET GLOBAL m2.slave_parallel_mode = '';
|
SET GLOBAL m2.slave_parallel_mode = none;
|
||||||
|
|
||||||
CHANGE MASTER 'm1' TO master_host='127.0.0.1', master_port=3311, master_user='root';
|
CHANGE MASTER 'm1' TO master_host='127.0.0.1', master_port=3311, master_user='root';
|
||||||
SELECT @@m1.slave_parallel_mode;
|
SELECT @@m1.slave_parallel_mode;
|
||||||
--source include/show_slave_status.inc
|
--source include/show_slave_status.inc
|
||||||
SET GLOBAL m1.slave_parallel_mode= follow_master_commit;
|
SET GLOBAL m1.slave_parallel_mode= conservative;
|
||||||
--source include/show_slave_status.inc
|
--source include/show_slave_status.inc
|
||||||
SET default_master_connection= 'm1';
|
SET default_master_connection= 'm1';
|
||||||
SELECT @@slave_parallel_mode;
|
SELECT @@slave_parallel_mode;
|
||||||
SET GLOBAL slave_parallel_mode= waiting;
|
SET GLOBAL slave_parallel_mode= aggressive;
|
||||||
SELECT @@slave_parallel_mode;
|
SELECT @@slave_parallel_mode;
|
||||||
--source include/show_slave_status.inc
|
--source include/show_slave_status.inc
|
||||||
SET default_master_connection= '';
|
SET default_master_connection= '';
|
||||||
|
@ -6400,7 +6400,7 @@ Gtid_log_event::Gtid_log_event(THD *thd_arg, uint64 seq_no_arg,
|
|||||||
flags2|= FL_DDL;
|
flags2|= FL_DDL;
|
||||||
else if (is_transactional)
|
else if (is_transactional)
|
||||||
flags2|= FL_TRANSACTIONAL;
|
flags2|= FL_TRANSACTIONAL;
|
||||||
if (thd_arg->variables.option_bits & OPTION_RPL_ALLOW_PARALLEL)
|
if (!(thd_arg->variables.option_bits & OPTION_RPL_SKIP_PARALLEL))
|
||||||
flags2|= FL_ALLOW_PARALLEL;
|
flags2|= FL_ALLOW_PARALLEL;
|
||||||
/* Preserve any DDL or WAITED flag in the slave's binlog. */
|
/* Preserve any DDL or WAITED flag in the slave's binlog. */
|
||||||
if (thd_arg->rgi_slave)
|
if (thd_arg->rgi_slave)
|
||||||
@ -6545,9 +6545,9 @@ Gtid_log_event::do_apply_event(rpl_group_info *rgi)
|
|||||||
/* Execute this like a BEGIN query event. */
|
/* Execute this like a BEGIN query event. */
|
||||||
bits|= OPTION_GTID_BEGIN;
|
bits|= OPTION_GTID_BEGIN;
|
||||||
if (flags2 & FL_ALLOW_PARALLEL)
|
if (flags2 & FL_ALLOW_PARALLEL)
|
||||||
bits|= (ulonglong)OPTION_RPL_ALLOW_PARALLEL;
|
bits&= ~(ulonglong)OPTION_RPL_SKIP_PARALLEL;
|
||||||
else
|
else
|
||||||
bits&= ~(ulonglong)OPTION_RPL_ALLOW_PARALLEL;
|
bits|= (ulonglong)OPTION_RPL_SKIP_PARALLEL;
|
||||||
thd->variables.option_bits= bits;
|
thd->variables.option_bits= bits;
|
||||||
DBUG_PRINT("info", ("Set OPTION_GTID_BEGIN"));
|
DBUG_PRINT("info", ("Set OPTION_GTID_BEGIN"));
|
||||||
thd->set_query_and_id(gtid_begin_string, sizeof(gtid_begin_string)-1,
|
thd->set_query_and_id(gtid_begin_string, sizeof(gtid_begin_string)-1,
|
||||||
@ -6638,8 +6638,8 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info)
|
|||||||
print_event_info->allow_parallel != !!(flags2 & FL_ALLOW_PARALLEL))
|
print_event_info->allow_parallel != !!(flags2 & FL_ALLOW_PARALLEL))
|
||||||
{
|
{
|
||||||
my_b_printf(&cache,
|
my_b_printf(&cache,
|
||||||
"/*!100101 SET @@session.replicate_allow_parallel=%u*/%s\n",
|
"/*!100101 SET @@session.skip_parallel_replication=%u*/%s\n",
|
||||||
!!(flags2 & FL_ALLOW_PARALLEL), print_event_info->delimiter);
|
!(flags2 & FL_ALLOW_PARALLEL), print_event_info->delimiter);
|
||||||
print_event_info->allow_parallel= !!(flags2 & FL_ALLOW_PARALLEL);
|
print_event_info->allow_parallel= !!(flags2 & FL_ALLOW_PARALLEL);
|
||||||
print_event_info->allow_parallel_printed= true;
|
print_event_info->allow_parallel_printed= true;
|
||||||
}
|
}
|
||||||
|
@ -3177,8 +3177,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
static const uchar FL_TRANSACTIONAL= 4;
|
static const uchar FL_TRANSACTIONAL= 4;
|
||||||
/*
|
/*
|
||||||
FL_ALLOW_PARALLEL reflects the value of @@SESSION.replicate_allow_parallel
|
FL_ALLOW_PARALLEL reflects the (negation of the) value of
|
||||||
at the time of commit.
|
@@SESSION.skip_parallel_replication at the time of commit.
|
||||||
*/
|
*/
|
||||||
static const uchar FL_ALLOW_PARALLEL= 8;
|
static const uchar FL_ALLOW_PARALLEL= 8;
|
||||||
/*
|
/*
|
||||||
|
@ -562,8 +562,7 @@ ulong stored_program_cache_size= 0;
|
|||||||
|
|
||||||
ulong opt_slave_parallel_threads= 0;
|
ulong opt_slave_parallel_threads= 0;
|
||||||
ulong opt_slave_domain_parallel_threads= 0;
|
ulong opt_slave_domain_parallel_threads= 0;
|
||||||
ulonglong opt_slave_parallel_mode=
|
ulong opt_slave_parallel_mode= SLAVE_PARALLEL_CONSERVATIVE;
|
||||||
SLAVE_PARALLEL_DOMAIN | SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT;
|
|
||||||
ulong opt_binlog_commit_wait_count= 0;
|
ulong opt_binlog_commit_wait_count= 0;
|
||||||
ulong opt_binlog_commit_wait_usec= 0;
|
ulong opt_binlog_commit_wait_usec= 0;
|
||||||
ulong opt_slave_parallel_max_queued= 131072;
|
ulong opt_slave_parallel_max_queued= 131072;
|
||||||
@ -7326,16 +7325,16 @@ struct my_option my_long_options[]=
|
|||||||
#ifdef HAVE_REPLICATION
|
#ifdef HAVE_REPLICATION
|
||||||
{"slave-parallel-mode", OPT_SLAVE_PARALLEL_MODE,
|
{"slave-parallel-mode", OPT_SLAVE_PARALLEL_MODE,
|
||||||
"Controls what transactions are applied in parallel when using "
|
"Controls what transactions are applied in parallel when using "
|
||||||
"--slave-parallel-threads. Syntax: slave_parallel_mode=value[,value...], "
|
"--slave-parallel-threads. Possible values: \"optimistic\" tries to "
|
||||||
"where \"value\" could be one or more of: \"domain\", to apply different "
|
"apply most transactional DML in parallel, and handles any conflicts "
|
||||||
"replication domains in parallel; \"follow_master_commit\", to apply "
|
"with rollback and retry. \"conservative\" limits parallelism in an "
|
||||||
"in parallel transactions that group-committed together on the master; "
|
"effort to avoid any conflicts. \"aggressive\" tries to maximise the "
|
||||||
"\"transactional\", to optimistically try to apply all transactional "
|
"parallelism, possibly at the cost of increased conflict rate. "
|
||||||
"DML in parallel; and \"waiting\" to extend \"transactional\" to "
|
"\"minimal\" only parallelizes the commit steps of transactions. "
|
||||||
"even transactions that had to wait on the master.",
|
"\"none\" disables parallel apply completely.",
|
||||||
&opt_slave_parallel_mode, &opt_slave_parallel_mode,
|
&opt_slave_parallel_mode, &opt_slave_parallel_mode,
|
||||||
&slave_parallel_mode_typelib, GET_SET | GET_ASK_ADDR, REQUIRED_ARG,
|
&slave_parallel_mode_typelib, GET_ENUM | GET_ASK_ADDR, REQUIRED_ARG,
|
||||||
SLAVE_PARALLEL_DOMAIN | SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT, 0, 0, 0, 0, 0},
|
SLAVE_PARALLEL_CONSERVATIVE, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
|
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
|
||||||
{"slow-start-timeout", 0,
|
{"slow-start-timeout", 0,
|
||||||
@ -8847,7 +8846,8 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
|
|||||||
case (int)OPT_SLAVE_PARALLEL_MODE:
|
case (int)OPT_SLAVE_PARALLEL_MODE:
|
||||||
{
|
{
|
||||||
/* Store latest mode for Master::Info */
|
/* Store latest mode for Master::Info */
|
||||||
cur_rpl_filter->set_parallel_mode(opt_slave_parallel_mode);
|
cur_rpl_filter->set_parallel_mode
|
||||||
|
((enum_slave_parallel_mode)opt_slave_parallel_mode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
18
sql/mysqld.h
18
sql/mysqld.h
@ -61,14 +61,16 @@ typedef Bitmap<((MAX_INDEXES+7)/8*8)> key_map; /* Used for finding keys */
|
|||||||
#define OPT_GLOBAL SHOW_OPT_GLOBAL
|
#define OPT_GLOBAL SHOW_OPT_GLOBAL
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Bit masks for the values in --slave-parallel-mode.
|
Values for --slave-parallel-mode
|
||||||
Note that these values cannot be changed - they are stored in master.info,
|
Must match order in slave_parallel_mode_typelib in sys_vars.cc.
|
||||||
so need to be possible to read back in a different version of the server.
|
|
||||||
*/
|
*/
|
||||||
#define SLAVE_PARALLEL_DOMAIN (1ULL << 0)
|
enum enum_slave_parallel_mode {
|
||||||
#define SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT (1ULL << 1)
|
SLAVE_PARALLEL_NONE,
|
||||||
#define SLAVE_PARALLEL_TRX (1ULL << 2)
|
SLAVE_PARALLEL_MINIMAL,
|
||||||
#define SLAVE_PARALLEL_WAITING (1ULL << 3)
|
SLAVE_PARALLEL_CONSERVATIVE,
|
||||||
|
SLAVE_PARALLEL_OPTIMISTIC,
|
||||||
|
SLAVE_PARALLEL_AGGRESSIVE
|
||||||
|
};
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
void kill_mysql(void);
|
void kill_mysql(void);
|
||||||
@ -201,7 +203,7 @@ extern ulong stored_program_cache_size;
|
|||||||
extern ulong opt_slave_parallel_threads;
|
extern ulong opt_slave_parallel_threads;
|
||||||
extern ulong opt_slave_domain_parallel_threads;
|
extern ulong opt_slave_domain_parallel_threads;
|
||||||
extern ulong opt_slave_parallel_max_queued;
|
extern ulong opt_slave_parallel_max_queued;
|
||||||
extern ulonglong opt_slave_parallel_mode;
|
extern ulong opt_slave_parallel_mode;
|
||||||
extern ulong opt_binlog_commit_wait_count;
|
extern ulong opt_binlog_commit_wait_count;
|
||||||
extern ulong opt_binlog_commit_wait_usec;
|
extern ulong opt_binlog_commit_wait_usec;
|
||||||
extern my_bool opt_gtid_ignore_duplicates;
|
extern my_bool opt_gtid_ignore_duplicates;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#define TABLE_RULE_ARR_SIZE 16
|
#define TABLE_RULE_ARR_SIZE 16
|
||||||
|
|
||||||
Rpl_filter::Rpl_filter() :
|
Rpl_filter::Rpl_filter() :
|
||||||
parallel_mode(SLAVE_PARALLEL_DOMAIN | SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT),
|
parallel_mode(SLAVE_PARALLEL_CONSERVATIVE),
|
||||||
table_rules_on(0),
|
table_rules_on(0),
|
||||||
do_table_inited(0), ignore_table_inited(0),
|
do_table_inited(0), ignore_table_inited(0),
|
||||||
wild_do_table_inited(0), wild_ignore_table_inited(0)
|
wild_do_table_inited(0), wild_ignore_table_inited(0)
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#define RPL_FILTER_H
|
#define RPL_FILTER_H
|
||||||
|
|
||||||
#include "mysql.h"
|
#include "mysql.h"
|
||||||
|
#include "mysqld.h"
|
||||||
#include "sql_list.h" /* I_List */
|
#include "sql_list.h" /* I_List */
|
||||||
#include "hash.h" /* HASH */
|
#include "hash.h" /* HASH */
|
||||||
|
|
||||||
@ -76,12 +77,12 @@ public:
|
|||||||
int set_do_db(const char* db_spec);
|
int set_do_db(const char* db_spec);
|
||||||
int set_ignore_db(const char* db_spec);
|
int set_ignore_db(const char* db_spec);
|
||||||
|
|
||||||
void set_parallel_mode(ulonglong mode)
|
void set_parallel_mode(enum_slave_parallel_mode mode)
|
||||||
{
|
{
|
||||||
parallel_mode= mode;
|
parallel_mode= mode;
|
||||||
}
|
}
|
||||||
/* Return given parallel mode or if one is not given, the default mode */
|
/* Return given parallel mode or if one is not given, the default mode */
|
||||||
int get_parallel_mode()
|
enum_slave_parallel_mode get_parallel_mode()
|
||||||
{
|
{
|
||||||
return parallel_mode;
|
return parallel_mode;
|
||||||
}
|
}
|
||||||
@ -137,7 +138,7 @@ private:
|
|||||||
HASH ignore_table;
|
HASH ignore_table;
|
||||||
DYNAMIC_ARRAY wild_do_table;
|
DYNAMIC_ARRAY wild_do_table;
|
||||||
DYNAMIC_ARRAY wild_ignore_table;
|
DYNAMIC_ARRAY wild_ignore_table;
|
||||||
ulonglong parallel_mode;
|
enum_slave_parallel_mode parallel_mode;
|
||||||
|
|
||||||
bool table_rules_on;
|
bool table_rules_on;
|
||||||
bool do_table_inited;
|
bool do_table_inited;
|
||||||
|
11
sql/rpl_mi.h
11
sql/rpl_mi.h
@ -184,7 +184,8 @@ class Master_info : public Slave_reporting_capability
|
|||||||
static const char *using_gtid_astext(enum enum_using_gtid arg);
|
static const char *using_gtid_astext(enum enum_using_gtid arg);
|
||||||
bool using_parallel()
|
bool using_parallel()
|
||||||
{
|
{
|
||||||
return opt_slave_parallel_threads > 0 && parallel_mode != 0;
|
return opt_slave_parallel_threads > 0 &&
|
||||||
|
parallel_mode > SLAVE_PARALLEL_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the variables below are needed because we can change masters on the fly */
|
/* the variables below are needed because we can change masters on the fly */
|
||||||
@ -300,12 +301,8 @@ class Master_info : public Slave_reporting_capability
|
|||||||
/* domain-id based filter */
|
/* domain-id based filter */
|
||||||
Domain_id_filter domain_id_filter;
|
Domain_id_filter domain_id_filter;
|
||||||
|
|
||||||
/*
|
/* The parallel replication mode. */
|
||||||
The parallel replication modes, if any. A combination (binary OR) of any
|
enum_slave_parallel_mode parallel_mode;
|
||||||
of SLAVE_PARALLEL_DOMAIN, SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT,
|
|
||||||
SLAVE_PARALLEL_TRX, and SLAVE_PARALLEL_WAITING.
|
|
||||||
*/
|
|
||||||
ulonglong parallel_mode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int init_master_info(Master_info* mi, const char* master_info_fname,
|
int init_master_info(Master_info* mi, const char* master_info_fname,
|
||||||
|
@ -2013,7 +2013,7 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev,
|
|||||||
{
|
{
|
||||||
Gtid_log_event *gtid_ev= static_cast<Gtid_log_event *>(ev);
|
Gtid_log_event *gtid_ev= static_cast<Gtid_log_event *>(ev);
|
||||||
uint32 domain_id= (rli->mi->using_gtid == Master_info::USE_GTID_NO ||
|
uint32 domain_id= (rli->mi->using_gtid == Master_info::USE_GTID_NO ||
|
||||||
!(rli->mi->parallel_mode & SLAVE_PARALLEL_DOMAIN) ?
|
rli->mi->parallel_mode <= SLAVE_PARALLEL_MINIMAL ?
|
||||||
0 : gtid_ev->domain_id);
|
0 : gtid_ev->domain_id);
|
||||||
if (!(e= find(domain_id)))
|
if (!(e= find(domain_id)))
|
||||||
{
|
{
|
||||||
@ -2054,7 +2054,7 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev,
|
|||||||
{
|
{
|
||||||
Gtid_log_event *gtid_ev= static_cast<Gtid_log_event *>(ev);
|
Gtid_log_event *gtid_ev= static_cast<Gtid_log_event *>(ev);
|
||||||
bool new_gco;
|
bool new_gco;
|
||||||
ulonglong mode= rli->mi->parallel_mode;
|
enum_slave_parallel_mode mode= rli->mi->parallel_mode;
|
||||||
uchar gtid_flags= gtid_ev->flags2;
|
uchar gtid_flags= gtid_ev->flags2;
|
||||||
group_commit_orderer *gco;
|
group_commit_orderer *gco;
|
||||||
uint8 force_switch_flag;
|
uint8 force_switch_flag;
|
||||||
@ -2093,7 +2093,8 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev,
|
|||||||
{
|
{
|
||||||
uint8 flags= gco->flags;
|
uint8 flags= gco->flags;
|
||||||
|
|
||||||
if (!(gtid_flags & Gtid_log_event::FL_GROUP_COMMIT_ID) ||
|
if (mode <= SLAVE_PARALLEL_MINIMAL ||
|
||||||
|
!(gtid_flags & Gtid_log_event::FL_GROUP_COMMIT_ID) ||
|
||||||
e->last_commit_id != gtid_ev->commit_id)
|
e->last_commit_id != gtid_ev->commit_id)
|
||||||
flags|= group_commit_orderer::MULTI_BATCH;
|
flags|= group_commit_orderer::MULTI_BATCH;
|
||||||
/* Make sure we do not attempt to run DDL in parallel speculatively. */
|
/* Make sure we do not attempt to run DDL in parallel speculatively. */
|
||||||
@ -2108,7 +2109,7 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev,
|
|||||||
*/
|
*/
|
||||||
new_gco= false;
|
new_gco= false;
|
||||||
}
|
}
|
||||||
else if ((mode & SLAVE_PARALLEL_TRX) &&
|
else if ((mode >= SLAVE_PARALLEL_OPTIMISTIC) &&
|
||||||
!(flags & group_commit_orderer::FORCE_SWITCH))
|
!(flags & group_commit_orderer::FORCE_SWITCH))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -2124,9 +2125,9 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev,
|
|||||||
*/
|
*/
|
||||||
new_gco= false;
|
new_gco= false;
|
||||||
if (!(gtid_flags & Gtid_log_event::FL_TRANSACTIONAL) ||
|
if (!(gtid_flags & Gtid_log_event::FL_TRANSACTIONAL) ||
|
||||||
!(gtid_flags & Gtid_log_event::FL_ALLOW_PARALLEL) ||
|
( (!(gtid_flags & Gtid_log_event::FL_ALLOW_PARALLEL) ||
|
||||||
((gtid_flags & Gtid_log_event::FL_WAITED) &&
|
(gtid_flags & Gtid_log_event::FL_WAITED)) &&
|
||||||
!(mode & SLAVE_PARALLEL_WAITING)))
|
(mode < SLAVE_PARALLEL_AGGRESSIVE)))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
This transaction should not be speculatively run in parallel with
|
This transaction should not be speculatively run in parallel with
|
||||||
|
@ -7115,8 +7115,8 @@ ER_SUBQUERIES_NOT_SUPPORTED 42000
|
|||||||
eng "%s does not support subqueries or stored functions."
|
eng "%s does not support subqueries or stored functions."
|
||||||
ER_SET_STATEMENT_NOT_SUPPORTED 42000
|
ER_SET_STATEMENT_NOT_SUPPORTED 42000
|
||||||
eng "The system variable %.200s cannot be set in SET STATEMENT."
|
eng "The system variable %.200s cannot be set in SET STATEMENT."
|
||||||
ER_INVALID_SLAVE_PARALLEL_MODE
|
ER_UNUSED_17
|
||||||
eng "Invalid use of '%s' option for slave_parallel_mode"
|
eng "You should never see it"
|
||||||
ER_USER_CREATE_EXISTS
|
ER_USER_CREATE_EXISTS
|
||||||
eng "Can't create user '%-.64s'@'%-.64s'; it already exists"
|
eng "Can't create user '%-.64s'@'%-.64s'; it already exists"
|
||||||
ER_USER_DROP_EXISTS
|
ER_USER_DROP_EXISTS
|
||||||
|
21
sql/slave.cc
21
sql/slave.cc
@ -2585,7 +2585,7 @@ static bool send_show_master_info_header(THD *thd, bool full,
|
|||||||
field_list.push_back(new Item_empty_string("Replicate_Ignore_Domain_Ids",
|
field_list.push_back(new Item_empty_string("Replicate_Ignore_Domain_Ids",
|
||||||
FN_REFLEN));
|
FN_REFLEN));
|
||||||
field_list.push_back(new Item_empty_string("Parallel_Mode",
|
field_list.push_back(new Item_empty_string("Parallel_Mode",
|
||||||
sizeof("domain,follow_master_commit,transactional,waiting")-1));
|
sizeof("conservative")-1));
|
||||||
if (full)
|
if (full)
|
||||||
{
|
{
|
||||||
field_list.push_back(new Item_return_int("Retried_transactions",
|
field_list.push_back(new Item_return_int("Retried_transactions",
|
||||||
@ -2788,22 +2788,9 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
|
|||||||
|
|
||||||
// Parallel_Mode
|
// Parallel_Mode
|
||||||
{
|
{
|
||||||
/* Note how sizeof("domain") has room for "domain," due to traling 0. */
|
const char *mode_name= get_type(&slave_parallel_mode_typelib,
|
||||||
char buf[sizeof("domain") + sizeof("follow_master_commit") +
|
mi->parallel_mode);
|
||||||
sizeof("transactional") + sizeof("waiting") + 1];
|
protocol->store(mode_name, strlen(mode_name), &my_charset_bin);
|
||||||
char *p= buf;
|
|
||||||
uint32 mode= mi->parallel_mode;
|
|
||||||
if (mode & SLAVE_PARALLEL_DOMAIN)
|
|
||||||
p= strmov(p, "domain,");
|
|
||||||
if (mode & SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT)
|
|
||||||
p= strmov(p, "follow_master_commit,");
|
|
||||||
if (mode & SLAVE_PARALLEL_TRX)
|
|
||||||
p= strmov(p, "transactional,");
|
|
||||||
if (mode & SLAVE_PARALLEL_WAITING)
|
|
||||||
p= strmov(p, "waiting,");
|
|
||||||
if (p != buf)
|
|
||||||
--p; // Discard last ','
|
|
||||||
protocol->store(buf, p-buf, &my_charset_bin);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (full)
|
if (full)
|
||||||
|
@ -181,7 +181,7 @@
|
|||||||
*/
|
*/
|
||||||
#define OPTION_ALLOW_BATCH (1ULL << 36) // THD, intern (slave)
|
#define OPTION_ALLOW_BATCH (1ULL << 36) // THD, intern (slave)
|
||||||
#define OPTION_SKIP_REPLICATION (1ULL << 37) // THD, user
|
#define OPTION_SKIP_REPLICATION (1ULL << 37) // THD, user
|
||||||
#define OPTION_RPL_ALLOW_PARALLEL (1ULL << 38)
|
#define OPTION_RPL_SKIP_PARALLEL (1ULL << 38)
|
||||||
|
|
||||||
/* The rest of the file is included in the server only */
|
/* The rest of the file is included in the server only */
|
||||||
#ifndef MYSQL_CLIENT
|
#ifndef MYSQL_CLIENT
|
||||||
|
@ -1874,18 +1874,12 @@ static Sys_var_ulong Sys_slave_parallel_max_queued(
|
|||||||
bool
|
bool
|
||||||
Sys_var_slave_parallel_mode::global_update(THD *thd, set_var *var)
|
Sys_var_slave_parallel_mode::global_update(THD *thd, set_var *var)
|
||||||
{
|
{
|
||||||
ulonglong new_value= var->save_result.ulonglong_value;
|
enum_slave_parallel_mode new_value=
|
||||||
|
(enum_slave_parallel_mode)var->save_result.ulonglong_value;
|
||||||
LEX_STRING *base_name= &var->base;
|
LEX_STRING *base_name= &var->base;
|
||||||
Master_info *mi;
|
Master_info *mi;
|
||||||
bool res= false;
|
bool res= false;
|
||||||
|
|
||||||
if ((new_value & (SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT|SLAVE_PARALLEL_TRX)) ==
|
|
||||||
(SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT|SLAVE_PARALLEL_TRX))
|
|
||||||
{
|
|
||||||
my_error(ER_INVALID_SLAVE_PARALLEL_MODE, MYF(0), "transactional");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!base_name->length)
|
if (!base_name->length)
|
||||||
base_name= &thd->variables.default_master_connection;
|
base_name= &thd->variables.default_master_connection;
|
||||||
|
|
||||||
@ -1928,7 +1922,8 @@ Sys_var_slave_parallel_mode::global_value_ptr(THD *thd,
|
|||||||
const LEX_STRING *base_name)
|
const LEX_STRING *base_name)
|
||||||
{
|
{
|
||||||
Master_info *mi;
|
Master_info *mi;
|
||||||
ulonglong val= opt_slave_parallel_mode;
|
enum_slave_parallel_mode val=
|
||||||
|
(enum_slave_parallel_mode)opt_slave_parallel_mode;
|
||||||
|
|
||||||
if (!base_name->length)
|
if (!base_name->length)
|
||||||
base_name= &thd->variables.default_master_connection;
|
base_name= &thd->variables.default_master_connection;
|
||||||
@ -1947,13 +1942,14 @@ Sys_var_slave_parallel_mode::global_value_ptr(THD *thd,
|
|||||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||||
if (!mi)
|
if (!mi)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return (uchar*)set_to_string(thd, 0, val, typelib.type_names);
|
return valptr(thd, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* The order here must match enum_slave_parallel_mode in mysqld.h. */
|
||||||
static const char *slave_parallel_mode_names[] = {
|
static const char *slave_parallel_mode_names[] = {
|
||||||
"domain", "follow_master_commit", "transactional", "waiting", NULL
|
"none", "minimal", "conservative", "optimistic", "aggressive", NULL
|
||||||
};
|
};
|
||||||
export TYPELIB slave_parallel_mode_typelib = {
|
export TYPELIB slave_parallel_mode_typelib = {
|
||||||
array_elements(slave_parallel_mode_names)-1,
|
array_elements(slave_parallel_mode_names)-1,
|
||||||
@ -1965,28 +1961,26 @@ export TYPELIB slave_parallel_mode_typelib = {
|
|||||||
static Sys_var_slave_parallel_mode Sys_slave_parallel_mode(
|
static Sys_var_slave_parallel_mode Sys_slave_parallel_mode(
|
||||||
"slave_parallel_mode",
|
"slave_parallel_mode",
|
||||||
"Controls what transactions are applied in parallel when using "
|
"Controls what transactions are applied in parallel when using "
|
||||||
"--slave-parallel-threads. Syntax: slave_parallel_mode=value[,value...], "
|
"--slave-parallel-threads. Possible values: \"optimistic\" tries to "
|
||||||
"where \"value\" could be one or more of: \"domain\", to apply different "
|
"apply most transactional DML in parallel, and handles any conflicts "
|
||||||
"replication domains in parallel; \"follow_master_commit\", to apply "
|
"with rollback and retry. \"conservative\" limits parallelism in an "
|
||||||
"in parallel transactions that group-committed together on the master; "
|
"effort to avoid any conflicts. \"aggressive\" tries to maximise the "
|
||||||
"\"transactional\", to optimistically try to apply all transactional "
|
"parallelism, possibly at the cost of increased conflict rate. "
|
||||||
"DML in parallel; and \"waiting\" to extend \"transactional\" to "
|
"\"minimal\" only parallelizes the commit steps of transactions. "
|
||||||
"even transactions that had to wait on the master.",
|
"\"none\" disables parallel apply completely.",
|
||||||
GLOBAL_VAR(opt_slave_parallel_mode),
|
GLOBAL_VAR(opt_slave_parallel_mode), NO_CMD_LINE,
|
||||||
NO_CMD_LINE, slave_parallel_mode_names,
|
slave_parallel_mode_names, DEFAULT(SLAVE_PARALLEL_CONSERVATIVE));
|
||||||
DEFAULT(SLAVE_PARALLEL_DOMAIN |
|
|
||||||
SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT));
|
|
||||||
|
|
||||||
|
|
||||||
static Sys_var_bit Sys_replicate_allow_parallel(
|
static Sys_var_bit Sys_skip_parallel_replication(
|
||||||
"replicate_allow_parallel",
|
"skip_parallel_replication",
|
||||||
"If set when a transaction is written to the binlog, that transaction "
|
"If set when a transaction is written to the binlog, parallel apply of "
|
||||||
"is allowed to replicate in parallel on a slave where "
|
"that transaction will be avoided on a slave where slave_parallel_mode "
|
||||||
"slave_parallel_mode is set to \"transactional\". Can be cleared for "
|
"is not \"aggressive\". Can be used to avoid unnecessary rollback and "
|
||||||
"transactions that are likely to cause a conflict if replicated in "
|
"retry for transactions that are likely to cause a conflict if "
|
||||||
"parallel, to avoid unnecessary rollback and retry.",
|
"replicated in parallel.",
|
||||||
SESSION_ONLY(option_bits), NO_CMD_LINE, OPTION_RPL_ALLOW_PARALLEL,
|
SESSION_ONLY(option_bits), NO_CMD_LINE, OPTION_RPL_SKIP_PARALLEL,
|
||||||
DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
|
DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
|
||||||
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
@ -2312,14 +2312,15 @@ public:
|
|||||||
/**
|
/**
|
||||||
Class for connection_name.slave_parallel_mode.
|
Class for connection_name.slave_parallel_mode.
|
||||||
*/
|
*/
|
||||||
class Sys_var_slave_parallel_mode: public Sys_var_set
|
class Sys_var_slave_parallel_mode: public Sys_var_enum
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sys_var_slave_parallel_mode(const char *name_arg,
|
Sys_var_slave_parallel_mode(const char *name_arg,
|
||||||
const char *comment, int flag_args, ptrdiff_t off, size_t size,
|
const char *comment, int flag_args, ptrdiff_t off, size_t size,
|
||||||
CMD_LINE getopt, const char *values[], ulonglong def_val)
|
CMD_LINE getopt, const char *values[],
|
||||||
: Sys_var_set(name_arg, comment, flag_args, off, size,
|
enum_slave_parallel_mode def_val)
|
||||||
getopt, values, def_val)
|
: Sys_var_enum(name_arg, comment, flag_args, off, size,
|
||||||
|
getopt, values, def_val)
|
||||||
{
|
{
|
||||||
option.var_type|= GET_ASK_ADDR;
|
option.var_type|= GET_ASK_ADDR;
|
||||||
option.value= (uchar**)1; // crash me, please
|
option.value= (uchar**)1; // crash me, please
|
||||||
|
Reference in New Issue
Block a user