--source include/master-slave.inc connect (master2,localhost,root,,); connect (master3,localhost,root,,); create database db1; create database db2; create database db3; create table db1.t1(f1 int); create table db2.t2(f1 int); create table db3.t3(f1 int); delimiter |; create procedure p1(rep int) begin repeat insert into db1.t1 values(rep); set rep=rep - 1; until 0 >= rep end repeat; end | create procedure p2(rep int) begin repeat insert into db2.t2 values(rep); set rep=rep - 1; until 0 >= rep end repeat; end | create procedure p3(rep int) begin repeat insert into db3.t3 values(rep); set rep=rep - 1; until 0 >= rep end repeat; end | delimiter ;| --sync_slave_with_master stop slave; SET GLOBAL SLAVE_PARALLEL_TYPE='LOGICAL_CLOCK'; SET GLOBAL SLAVE_PARALLEL_WORKERS=5; START SLAVE; connection master; --send call p1(10000) connection master1; --send call p2(10000) connection master2; --send call p3(10000) sleep 1; connection slave; select WORKER_ID, SERVICE_STATE, THREAD_ID, LAST_SEEN_TRANSACTION from performance_schema.replication_execute_status_by_worker; show processlist; sleep 10; select WORKER_ID, SERVICE_STATE, THREAD_ID, LAST_SEEN_TRANSACTION from performance_schema.replication_execute_status_by_worker; show processlist;