Skip to content

Commit b513e37

Browse files
committed
Clean up some Galera tests.
Note: At least one test is unstable, failing with the following: ./mtr --mysqld=--innodb-purge-threads=9 --big-test --no-reorder \ galera.galera_parallel_autoinc_largetrx galera.galera_var_slave_threads The result difference is dependent on innodb_purge_threads.
1 parent 51af198 commit b513e37

7 files changed

+51
-38
lines changed

mysql-test/suite/galera/r/galera_mdev_10812.result

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22
# MDEV-10812: On COM_STMT_CLOSE/COM_QUIT, when wsrep_conflict_state
33
# is ABORTED, it causes wrong response to be sent to the client
44
#
5+
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
56
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
67
CREATE TABLE t1(a INT PRIMARY KEY);
78
INSERT INTO t1 VALUES(1),(2),(3);
89
START TRANSACTION ;
910
UPDATE t1 SET a=a+100;
11+
connection node_2;
1012
UPDATE t1 SET a=a+100;
13+
connection node_1a;
14+
disconnect node_1a;
15+
connection node_2;
1116
DROP TABLE t1;

mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
1313
connection node_1;
1414
connection node_1a;
1515
connection node_2;
16-
SELECT COUNT(*) = 30000 FROM t1;
17-
COUNT(*) = 30000
18-
1
19-
SELECT COUNT(DISTINCT f1) = 30000 FROM t1;
20-
COUNT(DISTINCT f1) = 30000
21-
1
22-
SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE
16+
SELECT COUNT(*) FROM t1;
17+
COUNT(*)
18+
30000
19+
SELECT COUNT(DISTINCT f1) FROM t1;
20+
COUNT(DISTINCT f1)
21+
30000
22+
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE
2323
USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
24-
COUNT(*) = 5
25-
1
24+
COUNT(*)
25+
5
2626
connection default;
2727
DROP TABLE t1;
2828
DROP TABLE ten;

mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ connection node_2;
2424
SET GLOBAL wsrep_certify_nonPK = 1;
2525
DROP TABLE t1;
2626
DROP TABLE t2;
27+
connection node_1;
2728
call mtr.add_suppression("SQL statement was ineffective");
29+
disconnect node_2;
30+
disconnect node_1;

mysql-test/suite/galera/r/galera_var_max_ws_rows.result

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,14 @@ DROP TABLE ten;
118118
# wsrep_max_ws_rows causes cluster to break when running
119119
# Galera cluster in TOI mode
120120
#
121+
connection node_1;
121122
CREATE TABLE t1(c1 INT)ENGINE = INNODB;
122123
SET GLOBAL wsrep_max_ws_rows= DEFAULT;
123124
INSERT INTO t1 VALUES(1);
124125
INSERT INTO t1 SELECT * FROM t1;
125126
SET GLOBAL wsrep_max_ws_rows= 1;
126127
ALTER TABLE t1 CHANGE COLUMN c1 c1 BIGINT;
128+
connection node_2;
127129
SHOW CREATE TABLE t1;
128130
Table Create Table
129131
t1 CREATE TABLE `t1` (
@@ -133,3 +135,6 @@ SELECT COUNT(*) FROM t1;
133135
COUNT(*)
134136
2
135137
DROP TABLE t1;
138+
connection node_1;
139+
disconnect node_2;
140+
disconnect node_1;

mysql-test/suite/galera/r/galera_var_slave_threads.result

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ SELECT @@wsrep_slave_threads = 1;
1212
@@wsrep_slave_threads = 1
1313
1
1414
SET GLOBAL wsrep_slave_threads = 1;
15-
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST
15+
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
1616
WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
17-
COUNT(*) = 2
18-
1
19-
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
20-
COUNT(*) = 1
17+
COUNT(*)
18+
2
19+
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
20+
COUNT(*)
2121
1
2222
SET GLOBAL wsrep_slave_threads = 64;
2323
connection node_1;
2424
INSERT INTO t1 VALUES (1);
2525
connection node_2;
26-
SELECT COUNT(*) = 1 FROM t1;
27-
COUNT(*) = 1
26+
SELECT COUNT(*) FROM t1;
27+
COUNT(*)
2828
1
29-
SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
29+
SELECT COUNT(*) - @@wsrep_slave_threads FROM INFORMATION_SCHEMA.PROCESSLIST
3030
WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
31-
COUNT(*) = @@wsrep_slave_threads + 1
31+
COUNT(*) - @@wsrep_slave_threads
3232
1
33-
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
34-
COUNT(*) = 1
33+
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
34+
COUNT(*)
3535
1
3636
SET GLOBAL wsrep_slave_threads = 1;
3737
connection node_1;
@@ -100,15 +100,15 @@ INSERT INTO t2 VALUES (DEFAULT);
100100
INSERT INTO t2 VALUES (DEFAULT);
101101
INSERT INTO t2 VALUES (DEFAULT);
102102
connection node_2;
103-
SELECT COUNT(*) = 64 FROM t2;
104-
COUNT(*) = 64
105-
1
106-
SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
103+
SELECT COUNT(*) FROM t2;
104+
COUNT(*)
105+
64
106+
SELECT COUNT(*) - @@wsrep_slave_threads FROM INFORMATION_SCHEMA.PROCESSLIST
107107
WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
108-
COUNT(*) = @@wsrep_slave_threads + 1
108+
COUNT(*) - @@wsrep_slave_threads
109109
1
110-
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
111-
COUNT(*) = 1
110+
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
111+
COUNT(*)
112112
1
113113
SET GLOBAL wsrep_slave_threads = 1;
114114
DROP TABLE t1;

mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ SET GLOBAL wsrep_slave_threads = 4;
3737

3838
--connection node_2
3939
--reap
40-
SELECT COUNT(*) = 30000 FROM t1;
41-
SELECT COUNT(DISTINCT f1) = 30000 FROM t1;
42-
SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE
40+
SELECT COUNT(*) FROM t1;
41+
SELECT COUNT(DISTINCT f1) FROM t1;
42+
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE
4343
USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
4444

4545
--disable_query_log

mysql-test/suite/galera/t/galera_var_slave_threads.test

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ SELECT @@wsrep_slave_threads = 1;
2222

2323
SET GLOBAL wsrep_slave_threads = 1;
2424
# There is a separate wsrep_aborter thread at all times
25-
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST
25+
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
2626
WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
27-
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
27+
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
2828

2929
#
3030
# Increase the number of slave threads. The change takes effect immediately
@@ -37,11 +37,11 @@ SET GLOBAL wsrep_slave_threads = 64;
3737
INSERT INTO t1 VALUES (1);
3838

3939
--connection node_2
40-
SELECT COUNT(*) = 1 FROM t1;
40+
SELECT COUNT(*) FROM t1;
4141

42-
SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
42+
SELECT COUNT(*) - @@wsrep_slave_threads FROM INFORMATION_SCHEMA.PROCESSLIST
4343
WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
44-
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
44+
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
4545

4646
#
4747
# Reduce the number of slave threads. The change is not immediate -- a thread will only exit after a replication event
@@ -60,11 +60,11 @@ while ($count)
6060
}
6161

6262
--connection node_2
63-
SELECT COUNT(*) = 64 FROM t2;
63+
SELECT COUNT(*) FROM t2;
6464

65-
SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
65+
SELECT COUNT(*) - @@wsrep_slave_threads FROM INFORMATION_SCHEMA.PROCESSLIST
6666
WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
67-
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
67+
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
6868

6969

7070
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig

0 commit comments

Comments
 (0)