summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/include/check-testcase.test2
-rw-r--r--mysql-test/r/mysqld--help.result19
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result8
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result8
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_annotate.result12
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result4
-rw-r--r--mysql-test/suite/multi_source/info_logs.result8
-rw-r--r--mysql-test/suite/multi_source/multisource.result14
-rw-r--r--mysql-test/suite/multi_source/reset_slave.result4
-rw-r--r--mysql-test/suite/multi_source/simple.result14
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel.result18
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_multilevel.result18
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_optimistic.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result2
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel.test12
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_multilevel.test20
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic.test10
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test2
-rw-r--r--mysql-test/suite/sys_vars/r/replicate_allow_parallel_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/skip_parallel_replication_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/slave_parallel_mode_basic.result30
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result38
-rw-r--r--mysql-test/suite/sys_vars/t/replicate_allow_parallel_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/skip_parallel_replication_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/slave_parallel_mode_basic-master.opt2
-rw-r--r--mysql-test/suite/sys_vars/t/slave_parallel_mode_basic.test8
-rw-r--r--sql/log_event.cc10
-rw-r--r--sql/log_event.h4
-rw-r--r--sql/mysqld.cc24
-rw-r--r--sql/mysqld.h18
-rw-r--r--sql/rpl_filter.cc2
-rw-r--r--sql/rpl_filter.h7
-rw-r--r--sql/rpl_mi.h11
-rw-r--r--sql/rpl_parallel.cc15
-rw-r--r--sql/share/errmsg-utf8.txt4
-rw-r--r--sql/slave.cc21
-rw-r--r--sql/sql_priv.h2
-rw-r--r--sql/sys_vars.cc62
-rw-r--r--sql/sys_vars.h9
41 files changed, 245 insertions, 267 deletions
diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test
index 9bba18b170b..083f44ce966 100644
--- a/mysql-test/include/check-testcase.test
+++ b/mysql-test/include/check-testcase.test
@@ -66,7 +66,7 @@ if ($tmp)
--echo Gtid_IO_Pos #
--echo Replicate_Do_Domain_Ids
--echo Replicate_Ignore_Domain_Ids
- --echo Parallel_Mode domain,follow_master_commit
+ --echo Parallel_Mode conservative
}
if (!$tmp) {
# Note: after WL#5177, fields 13-18 shall not be filtered-out.
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index bcda25c5f9b..dc2f2b3d270 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -922,15 +922,14 @@ The following options may be given as the first argument:
replication. Only used when --slave-parallel-threads > 0.
--slave-parallel-mode=name
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.
+ 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.
--slave-parallel-threads=#
If non-zero, number of threads to spawn to apply in
parallel events on the slave that were group-committed on
@@ -1351,7 +1350,7 @@ slave-exec-mode STRICT
slave-max-allowed-packet 1073741824
slave-net-timeout 3600
slave-parallel-max-queued 131072
-slave-parallel-mode domain,follow_master_commit
+slave-parallel-mode conservative
slave-parallel-threads 0
slave-run-triggers-for-rbr NO
slave-skip-errors (No default value)
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
index 40ebbbcd993..714c01d8426 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
@@ -341,7 +341,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
# at #
#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.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
index 2522e1ae568..21b3d4f63be 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
@@ -2258,7 +2258,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
# at #
#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.server_id=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
# at #
#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.server_id=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
# at #
#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.server_id=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
# at #
#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.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
index d14251dc2e6..5dea7c79bdb 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
@@ -2258,7 +2258,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
# at #
#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.server_id=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
# at #
#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.server_id=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
# at #
#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.server_id=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
# at #
#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.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
index 82759613476..ad1a6ede9b7 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
@@ -137,7 +137,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
# at #
#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.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_row_annotate.result b/mysql-test/suite/binlog/r/binlog_row_annotate.result
index 4fcbc260632..2d1e3b97b3f 100644
--- a/mysql-test/suite/binlog/r/binlog_row_annotate.result
+++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result
@@ -81,7 +81,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
# at #
#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.server_id=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
# at #
#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.server_id=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
# at #
#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.server_id=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
# at #
#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.server_id=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
# at #
#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.server_id=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
# at #
#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.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
index 24471795499..f2722924b6a 100644
--- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
+++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
@@ -41,7 +41,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
# at #
#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.server_id=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
# at #
#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.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
diff --git a/mysql-test/suite/multi_source/info_logs.result b/mysql-test/suite/multi_source/info_logs.result
index adab98d0e0c..6e6e4cf1503 100644
--- a/mysql-test/suite/multi_source/info_logs.result
+++ b/mysql-test/suite/multi_source/info_logs.result
@@ -85,16 +85,16 @@ MASTER 2.2
#
show all slaves status;
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
- Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_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
-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
+ 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 conservative 0 1073741824 7 0 60.000
include/wait_for_slave_to_start.inc
set default_master_connection = 'MASTER 2.2';
include/wait_for_slave_to_start.inc
set default_master_connection = '';
show all slaves status;
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
- Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_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
-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
+ 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 conservative 0 1073741824 6 0 60.000
#
# List of files matching '*info*' pattern
# after slave server restart
diff --git a/mysql-test/suite/multi_source/multisource.result b/mysql-test/suite/multi_source/multisource.result
index 1647da74218..4475ec58c6f 100644
--- a/mysql-test/suite/multi_source/multisource.result
+++ b/mysql-test/suite/multi_source/multisource.result
@@ -11,13 +11,13 @@ set default_master_connection = 'master1';
include/wait_for_slave_to_start.inc
show slave 'master1' status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode
-Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No 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;
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;
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;
create database db1;
use db1;
@@ -76,8 +76,8 @@ start slave;
include/wait_for_slave_to_start.inc
show all slaves status;
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
- Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin.000002 601 master-bin.000001 Yes Yes 0 0 313 899 None 0 No 0 No 0 0 2 No domain,follow_master_commit 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
+ Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin.000002 601 master-bin.000001 Yes Yes 0 0 313 899 None 0 No 0 No 0 0 2 No conservative 0 1073741824 7 0 60.000 0-1-4
+master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 988 mysqld-relay-bin-master1.000002 1276 master-bin.000001 Yes Yes 0 0 988 1582 None 0 No 0 No 0 0 1 No conservative 0 1073741824 17 0 60.000 0-1-4
insert into t1 (f1) values ('three');
drop database if exists db2;
create database db2;
@@ -106,8 +106,8 @@ insert into t1 (f1) values ('four');
create table db1.t3 (f1 int) engine=InnoDB;
show all slaves status;
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
- Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 921 mysqld-relay-bin.000002 1209 master-bin.000001 Yes Yes 0 0 921 1507 None 0 No 0 No 0 0 2 No domain,follow_master_commit 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
+ Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 921 mysqld-relay-bin.000002 1209 master-bin.000001 Yes Yes 0 0 921 1507 None 0 No 0 No 0 0 2 No conservative 0 1073741824 17 0 60.000 0-1-7
+master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000002 740 mysqld-relay-bin-master1.000004 1028 master-bin.000002 Yes Yes 0 0 740 1378 None 0 No 0 No 0 0 1 No conservative 0 1073741824 37 0 60.000 0-1-7
select * from db1.t1;
i f1
1 one
diff --git a/mysql-test/suite/multi_source/reset_slave.result b/mysql-test/suite/multi_source/reset_slave.result
index c968d705a81..5e28047945d 100644
--- a/mysql-test/suite/multi_source/reset_slave.result
+++ b/mysql-test/suite/multi_source/reset_slave.result
@@ -11,14 +11,14 @@ insert into t1 values (1),(2);
stop slave 'master1';
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
- 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.000002
mysqld-relay-bin-master1.index
reset slave 'master1';
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
- 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;
show slave 'master1' status;
ERROR HY000: There is no master connection 'master1'
diff --git a/mysql-test/suite/multi_source/simple.result b/mysql-test/suite/multi_source/simple.result
index 6c6e15bb750..405e60c28fe 100644
--- a/mysql-test/suite/multi_source/simple.result
+++ b/mysql-test/suite/multi_source/simple.result
@@ -11,8 +11,8 @@ include/wait_for_slave_to_start.inc
set default_master_connection = '';
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
-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
-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
+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 conservative 0 1073741824 7 0 60.000
start all slaves;
stop slave 'slave1';
show slave 'slave1' status;
@@ -62,22 +62,22 @@ Using_Gtid No
Gtid_IO_Pos
Replicate_Do_Domain_Ids
Replicate_Ignore_Domain_Ids
-Parallel_Mode domain,follow_master_commit
+Parallel_Mode conservative
reset slave 'slave1';
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
-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
-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
+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 conservative 0 1073741824 7 0 60.000
reset slave 'slave1' all;
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
-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;
Warnings:
Note 1938 SLAVE 'slave2' stopped
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
-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;
include/reset_master_slave.inc
include/reset_master_slave.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result
index a49d1f3ae60..34eaa489c59 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel.result
@@ -1138,18 +1138,16 @@ SET GLOBAL slave_parallel_threads=0;
SET GLOBAL slave_parallel_threads=10;
include/start_slave.inc
*** MDEV-6676 - test syntax of @@slave_parallel_mode ***
-Parallel_Mode = 'domain,follow_master_commit'
+Parallel_Mode = 'conservative'
include/stop_slave.inc
-SET GLOBAL slave_parallel_mode='domain,follow_master_commit,transactional';
-ERROR HY000: Invalid use of 'transactional' option for slave_parallel_mode
-SET GLOBAL slave_parallel_mode='waiting,transactional,domain';
-Parallel_Mode = 'domain,transactional,waiting'
-SET GLOBAL slave_parallel_mode='domain,follow_master_commit';
-Parallel_Mode = 'domain,follow_master_commit'
+SET GLOBAL slave_parallel_mode='aggressive';
+Parallel_Mode = 'aggressive'
+SET GLOBAL slave_parallel_mode='conservative';
+Parallel_Mode = 'conservative'
*** MDEV-6676 - test that empty parallel_mode does not replicate in parallel ***
INSERT INTO t2 VALUES (1040);
include/save_master_gtid.inc
-SET GLOBAL slave_parallel_mode='';
+SET GLOBAL slave_parallel_mode='none';
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,slave_crash_if_parallel_apply";
include/start_slave.inc
@@ -1177,7 +1175,7 @@ INSERT INTO t2 VALUES (1045);
INSERT INTO t2 VALUES (1046);
SET gtid_domain_id = 0;
include/save_master_gtid.inc
-SET GLOBAL slave_parallel_mode=follow_master_commit;
+SET GLOBAL slave_parallel_mode=minimal;
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
@@ -1190,7 +1188,7 @@ a
1045
1046
include/stop_slave.inc
-SET GLOBAL slave_parallel_mode='domain,follow_master_commit';
+SET GLOBAL slave_parallel_mode='conservative';
include/start_slave.inc
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_multilevel.result b/mysql-test/suite/rpl/r/rpl_parallel_multilevel.result
index fe45abdc196..ae9389c6266 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_multilevel.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_multilevel.result
@@ -6,26 +6,26 @@ include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
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;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
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;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
-SET GLOBAL slave_parallel_mode='domain,transactional,waiting';
-*** MDEV-6676: Test that @@replicate_allow_parallel is preserved in slave binlog ***
+SET GLOBAL slave_parallel_mode='optimistic';
+*** MDEV-6676: Test that @@skip_parallel_replication is preserved in slave binlog ***
INSERT INTO t1 VALUES(1,1);
BEGIN;
INSERT INTO t1 VALUES(2,1);
INSERT INTO t1 VALUES(3,1);
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;
@@ -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;
-SET SESSION replicate_allow_parallel=1;
+SET SESSION skip_parallel_replication=0;
SELECT * FROM t1 ORDER BY a;
a b
1 1
@@ -73,13 +73,13 @@ Ok, no retry
*** MDEV-6676: Test that the FL_WAITED flag in GTID is preserved in slave binlog ***
include/stop_slave.inc
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
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
CHANGE MASTER TO master_use_gtid=slave_pos;
-SET GLOBAL slave_parallel_mode='domain,transactional';
+SET GLOBAL slave_parallel_mode='optimistic';
BEGIN;
UPDATE t1 SET b=b+1 WHERE a=2;
SET debug_sync="thd_report_wait_for SIGNAL waiting1";
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
index 1f885c7e0e1..2c34a54af1e 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
@@ -6,7 +6,7 @@ include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
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);
BEGIN;
INSERT INTO t1 VALUES(2,1);
@@ -121,10 +121,10 @@ c
204
205
206
-*** Test @@replicate_allow_parallel. ***
+*** Test @@skip_parallel_replication. ***
include/stop_slave.inc
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=30 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=550 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;
a b
1 2
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result
index d51eb295605..91970f3eeb5 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result
@@ -11,7 +11,7 @@ SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
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 ***
INSERT INTO t1 SELECT 4, COUNT(*) FROM t2;
INSERT INTO t2 SELECT 4, COUNT(*) FROM t1;
diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test
index 2f5a45d00ca..3711e8327d8 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel.test
@@ -1847,12 +1847,10 @@ SET GLOBAL slave_parallel_threads=10;
--let $status_items= Parallel_Mode
--source include/show_slave_status.inc
--source include/stop_slave.inc
---error ER_INVALID_SLAVE_PARALLEL_MODE
-SET GLOBAL slave_parallel_mode='domain,follow_master_commit,transactional';
-SET GLOBAL slave_parallel_mode='waiting,transactional,domain';
+SET GLOBAL slave_parallel_mode='aggressive';
--let $status_items= Parallel_Mode
--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
--source include/show_slave_status.inc
@@ -1863,7 +1861,7 @@ INSERT INTO t2 VALUES (1040);
--source include/save_master_gtid.inc
--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
# crash in the parallel apply code.
SET @old_dbug= @@GLOBAL.debug_dbug;
@@ -1897,12 +1895,12 @@ INSERT INTO t2 VALUES (1046);
SET gtid_domain_id = 0;
--source include/save_master_gtid.inc
--connection server_2
-SET GLOBAL slave_parallel_mode=follow_master_commit;
+SET GLOBAL slave_parallel_mode=minimal;
--source include/start_slave.inc
--source include/sync_with_master_gtid.inc
SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
--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
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_multilevel.test b/mysql-test/suite/rpl/t/rpl_parallel_multilevel.test
index 8f6ae7f2e16..168b7ea5167 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_multilevel.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_multilevel.test
@@ -18,7 +18,7 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
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
@@ -29,7 +29,7 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
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
@@ -39,10 +39,10 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
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
INSERT INTO t1 VALUES(1,1);
@@ -52,10 +52,10 @@ INSERT INTO t1 VALUES(3,1);
COMMIT;
# 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
-# 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
# 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;
@@ -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;
-SET SESSION replicate_allow_parallel=1;
+SET SESSION skip_parallel_replication=0;
SELECT * FROM t1 ORDER BY a;
--source include/save_master_gtid.inc
@@ -112,19 +112,19 @@ eval SELECT IF($retry1=$retry2, "Ok, no retry",
--connection server_2
--source include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=slave_pos;
-SET GLOBAL slave_parallel_mode='domain,transactional';
+SET GLOBAL slave_parallel_mode='optimistic';
--connection server_3
--source include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=slave_pos;
-SET GLOBAL slave_parallel_mode='domain,transactional';
+SET GLOBAL slave_parallel_mode='optimistic';
--connection server_4
--source include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=slave_pos;
-SET GLOBAL slave_parallel_mode='domain,transactional';
+SET GLOBAL slave_parallel_mode='optimistic';
--connection server_1
# Do a lot of updates on same row in sequence. Ensure that all of these but the
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
index c1f35588267..7afeb9e2779 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
@@ -15,7 +15,7 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
-SET GLOBAL slave_parallel_mode='domain,transactional';
+SET GLOBAL slave_parallel_mode='optimistic';
--connection server_1
@@ -106,7 +106,7 @@ SELECT * FROM t3 ORDER BY c;
#SHOW STATUS LIKE 'Slave_retried_transactions';
---echo *** Test @@replicate_allow_parallel. ***
+--echo *** Test @@skip_parallel_replication. ***
--connection server_2
--source include/stop_slave.inc
@@ -114,11 +114,11 @@ SELECT * FROM t3 ORDER BY c;
--connection server_1
# 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.
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=30 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=550 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;
--source include/save_master_gtid.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test
index 63a994d0fff..94924147dce 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test
@@ -21,7 +21,7 @@ SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
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 ***
diff --git a/mysql-test/suite/sys_vars/r/replicate_allow_parallel_basic.result b/mysql-test/suite/sys_vars/r/replicate_allow_parallel_basic.result
deleted file mode 100644
index f612bb7ec0c..00000000000
--- a/mysql-test/suite/sys_vars/r/replicate_allow_parallel_basic.result
+++ /dev/null
@@ -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
diff --git a/mysql-test/suite/sys_vars/r/skip_parallel_replication_basic.result b/mysql-test/suite/sys_vars/r/skip_parallel_replication_basic.result
new file mode 100644
index 00000000000..963331805b0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/skip_parallel_replication_basic.result
@@ -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
diff --git a/mysql-test/suite/sys_vars/r/slave_parallel_mode_basic.result b/mysql-test/suite/sys_vars/r/slave_parallel_mode_basic.result
index e997cc49f12..e4c9134374a 100644
--- a/mysql-test/suite/sys_vars/r/slave_parallel_mode_basic.result
+++ b/mysql-test/suite/sys_vars/r/slave_parallel_mode_basic.result
@@ -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
SELECT @@slave_parallel_mode;
@@slave_parallel_mode
-domain
+minimal
SELECT @@m1.slave_parallel_mode;
@@m1.slave_parallel_mode
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';
SELECT @@``.slave_parallel_mode;
@@``.slave_parallel_mode
-domain
+minimal
SELECT @@slave_parallel_mode;
@@slave_parallel_mode
-domain
-Parallel_Mode = 'domain'
+minimal
+Parallel_Mode = 'minimal'
SELECT @@m2.slave_parallel_mode;
@@m2.slave_parallel_mode
NULL
Warnings:
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:
Warning 1617 There is no master connection 'm2'
CHANGE MASTER 'm1' TO master_host='127.0.0.1', master_port=3311, master_user='root';
SELECT @@m1.slave_parallel_mode;
@@m1.slave_parallel_mode
-transactional
-Parallel_Mode = 'domain'
-SET GLOBAL m1.slave_parallel_mode= follow_master_commit;
-Parallel_Mode = 'domain'
+optimistic
+Parallel_Mode = 'minimal'
+SET GLOBAL m1.slave_parallel_mode= conservative;
+Parallel_Mode = 'minimal'
SET default_master_connection= 'm1';
SELECT @@slave_parallel_mode;
@@slave_parallel_mode
-follow_master_commit
-SET GLOBAL slave_parallel_mode= waiting;
+conservative
+SET GLOBAL slave_parallel_mode= aggressive;
SELECT @@slave_parallel_mode;
@@slave_parallel_mode
-waiting
-Parallel_Mode = 'waiting'
+aggressive
+Parallel_Mode = 'aggressive'
SET default_master_connection= '';
SELECT @@slave_parallel_mode;
@@slave_parallel_mode
-domain
+minimal
RESET SLAVE ALL;
RESET SLAVE 'm1' ALL;
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index 07e86e4f9ea..8a793eaeec9 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -3395,20 +3395,6 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
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
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -3675,6 +3661,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
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
SESSION_VALUE OFF
GLOBAL_VALUE NULL
@@ -3817,16 +3817,16 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_PARALLEL_MODE
SESSION_VALUE NULL
-GLOBAL_VALUE domain,follow_master_commit
+GLOBAL_VALUE conservative
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE domain,follow_master_commit
+DEFAULT_VALUE conservative
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE SET
-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_TYPE ENUM
+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_MAX_VALUE 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
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SLAVE_PARALLEL_THREADS
diff --git a/mysql-test/suite/sys_vars/t/replicate_allow_parallel_basic.test b/mysql-test/suite/sys_vars/t/replicate_allow_parallel_basic.test
deleted file mode 100644
index 46dcbc7fafb..00000000000
--- a/mysql-test/suite/sys_vars/t/replicate_allow_parallel_basic.test
+++ /dev/null
@@ -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.
diff --git a/mysql-test/suite/sys_vars/t/skip_parallel_replication_basic.test b/mysql-test/suite/sys_vars/t/skip_parallel_replication_basic.test
new file mode 100644
index 00000000000..3ccac558ea4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/skip_parallel_replication_basic.test
@@ -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.
diff --git a/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic-master.opt b/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic-master.opt
index cc40fa4761f..cd2ccb7eb8b 100644
--- a/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic-master.opt
+++ b/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic-master.opt
@@ -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
diff --git a/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic.test b/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic.test
index 6e82345b8da..4d233b11cc2 100644
--- a/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic.test
+++ b/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic.test
@@ -3,7 +3,7 @@
# Also tests some command line options, in slave_parallel_mode_basic-master.opt
--error ER_GLOBAL_VARIABLE
-SET SESSION slave_parallel_mode= '';
+SET SESSION slave_parallel_mode= none;
SELECT @@slave_parallel_mode;
SELECT @@m1.slave_parallel_mode;
@@ -15,16 +15,16 @@ SELECT @@slave_parallel_mode;
--source include/show_slave_status.inc
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';
SELECT @@m1.slave_parallel_mode;
--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
SET default_master_connection= 'm1';
SELECT @@slave_parallel_mode;
-SET GLOBAL slave_parallel_mode= waiting;
+SET GLOBAL slave_parallel_mode= aggressive;
SELECT @@slave_parallel_mode;
--source include/show_slave_status.inc
SET default_master_connection= '';
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 9bf9da8c9fa..4a7b1e221c9 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -6400,7 +6400,7 @@ Gtid_log_event::Gtid_log_event(THD *thd_arg, uint64 seq_no_arg,
flags2|= FL_DDL;
else if (is_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;
/* Preserve any DDL or WAITED flag in the slave's binlog. */
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. */
bits|= OPTION_GTID_BEGIN;
if (flags2 & FL_ALLOW_PARALLEL)
- bits|= (ulonglong)OPTION_RPL_ALLOW_PARALLEL;
+ bits&= ~(ulonglong)OPTION_RPL_SKIP_PARALLEL;
else
- bits&= ~(ulonglong)OPTION_RPL_ALLOW_PARALLEL;
+ bits|= (ulonglong)OPTION_RPL_SKIP_PARALLEL;
thd->variables.option_bits= bits;
DBUG_PRINT("info", ("Set OPTION_GTID_BEGIN"));
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))
{
my_b_printf(&cache,
- "/*!100101 SET @@session.replicate_allow_parallel=%u*/%s\n",
- !!(flags2 & FL_ALLOW_PARALLEL), print_event_info->delimiter);
+ "/*!100101 SET @@session.skip_parallel_replication=%u*/%s\n",
+ !(flags2 & FL_ALLOW_PARALLEL), print_event_info->delimiter);
print_event_info->allow_parallel= !!(flags2 & FL_ALLOW_PARALLEL);
print_event_info->allow_parallel_printed= true;
}
diff --git a/sql/log_event.h b/sql/log_event.h
index 1cc75e0bd9a..b57ef35aad2 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -3177,8 +3177,8 @@ public:
*/
static const uchar FL_TRANSACTIONAL= 4;
/*
- FL_ALLOW_PARALLEL reflects the value of @@SESSION.replicate_allow_parallel
- at the time of commit.
+ FL_ALLOW_PARALLEL reflects the (negation of the) value of
+ @@SESSION.skip_parallel_replication at the time of commit.
*/
static const uchar FL_ALLOW_PARALLEL= 8;
/*
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 423d07b02cd..80b61e39160 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -562,8 +562,7 @@ ulong stored_program_cache_size= 0;
ulong opt_slave_parallel_threads= 0;
ulong opt_slave_domain_parallel_threads= 0;
-ulonglong opt_slave_parallel_mode=
- SLAVE_PARALLEL_DOMAIN | SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT;
+ulong opt_slave_parallel_mode= SLAVE_PARALLEL_CONSERVATIVE;
ulong opt_binlog_commit_wait_count= 0;
ulong opt_binlog_commit_wait_usec= 0;
ulong opt_slave_parallel_max_queued= 131072;
@@ -7326,16 +7325,16 @@ struct my_option my_long_options[]=
#ifdef HAVE_REPLICATION
{"slave-parallel-mode", OPT_SLAVE_PARALLEL_MODE,
"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.",
+ "--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.",
&opt_slave_parallel_mode, &opt_slave_parallel_mode,
- &slave_parallel_mode_typelib, GET_SET | GET_ASK_ADDR, REQUIRED_ARG,
- SLAVE_PARALLEL_DOMAIN | SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT, 0, 0, 0, 0, 0},
+ &slave_parallel_mode_typelib, GET_ENUM | GET_ASK_ADDR, REQUIRED_ARG,
+ SLAVE_PARALLEL_CONSERVATIVE, 0, 0, 0, 0, 0},
#endif
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
{"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:
{
/* 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;
}
diff --git a/sql/mysqld.h b/sql/mysqld.h
index f89f2e99188..6a1ad65bd67 100644
--- a/sql/mysqld.h
+++ b/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
/*
- Bit masks for the values in --slave-parallel-mode.
- Note that these values cannot be changed - they are stored in master.info,
- so need to be possible to read back in a different version of the server.
+ Values for --slave-parallel-mode
+ Must match order in slave_parallel_mode_typelib in sys_vars.cc.
*/
-#define SLAVE_PARALLEL_DOMAIN (1ULL << 0)
-#define SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT (1ULL << 1)
-#define SLAVE_PARALLEL_TRX (1ULL << 2)
-#define SLAVE_PARALLEL_WAITING (1ULL << 3)
+enum enum_slave_parallel_mode {
+ SLAVE_PARALLEL_NONE,
+ SLAVE_PARALLEL_MINIMAL,
+ SLAVE_PARALLEL_CONSERVATIVE,
+ SLAVE_PARALLEL_OPTIMISTIC,
+ SLAVE_PARALLEL_AGGRESSIVE
+};
/* Function prototypes */
void kill_mysql(void);
@@ -201,7 +203,7 @@ extern ulong stored_program_cache_size;
extern ulong opt_slave_parallel_threads;
extern ulong opt_slave_domain_parallel_threads;
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_usec;
extern my_bool opt_gtid_ignore_duplicates;
diff --git a/sql/rpl_filter.cc b/sql/rpl_filter.cc
index e3ebd329cc4..f1c6d76f7ff 100644
--- a/sql/rpl_filter.cc
+++ b/sql/rpl_filter.cc
@@ -24,7 +24,7 @@
#define TABLE_RULE_ARR_SIZE 16
Rpl_filter::Rpl_filter() :
- parallel_mode(SLAVE_PARALLEL_DOMAIN | SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT),
+ parallel_mode(SLAVE_PARALLEL_CONSERVATIVE),
table_rules_on(0),
do_table_inited(0), ignore_table_inited(0),
wild_do_table_inited(0), wild_ignore_table_inited(0)
diff --git a/sql/rpl_filter.h b/sql/rpl_filter.h
index f08971a9ac1..f24ece30a80 100644
--- a/sql/rpl_filter.h
+++ b/sql/rpl_filter.h
@@ -17,6 +17,7 @@
#define RPL_FILTER_H
#include "mysql.h"
+#include "mysqld.h"
#include "sql_list.h" /* I_List */
#include "hash.h" /* HASH */
@@ -76,12 +77,12 @@ public:
int set_do_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;
}
/* 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;
}
@@ -137,7 +138,7 @@ private:
HASH ignore_table;
DYNAMIC_ARRAY wild_do_table;
DYNAMIC_ARRAY wild_ignore_table;
- ulonglong parallel_mode;
+ enum_slave_parallel_mode parallel_mode;
bool table_rules_on;
bool do_table_inited;
diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h
index 87ac0a5a46b..b74b9cb42b3 100644
--- a/sql/rpl_mi.h
+++ b/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);
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 */
@@ -300,12 +301,8 @@ class Master_info : public Slave_reporting_capability
/* domain-id based filter */
Domain_id_filter domain_id_filter;
- /*
- The parallel replication modes, if any. A combination (binary OR) of any
- of SLAVE_PARALLEL_DOMAIN, SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT,
- SLAVE_PARALLEL_TRX, and SLAVE_PARALLEL_WAITING.
- */
- ulonglong parallel_mode;
+ /* The parallel replication mode. */
+ enum_slave_parallel_mode parallel_mode;
};
int init_master_info(Master_info* mi, const char* master_info_fname,
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc
index e37a82720b5..609f50952c0 100644
--- a/sql/rpl_parallel.cc
+++ b/sql/rpl_parallel.cc
@@ -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);
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);
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);
bool new_gco;
- ulonglong mode= rli->mi->parallel_mode;
+ enum_slave_parallel_mode mode= rli->mi->parallel_mode;
uchar gtid_flags= gtid_ev->flags2;
group_commit_orderer *gco;
uint8 force_switch_flag;
@@ -2093,7 +2093,8 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev,
{
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)
flags|= group_commit_orderer::MULTI_BATCH;
/* 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;
}
- else if ((mode & SLAVE_PARALLEL_TRX) &&
+ else if ((mode >= SLAVE_PARALLEL_OPTIMISTIC) &&
!(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;
if (!(gtid_flags & Gtid_log_event::FL_TRANSACTIONAL) ||
- !(gtid_flags & Gtid_log_event::FL_ALLOW_PARALLEL) ||
- ((gtid_flags & Gtid_log_event::FL_WAITED) &&
- !(mode & SLAVE_PARALLEL_WAITING)))
+ ( (!(gtid_flags & Gtid_log_event::FL_ALLOW_PARALLEL) ||
+ (gtid_flags & Gtid_log_event::FL_WAITED)) &&
+ (mode < SLAVE_PARALLEL_AGGRESSIVE)))
{
/*
This transaction should not be speculatively run in parallel with
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index a5d3ba19b2f..381370e9d4e 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -7115,8 +7115,8 @@ ER_SUBQUERIES_NOT_SUPPORTED 42000
eng "%s does not support subqueries or stored functions."
ER_SET_STATEMENT_NOT_SUPPORTED 42000
eng "The system variable %.200s cannot be set in SET STATEMENT."
-ER_INVALID_SLAVE_PARALLEL_MODE
- eng "Invalid use of '%s' option for slave_parallel_mode"
+ER_UNUSED_17
+ eng "You should never see it"
ER_USER_CREATE_EXISTS
eng "Can't create user '%-.64s'@'%-.64s'; it already exists"
ER_USER_DROP_EXISTS
diff --git a/sql/slave.cc b/sql/slave.cc
index f193659b170..6d64534faf9 100644
--- a/sql/slave.cc
+++ b/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",
FN_REFLEN));
field_list.push_back(new Item_empty_string("Parallel_Mode",
- sizeof("domain,follow_master_commit,transactional,waiting")-1));
+ sizeof("conservative")-1));
if (full)
{
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
{
- /* Note how sizeof("domain") has room for "domain," due to traling 0. */
- char buf[sizeof("domain") + sizeof("follow_master_commit") +
- sizeof("transactional") + sizeof("waiting") + 1];
- 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);
+ const char *mode_name= get_type(&slave_parallel_mode_typelib,
+ mi->parallel_mode);
+ protocol->store(mode_name, strlen(mode_name), &my_charset_bin);
}
if (full)
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index 1389065873c..7ba027d2380 100644
--- a/sql/sql_priv.h
+++ b/sql/sql_priv.h
@@ -181,7 +181,7 @@
*/
#define OPTION_ALLOW_BATCH (1ULL << 36) // THD, intern (slave)
#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 */
#ifndef MYSQL_CLIENT
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 26d4d7ae04b..b535cec7b48 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -1874,18 +1874,12 @@ static Sys_var_ulong Sys_slave_parallel_max_queued(
bool
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;
Master_info *mi;
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)
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)
{
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)
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);
if (!mi)
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[] = {
- "domain", "follow_master_commit", "transactional", "waiting", NULL
+ "none", "minimal", "conservative", "optimistic", "aggressive", NULL
};
export TYPELIB slave_parallel_mode_typelib = {
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(
"slave_parallel_mode",
"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.",
- GLOBAL_VAR(opt_slave_parallel_mode),
- NO_CMD_LINE, slave_parallel_mode_names,
- DEFAULT(SLAVE_PARALLEL_DOMAIN |
- SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT));
-
-
-static Sys_var_bit Sys_replicate_allow_parallel(
- "replicate_allow_parallel",
- "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.",
- SESSION_ONLY(option_bits), NO_CMD_LINE, OPTION_RPL_ALLOW_PARALLEL,
- DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
+ "--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.",
+ GLOBAL_VAR(opt_slave_parallel_mode), NO_CMD_LINE,
+ slave_parallel_mode_names, DEFAULT(SLAVE_PARALLEL_CONSERVATIVE));
+
+
+static Sys_var_bit Sys_skip_parallel_replication(
+ "skip_parallel_replication",
+ "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.",
+ SESSION_ONLY(option_bits), NO_CMD_LINE, OPTION_RPL_SKIP_PARALLEL,
+ DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
static bool
diff --git a/sql/sys_vars.h b/sql/sys_vars.h
index a19102be6ec..61af931c189 100644
--- a/sql/sys_vars.h
+++ b/sql/sys_vars.h
@@ -2312,14 +2312,15 @@ public:
/**
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:
Sys_var_slave_parallel_mode(const char *name_arg,
const char *comment, int flag_args, ptrdiff_t off, size_t size,
- CMD_LINE getopt, const char *values[], ulonglong def_val)
- : Sys_var_set(name_arg, comment, flag_args, off, size,
- getopt, values, def_val)
+ CMD_LINE getopt, const char *values[],
+ enum_slave_parallel_mode def_val)
+ : Sys_var_enum(name_arg, comment, flag_args, off, size,
+ getopt, values, def_val)
{
option.var_type|= GET_ASK_ADDR;
option.value= (uchar**)1; // crash me, please