File: gr_member_lengthy_hostname.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 (71 lines) | stat: -rw-r--r-- 3,186 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
################################################################################
#
# WL#12571: Support fully qualified hostnames longer than 60 characters
#
# This test validates that if the user sets up the member to report
# a specific hostname larger then 60 chars, the group replication
# performance_schema tables are able to display it.
#
################################################################################
--let $group_replication_group_name= `SELECT UUID()`
--source include/have_group_replication_plugin.inc
--source include/force_restart.inc

--let $lengthy_hostname=host_1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890

--connection server1
--source include/start_and_bootstrap_group_replication.inc

--echo #####################################################################
--echo # 1.a Verify that when startup options report-host is not set, its value
--echo # shown on MEMBER_PORT value is as defined on rpl_1slave_base.cnf

--let $assert_text= The performance_schema.replication_group_members.MEMBER_HOST matches with hostname system variable
--let $assert_cond= "[SELECT MEMBER_HOST FROM performance_schema.replication_group_members]" = "127.0.0.1";
--source include/assert.inc

--echo #####################################################################
--echo # 2. Verify that when startup options report-host and report-port are
--echo # set, performance_schema.replication_group_members.MEMBER_HOST and
--echo # MEMBER_PORT are set equal to report-host and report-port.

--let $new_host= $lengthy_hostname
--let $new_port= 24844

# restart server with report-host and report-port parameters
--let $allow_rpl_inited=1
--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:--report-host=$new_host --report-port=$new_port --group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds
--replace_result $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS
--source include/restart_mysqld.inc

--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--enable_reconnect

--source include/start_and_bootstrap_group_replication.inc

--let $i=1
while($i>0)
{
  if ($i == 1)
  {
    #
    # 1. Assertion: assert that the hostname reported in SHOW SLAVE STATUS is correct
    #
    --let $hostname_read= `SELECT MEMBER_HOST FROM performance_schema.replication_group_members`
    --let $hostname_source= performance_schema.replication_group_members
  }

  --let $assert_cond= "$hostname_read" = "$lengthy_hostname"
  --let $assert_text= Hostname in $hostname_source matches the one set through CHANGE MASTER TO
  --source include/assert.inc

  --dec $i
}

--source include/stop_group_replication.inc

# clean up
--let $restart_parameters=