mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
45 lines
1,018 B
Text
45 lines
1,018 B
Text
#
|
|
# Test that SHOW PROCESSLIST reports that two slave threads have been involved in applying
|
|
# two independent transactions
|
|
#
|
|
|
|
--source include/galera_cluster.inc
|
|
--source include/have_innodb.inc
|
|
|
|
--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
|
|
|
|
CREATE TABLE t1 (id INT) ENGINE=InnoDB;
|
|
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
|
|
|
|
--connection node_2
|
|
SET GLOBAL wsrep_slave_threads = 2;
|
|
|
|
--connection node_1
|
|
INSERT INTO t1 VALUES (1);
|
|
INSERT INTO t2 VALUES (1);
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
INSERT INTO t2 VALUES (1);
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
INSERT INTO t2 VALUES (1);
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
INSERT INTO t2 VALUES (1);
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
INSERT INTO t2 VALUES (1);
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
INSERT INTO t2 VALUES (1);
|
|
|
|
--connection node_2
|
|
|
|
SELECT COUNT(*) = 10 FROM t1;
|
|
SELECT COUNT(*) = 10 FROM t2;
|
|
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
|
|
|
|
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
|
|
|
|
DROP TABLE t1;
|
|
DROP TABLE t2;
|