File: gr_start_replication_auto.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (43 lines) | stat: -rw-r--r-- 2,029 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
################################################################################
# WL#7660 - GCS PLUGIN IMPLEMENTATION
#
# This test checks the basic functionality of Group Replication
# plugin which should work with the .opt file in which the plugin
# options are passed as options.
#
# Test:
# 0. The test requires one server. Set group name on .opt file.
# 1. Check group_replication_group_name variable.
# 2. Restart M1 with group_replication_start_on_boot=ON.
# 3. Try executing START GR command. It should error out stating GR is already
#    running.
# 4. Check that the member information is correct in the P_S table.
################################################################################

--source include/have_group_replication_plugin.inc
--source include/force_restart.inc

SELECT @@group_replication_group_name;

# We need to restart server to simulate start_on_boot option since
# on MTR it is impossible to compute ports on configuration files.
--let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address`
--let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds`
--let $restart_parameters=restart:--group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_bootstrap_group=1 --group_replication_start_on_boot=1
--replace_result $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS
--source include/restart_mysqld.inc

SELECT @@group_replication_group_name;
SELECT @@group_replication_start_on_boot;

--error ER_GROUP_REPLICATION_RUNNING
START GROUP_REPLICATION;

#Check if the member information is correct on the table

--let $server_uuid= `SELECT @@GLOBAL.SERVER_UUID`

--let $wait_condition= SELECT count(*)=1 FROM performance_schema.replication_group_members WHERE member_id= '$server_uuid' ;
--source include/wait_condition.inc

--source include/stop_group_replication.inc