| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
connection server_2; |
| 4 |
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; |
| 5 |
SET GLOBAL slave_parallel_threads=10; |
| 6 |
ERROR HY000: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first |
| 7 |
include/stop_slave.inc |
| 8 |
SET GLOBAL slave_parallel_threads=10; |
| 9 |
SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user"; |
| 10 |
IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) |
| 11 |
OK |
| 12 |
CHANGE MASTER TO master_use_gtid=slave_pos; |
| 13 |
include/start_slave.inc |
| 14 |
SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user"; |
| 15 |
IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) |
| 16 |
OK |
| 17 |
include/stop_slave.inc |
| 18 |
SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user"; |
| 19 |
IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) |
| 20 |
OK |
| 21 |
include/start_slave.inc |
| 22 |
SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user"; |
| 23 |
IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) |
| 24 |
OK |
| 25 |
*** Test long-running query in domain 1 can run in parallel with short queries in domain 0 *** |
| 26 |
connection server_1; |
| 27 |
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; |
| 28 |
CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM; |
| 29 |
CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB; |
| 30 |
INSERT INTO t1 VALUES (1); |
| 31 |
INSERT INTO t2 VALUES (1); |
| 32 |
connection server_2; |
| 33 |
connect con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,; |
| 34 |
LOCK TABLE t1 WRITE; |
| 35 |
connection server_1; |
| 36 |
SET gtid_domain_id=1; |
| 37 |
INSERT INTO t1 VALUES (2); |
| 38 |
SET gtid_domain_id=0; |
| 39 |
INSERT INTO t2 VALUES (2); |
| 40 |
INSERT INTO t2 VALUES (3); |
| 41 |
BEGIN; |
| 42 |
INSERT INTO t2 VALUES (4); |
| 43 |
INSERT INTO t2 VALUES (5); |
| 44 |
COMMIT; |
| 45 |
INSERT INTO t2 VALUES (6); |
| 46 |
connection server_2; |
| 47 |
SELECT * FROM t2 ORDER by a; |
| 48 |
a |
| 49 |
1 |
| 50 |
2 |
| 51 |
3 |
| 52 |
4 |
| 53 |
5 |
| 54 |
6 |
| 55 |
connection con_temp1; |
| 56 |
SELECT * FROM t1; |
| 57 |
a |
| 58 |
1 |
| 59 |
UNLOCK TABLES; |
| 60 |
connection server_2; |
| 61 |
SELECT * FROM t1 ORDER BY a; |
| 62 |
a |
| 63 |
1 |
| 64 |
2 |
| 65 |
connection server_2; |
| 66 |
include/stop_slave.inc |
| 67 |
SET GLOBAL slave_parallel_threads=@old_parallel_threads; |
| 68 |
include/start_slave.inc |
| 69 |
connection server_1; |
| 70 |
DROP TABLE t1,t2; |
| 71 |
include/rpl_end.inc |