| 1 |
include/rpl_init.inc [topology=1->2] |
| 2 |
*** MDEV-5509: Incorrect value for Seconds_Behind_Master if parallel replication *** |
| 3 |
connection server_2; |
| 4 |
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; |
| 5 |
set @old_parallel_mode= @@GLOBAL.slave_parallel_mode; |
| 6 |
include/stop_slave.inc |
| 7 |
SET GLOBAL slave_parallel_threads=5; |
| 8 |
set global slave_parallel_mode= optimistic; |
| 9 |
include/start_slave.inc |
| 10 |
connection server_1; |
| 11 |
CREATE TABLE t1 (a INT PRIMARY KEY, b INT); |
| 12 |
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave"); |
| 13 |
connection server_2; |
| 14 |
connection server_1; |
| 15 |
INSERT INTO t1 VALUES (1,sleep(2)); |
| 16 |
Warnings: |
| 17 |
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave |
| 18 |
connection server_2; |
| 19 |
include/wait_for_slave_param.inc [Seconds_Behind_Master] |
| 20 |
Seconds_Behind_Master should be zero here because the slave is fully caught up and idle. |
| 21 |
Seconds_Behind_Master = '0' |
| 22 |
*** MDEV-8294: Inconsistent behavior of slave parallel threads at runtime *** |
| 23 |
connection server_1; |
| 24 |
INSERT INTO t1 VALUES (10,0); |
| 25 |
SET sql_log_bin= 0; |
| 26 |
DELETE FROM t1 WHERE a=10; |
| 27 |
SET sql_log_bin= 1; |
| 28 |
INSERT INTO t1 VALUES (10,0); |
| 29 |
SELECT * FROM t1 WHERE a >= 10 ORDER BY a; |
| 30 |
a b |
| 31 |
10 0 |
| 32 |
connection server_2; |
| 33 |
include/wait_for_slave_sql_error.inc [errno=1062] |
| 34 |
SET GLOBAL slave_parallel_threads=8; |
| 35 |
STOP SLAVE; |
| 36 |
SET GLOBAL sql_slave_skip_counter= 1; |
| 37 |
include/start_slave.inc |
| 38 |
SELECT * FROM t1 WHERE a >= 10 ORDER BY a; |
| 39 |
a b |
| 40 |
10 0 |
| 41 |
*** MDEV-7818: Deadlock occurring with parallel replication and FTWRL *** |
| 42 |
connection server_1; |
| 43 |
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; |
| 44 |
INSERT INTO t2 VALUES (1,0), (2,0), (3,0); |
| 45 |
connection server_2; |
| 46 |
include/stop_slave.inc |
| 47 |
connection server_1; |
| 48 |
SET @old_dbug= @@SESSION.debug_dbug; |
| 49 |
SET @commit_id= 4242; |
| 50 |
SET SESSION debug_dbug="+d,binlog_force_commit_id"; |
| 51 |
BEGIN; |
| 52 |
UPDATE t2 SET b=b+1 WHERE a=2; |
| 53 |
COMMIT; |
| 54 |
BEGIN; |
| 55 |
INSERT INTO t2 VALUES (4,10); |
| 56 |
COMMIT; |
| 57 |
SET SESSION debug_dbug= @old_dbug; |
| 58 |
INSERT INTO t2 VALUES (5,0); |
| 59 |
INSERT INTO t2 VALUES (6,0); |
| 60 |
INSERT INTO t2 VALUES (7,0); |
| 61 |
INSERT INTO t2 VALUES (8,0); |
| 62 |
INSERT INTO t2 VALUES (9,0); |
| 63 |
INSERT INTO t2 VALUES (10,0); |
| 64 |
INSERT INTO t2 VALUES (11,0); |
| 65 |
INSERT INTO t2 VALUES (12,0); |
| 66 |
INSERT INTO t2 VALUES (13,0); |
| 67 |
INSERT INTO t2 VALUES (14,0); |
| 68 |
INSERT INTO t2 VALUES (15,0); |
| 69 |
INSERT INTO t2 VALUES (16,0); |
| 70 |
INSERT INTO t2 VALUES (17,0); |
| 71 |
INSERT INTO t2 VALUES (18,0); |
| 72 |
INSERT INTO t2 VALUES (19,0); |
| 73 |
connection server_2; |
| 74 |
connect s1, 127.0.0.1, root,, test, $SLAVE_MYPORT,; |
| 75 |
BEGIN; |
| 76 |
SELECT * FROM t2 WHERE a=2 FOR UPDATE; |
| 77 |
a b |
| 78 |
2 0 |
| 79 |
connection server_2; |
| 80 |
include/start_slave.inc |
| 81 |
connect s2, 127.0.0.1, root,, test, $SLAVE_MYPORT,; |
| 82 |
FLUSH TABLES WITH READ LOCK; |
| 83 |
connection s1; |
| 84 |
COMMIT; |
| 85 |
connection s1; |
| 86 |
STOP SLAVE; |
| 87 |
connection s2; |
| 88 |
connection server_1; |
| 89 |
SELECT * FROM t2 ORDER BY a; |
| 90 |
a b |
| 91 |
1 0 |
| 92 |
2 1 |
| 93 |
3 0 |
| 94 |
4 10 |
| 95 |
5 0 |
| 96 |
6 0 |
| 97 |
7 0 |
| 98 |
8 0 |
| 99 |
9 0 |
| 100 |
10 0 |
| 101 |
11 0 |
| 102 |
12 0 |
| 103 |
13 0 |
| 104 |
14 0 |
| 105 |
15 0 |
| 106 |
16 0 |
| 107 |
17 0 |
| 108 |
18 0 |
| 109 |
19 0 |
| 110 |
connection s2; |
| 111 |
UNLOCK TABLES; |
| 112 |
SELECT "after UNLOCK TABLES" as state; |
| 113 |
state |
| 114 |
after UNLOCK TABLES |
| 115 |
connection s1; |
| 116 |
SELECT "after reap of STOP SLAVE" as state; |
| 117 |
state |
| 118 |
after reap of STOP SLAVE |
| 119 |
connection server_2; |
| 120 |
include/wait_for_slave_to_stop.inc |
| 121 |
include/start_slave.inc |
| 122 |
SELECT * FROM t2 ORDER BY a; |
| 123 |
a b |
| 124 |
1 0 |
| 125 |
2 1 |
| 126 |
3 0 |
| 127 |
4 10 |
| 128 |
5 0 |
| 129 |
6 0 |
| 130 |
7 0 |
| 131 |
8 0 |
| 132 |
9 0 |
| 133 |
10 0 |
| 134 |
11 0 |
| 135 |
12 0 |
| 136 |
13 0 |
| 137 |
14 0 |
| 138 |
15 0 |
| 139 |
16 0 |
| 140 |
17 0 |
| 141 |
18 0 |
| 142 |
19 0 |
| 143 |
*** MDEV-8318: Assertion `!pool->busy' failed in pool_mark_busy(rpl_parallel_thread_pool*) on concurrent FTWRL *** |
| 144 |
connection server_1; |
| 145 |
LOCK TABLE t2 WRITE; |
| 146 |
connect m1,localhost,root,,test; |
| 147 |
connection m1; |
| 148 |
FLUSH TABLES WITH READ LOCK; |
| 149 |
connect m2,localhost,root,,test; |
| 150 |
FLUSH TABLES WITH READ LOCK; |
| 151 |
connection server_1; |
| 152 |
KILL QUERY CID; |
| 153 |
connection m1; |
| 154 |
ERROR 70100: Query execution was interrupted |
| 155 |
connection server_1; |
| 156 |
UNLOCK TABLES; |
| 157 |
connection m2; |
| 158 |
UNLOCK TABLES; |
| 159 |
connection server_2; |
| 160 |
include/stop_slave.inc |
| 161 |
SET GLOBAL slave_parallel_threads=@old_parallel_threads; |
| 162 |
set global slave_parallel_mode= @old_parallel_mode; |
| 163 |
include/start_slave.inc |
| 164 |
connection server_1; |
| 165 |
DROP TABLE t1, t2; |
| 166 |
include/rpl_end.inc |