set sql_log_bin = 0;
|
create table t1 (i int) engine=MyISAM;
|
set sql_log_bin = 1;
|
insert into t1 values (1);
|
show processlist;
|
Id User Host db Command Time State Info Progress
|
4 root localhost:34846 test Sleep 0 NULL 0.000
|
5 root localhost:34847 test Sleep 1 NULL 0.000
|
6 system user NULL Connect 0 Queueing master event to the relay log NULL 0.000
|
7 system user NULL Connect 0 Reading event from the relay log NULL 0.000
|
8 root localhost:34853 test Query 0 init show processlist 0.000
|
9 root localhost:34854 test Sleep 0 NULL 0.000
|
Last_SQL_Error = 'Error 'Table 'test.t1' doesn't exist' on query. Default database: 'test'. Query: 'insert into t1 values (1)''
|
Slave_SQL_Running = 'No'
|
show processlist;
|
Id User Host db Command Time State Info Progress
|
4 root localhost:34846 test Sleep 1 NULL 0.000
|
5 root localhost:34847 test Sleep 2 NULL 0.000
|
6 system user NULL Connect 1 Waiting for master to send event NULL 0.000
|
8 root localhost:34853 test Query 0 init show processlist 0.000
|
9 root localhost:34854 test Sleep 1 NULL 0.000
|
include/stop_slave.inc
|
show processlist;
|
Id User Host db Command Time State Info Progress
|
4 root localhost:34846 test Sleep 1 NULL 0.000
|
5 root localhost:34847 test Sleep 2 NULL 0.000
|
8 root localhost:34853 test Query 0 init show processlist 0.000
|
9 root localhost:34854 test Sleep 1 NULL 0.000
|
SET GLOBAL slave_parallel_threads=5;
|
show processlist;
|
Id User Host db Command Time State Info Progress
|
4 root localhost:34846 test Sleep 1 NULL 0.000
|
5 root localhost:34847 test Sleep 2 NULL 0.000
|
8 root localhost:34853 test Query 0 init show processlist 0.000
|
9 root localhost:34854 test Sleep 1 NULL 0.000
|
start slave;
|
show processlist;
|
Id User Host db Command Time State Info Progress
|
4 root localhost:34846 test Sleep 2 NULL 0.000
|
5 root localhost:34847 test Sleep 3 NULL 0.000
|
8 root localhost:34853 test Query 0 init show processlist 0.000
|
9 root localhost:34854 test Sleep 2 NULL 0.000
|
10 system user NULL Connect 1 Waiting for master to send event NULL 0.000
|
11 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
12 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
13 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
14 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
15 system user NULL Connect 2 Waiting for work from SQL thread NULL 0.000
|
include/stop_slave.inc
|
show processlist;
|
Id User Host db Command Time State Info Progress
|
4 root localhost:34846 test Sleep 2 NULL 0.000
|
5 root localhost:34847 test Sleep 3 NULL 0.000
|
8 root localhost:34853 test Query 0 init show processlist 0.000
|
9 root localhost:34854 test Sleep 2 NULL 0.000
|
11 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
12 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
13 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
14 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
15 system user NULL Connect 2 Waiting for work from SQL thread NULL 0.000
|
SET GLOBAL slave_parallel_threads=1;
|
show processlist;
|
Id User Host db Command Time State Info Progress
|
4 root localhost:34846 test Sleep 2 NULL 0.000
|
5 root localhost:34847 test Sleep 3 NULL 0.000
|
8 root localhost:34853 test Query 0 init show processlist 0.000
|
9 root localhost:34854 test Sleep 2 NULL 0.000
|
11 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
12 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
13 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
14 system user NULL Connect 1 Waiting for work from SQL thread NULL 0.000
|
15 system user NULL Connect 2 Waiting for work from SQL thread NULL 0.000
|
start slave;
|
show processlist;
|
Id User Host db Command Time State Info Progress
|
4 root localhost:34846 test Sleep 3 NULL 0.000
|
5 root localhost:34847 test Sleep 4 NULL 0.000
|
8 root localhost:34853 test Query 0 init show processlist 0.000
|
9 root localhost:34854 test Sleep 3 NULL 0.000
|
11 system user NULL Connect 2 Waiting for work from SQL thread NULL 0.000
|
12 system user NULL Connect 2 Waiting for work from SQL thread NULL 0.000
|
13 system user NULL Connect 2 Waiting for work from SQL thread NULL 0.000
|
14 system user NULL Connect 2 Waiting for work from SQL thread NULL 0.000
|
15 system user NULL Connect 3 Waiting for work from SQL thread NULL 0.000
|
17 system user NULL Connect 1 Waiting for master to send event NULL 0.000
|