Skip to content

Commit 9123faf

Browse files
author
Hemant Dangi
committed
Bug#26519582: GR_SINGLE_PRIMARY_ASYNC_AFTER_GR_SECONDARY FAILING ON HUDSON
Issue: ====== The testcase failing because of concurrent DDL statement execution. The change master which is executed on server2 is blocked by create table (initially executed on server1) when applied on server2 as it had higher priority. Solution: ========= Move create table on server1 below change master statement on server2, so they are not executed concurrently.
1 parent 508d7f5 commit 9123faf

File tree

2 files changed

+26
-17
lines changed

2 files changed

+26
-17
lines changed

rapid/plugin/group_replication/tests/mtr/r/gr_single_primary_async_after_gr_secondary.result

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,25 @@ include/start_and_bootstrap_group_replication.inc
1010
[connection server2]
1111
include/start_group_replication.inc
1212

13-
# 2. Add some data to server1 & 3
13+
# 2. Create new channel ch3_2: server2(slave), server3(master)
14+
[connection server2]
15+
CHANGE MASTER TO MASTER_HOST='localhost', MASTER_USER='root', MASTER_PORT=SERVER_3_PORT for channel 'ch3_2';
16+
Warnings:
17+
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
18+
Note 1760 Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
19+
20+
# 3. Add some data to server1 & 3
1421
[connection server1]
1522
CREATE TABLE test.t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
1623
INSERT INTO test.t1 VALUES (1);
1724
[connection server3]
1825
CREATE TABLE test.t2 (c1 INT NOT NULL) ENGINE=InnoDB;
1926
INSERT INTO test.t2 VALUES (1);
2027

21-
# 3. Create new channel ch3_2: server2(slave), server3(master)
22-
[connection server2]
23-
CHANGE MASTER TO MASTER_HOST='localhost', MASTER_USER='root', MASTER_PORT=SERVER_3_PORT for channel 'ch3_2';
24-
Warnings:
25-
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
26-
Note 1760 Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
28+
# 4. Verify the error scenarios.
2729

2830
# 4.1 start slave and verify for error ER_SLAVE_FATAL_ERROR
31+
[connection server2]
2932
START SLAVE FOR CHANNEL 'ch3_2';
3033
include/wait_for_slave_io_error.inc [errno=1593]
3134
include/wait_for_slave_sql_error.inc [errno=1593]

rapid/plugin/group_replication/tests/mtr/t/gr_single_primary_async_after_gr_secondary.test

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# Test:
66
#
77
# 1. Start GR on server1 & 2.
8-
# 2. Add some data to server1 & 3.
9-
# 3. Create new channel ch3_2: server2(slave), server3(master).
8+
# 2. Create new channel ch3_2: server2(slave), server3(master).
9+
# 3. Add some data to server1 & 3.
1010
# 4. Verify for following scenarios:
1111
# 1. start slave and and verify for
1212
# ER_GROUP_REPLICATION_CONFIGURATION error.
@@ -40,7 +40,16 @@
4040
--source include/start_group_replication.inc
4141

4242
--echo
43-
--echo # 2. Add some data to server1 & 3
43+
--echo # 2. Create new channel ch3_2: server2(slave), server3(master)
44+
--let $rpl_connection_name= server2
45+
--source include/rpl_connection.inc
46+
47+
--replace_result $SERVER_MYPORT_3 SERVER_3_PORT
48+
--eval CHANGE MASTER TO MASTER_HOST='localhost', MASTER_USER='root', MASTER_PORT=$SERVER_MYPORT_3 for channel 'ch3_2'
49+
50+
51+
--echo
52+
--echo # 3. Add some data to server1 & 3
4453

4554
# server1: create table t1 and add data
4655
--let $rpl_connection_name= server1
@@ -56,13 +65,7 @@ INSERT INTO test.t2 VALUES (1);
5665

5766

5867
--echo
59-
--echo # 3. Create new channel ch3_2: server2(slave), server3(master)
60-
--let $rpl_connection_name= server2
61-
--source include/rpl_connection.inc
62-
63-
--replace_result $SERVER_MYPORT_3 SERVER_3_PORT
64-
--eval CHANGE MASTER TO MASTER_HOST='localhost', MASTER_USER='root', MASTER_PORT=$SERVER_MYPORT_3 for channel 'ch3_2'
65-
68+
--echo # 4. Verify the error scenarios.
6669

6770
# variables for wait_for_slave_io_error.inc and wait_for_slave_sql_error.inc
6871
--let $rpl_channel_name=ch3_2
@@ -77,6 +80,9 @@ INSERT INTO test.t2 VALUES (1);
7780

7881
--echo
7982
--echo # 4.1 start slave and verify for error ER_SLAVE_FATAL_ERROR
83+
--let $rpl_connection_name= server2
84+
--source include/rpl_connection.inc
85+
8086
START SLAVE FOR CHANNEL 'ch3_2';
8187
--source include/wait_for_slave_io_error.inc
8288
--source include/wait_for_slave_sql_error.inc

0 commit comments

Comments
 (0)