Skip to content

Commit eeac160

Browse files
author
Anibal Pinto
committed
Merge branch 'mysql-8.0' into mysql-trunk
2 parents 2ff820f + c39aeaf commit eeac160

File tree

7 files changed

+67
-14
lines changed

7 files changed

+67
-14
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
include/group_replication.inc
2+
Warnings:
3+
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4+
Note #### 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.
5+
[connection server1]
6+
7+
####################################################################
8+
# 1. SET PERSIST group_replication_force_members shall fail,
9+
# variable non persistable
10+
SET PERSIST group_replication_force_members = "";
11+
ERROR HY000: Variable 'group_replication_force_members' is a non persistent variable
12+
13+
####################################################################
14+
# 2. SET PERSIST_ONLY group_replication_force_members shall fail,
15+
# variable non persistable
16+
SET PERSIST_ONLY group_replication_force_members = "";
17+
ERROR HY000: Variable 'group_replication_force_members' is a non persistent variable
18+
include/group_replication_end.inc

mysql-test/suite/group_replication/r/gr_persist_only_variables.result

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ CREATE TABLE grvars (id INT PRIMARY KEY AUTO_INCREMENT, varname VARCHAR(64), var
1818
INSERT INTO grvars (varname, varvalue)
1919
SELECT * FROM performance_schema.global_variables
2020
WHERE VARIABLE_NAME LIKE 'group_replication%'
21+
AND VARIABLE_NAME NOT LIKE 'group_replication_force_members'
2122
ORDER BY VARIABLE_NAME;
2223

2324
SET PERSIST_ONLY group_replication_advertise_recovery_endpoints = @@GLOBAL.group_replication_advertise_recovery_endpoints;
@@ -43,7 +44,6 @@ SET PERSIST_ONLY group_replication_flow_control_min_recovery_quota = @@GLOBAL.gr
4344
SET PERSIST_ONLY group_replication_flow_control_mode = @@GLOBAL.group_replication_flow_control_mode;
4445
SET PERSIST_ONLY group_replication_flow_control_period = @@GLOBAL.group_replication_flow_control_period;
4546
SET PERSIST_ONLY group_replication_flow_control_release_percent = @@GLOBAL.group_replication_flow_control_release_percent;
46-
SET PERSIST_ONLY group_replication_force_members = @@GLOBAL.group_replication_force_members;
4747
SET PERSIST_ONLY group_replication_group_name = @@GLOBAL.group_replication_group_name;
4848
SET PERSIST_ONLY group_replication_group_seeds = @@GLOBAL.group_replication_group_seeds;
4949
SET PERSIST_ONLY group_replication_gtid_assignment_block_size = @@GLOBAL.group_replication_gtid_assignment_block_size;
@@ -79,7 +79,7 @@ SET PERSIST_ONLY group_replication_tls_source = @@GLOBAL.group_replication_tls_s
7979
SET PERSIST_ONLY group_replication_transaction_size_limit = @@GLOBAL.group_replication_transaction_size_limit;
8080
SET PERSIST_ONLY group_replication_unreachable_majority_timeout = @@GLOBAL.group_replication_unreachable_majority_timeout;
8181

82-
include/assert.inc ['Expect 58 persisted variables.']
82+
include/assert.inc ['Expect 57 persisted variables.']
8383

8484
############################################################
8585
# 2. Restart server, it must bootstrap the group and preserve
@@ -88,9 +88,9 @@ include/assert.inc ['Expect 58 persisted variables.']
8888
include/rpl_reconnect.inc
8989
include/gr_wait_for_member_state.inc
9090

91-
include/assert.inc ['Expect 58 persisted variables in persisted_variables table.']
92-
include/assert.inc ['Expect 57 variables which last value was set through SET PERSIST.']
93-
include/assert.inc ['Expect 49 persisted variables with matching persisted and global values.']
91+
include/assert.inc ['Expect 57 persisted variables in persisted_variables table.']
92+
include/assert.inc ['Expect 56 variables which last value was set through SET PERSIST.']
93+
include/assert.inc ['Expect 48 persisted variables with matching persisted and global values.']
9494

9595
############################################################
9696
# 3. Test RESET PERSIST IF EXISTS.
@@ -118,7 +118,6 @@ RESET PERSIST IF EXISTS group_replication_flow_control_min_recovery_quota;
118118
RESET PERSIST IF EXISTS group_replication_flow_control_mode;
119119
RESET PERSIST IF EXISTS group_replication_flow_control_period;
120120
RESET PERSIST IF EXISTS group_replication_flow_control_release_percent;
121-
RESET PERSIST IF EXISTS group_replication_force_members;
122121
RESET PERSIST IF EXISTS group_replication_group_name;
123122
RESET PERSIST IF EXISTS group_replication_group_seeds;
124123
RESET PERSIST IF EXISTS group_replication_gtid_assignment_block_size;

mysql-test/suite/group_replication/r/gr_persist_variables.result

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ CREATE TABLE grvars (id INT PRIMARY KEY AUTO_INCREMENT, varname VARCHAR(64), var
1818
INSERT INTO grvars (varname, varvalue)
1919
SELECT * FROM performance_schema.global_variables
2020
WHERE VARIABLE_NAME LIKE '%group_replication%'
21+
AND VARIABLE_NAME NOT LIKE 'group_replication_force_members'
2122
ORDER BY VARIABLE_NAME;
2223

2324
SET PERSIST group_replication_advertise_recovery_endpoints = @@GLOBAL.group_replication_advertise_recovery_endpoints;
@@ -43,7 +44,6 @@ SET PERSIST group_replication_flow_control_min_recovery_quota = @@GLOBAL.group_r
4344
SET PERSIST group_replication_flow_control_mode = @@GLOBAL.group_replication_flow_control_mode;
4445
SET PERSIST group_replication_flow_control_period = @@GLOBAL.group_replication_flow_control_period;
4546
SET PERSIST group_replication_flow_control_release_percent = @@GLOBAL.group_replication_flow_control_release_percent;
46-
SET PERSIST group_replication_force_members = @@GLOBAL.group_replication_force_members;
4747
SET PERSIST group_replication_group_name = @@GLOBAL.group_replication_group_name;
4848
SET PERSIST group_replication_group_seeds = @@GLOBAL.group_replication_group_seeds;
4949
SET PERSIST group_replication_gtid_assignment_block_size = @@GLOBAL.group_replication_gtid_assignment_block_size;
@@ -81,7 +81,7 @@ SET PERSIST group_replication_tls_source = @@GLOBAL.group_replication_tls_source
8181
SET PERSIST group_replication_transaction_size_limit = @@GLOBAL.group_replication_transaction_size_limit;
8282
SET PERSIST group_replication_unreachable_majority_timeout = @@GLOBAL.group_replication_unreachable_majority_timeout;
8383

84-
include/assert.inc ['Expect 58 persisted variables.']
84+
include/assert.inc ['Expect 57 persisted variables.']
8585

8686
############################################################
8787
# 2. Restart server, it must bootstrap the group and preserve
@@ -90,9 +90,9 @@ include/assert.inc ['Expect 58 persisted variables.']
9090
include/rpl_reconnect.inc
9191
include/gr_wait_for_member_state.inc
9292

93-
include/assert.inc ['Expect 58 persisted variables in persisted_variables table.']
94-
include/assert.inc ['Expect 57 variables which last value was set through SET PERSIST.']
95-
include/assert.inc ['Expect 57 variables which last value was set through SET PERSIST is equal to its global value.']
93+
include/assert.inc ['Expect 57 persisted variables in persisted_variables table.']
94+
include/assert.inc ['Expect 56 variables which last value was set through SET PERSIST.']
95+
include/assert.inc ['Expect 56 variables which last value was set through SET PERSIST is equal to its global value.']
9696

9797
############################################################
9898
# 3. Test RESET PERSIST.
@@ -120,7 +120,6 @@ RESET PERSIST group_replication_flow_control_min_recovery_quota;
120120
RESET PERSIST group_replication_flow_control_mode;
121121
RESET PERSIST group_replication_flow_control_period;
122122
RESET PERSIST group_replication_flow_control_release_percent;
123-
RESET PERSIST group_replication_force_members;
124123
RESET PERSIST group_replication_group_name;
125124
RESET PERSIST group_replication_group_seeds;
126125
RESET PERSIST group_replication_gtid_assignment_block_size;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
################################################################################
2+
#
3+
# This test checks isn't possible to SET PERSIST on
4+
# group_replication_force_members variable.
5+
#
6+
# Test:
7+
# 0. This test require one server
8+
# 1. SET PERSIST group_replication_force_members shall fail,
9+
# variable non persistable
10+
# 2. SET PERSIST_ONLY group_replication_force_members shall fail,
11+
# variable non persistable
12+
#
13+
################################################################################
14+
15+
--source include/have_group_replication_plugin.inc
16+
--let $rpl_skip_group_replication_start= 1
17+
--source include/group_replication.inc
18+
19+
--echo
20+
--echo ####################################################################
21+
--echo # 1. SET PERSIST group_replication_force_members shall fail,
22+
--echo # variable non persistable
23+
24+
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
25+
SET PERSIST group_replication_force_members = "";
26+
27+
--echo
28+
--echo ####################################################################
29+
--echo # 2. SET PERSIST_ONLY group_replication_force_members shall fail,
30+
--echo # variable non persistable
31+
32+
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
33+
SET PERSIST_ONLY group_replication_force_members = "";
34+
35+
--source include/group_replication_end.inc

mysql-test/suite/group_replication/t/gr_persist_only_variables.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ CREATE TABLE grvars (id INT PRIMARY KEY AUTO_INCREMENT, varname VARCHAR(64), var
3838
INSERT INTO grvars (varname, varvalue)
3939
SELECT * FROM performance_schema.global_variables
4040
WHERE VARIABLE_NAME LIKE 'group_replication%'
41+
AND VARIABLE_NAME NOT LIKE 'group_replication_force_members'
4142
ORDER BY VARIABLE_NAME;
4243

4344
--let $countvars= `SELECT COUNT(*) FROM grvars;`
@@ -89,7 +90,7 @@ while ( $varid <= $countvars )
8990
--source include/assert.inc
9091

9192
# TODO: Update this once Bug#27322592 is FIXED.
92-
--let $persisted_variables = 49
93+
--let $persisted_variables = 48
9394
--let $assert_text= 'Expect $persisted_variables persisted variables with matching persisted and global values.'
9495
--let $assert_cond= [SELECT COUNT(*) as count FROM performance_schema.variables_info vi JOIN performance_schema.persisted_variables pv JOIN performance_schema.global_variables gv ON vi.variable_name=pv.variable_name AND vi.variable_name=gv.variable_name AND pv.variable_value=gv.variable_value WHERE vi.variable_source="PERSISTED", count, 1] = $persisted_variables
9596
--source include/assert.inc

mysql-test/suite/group_replication/t/gr_persist_variables.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ CREATE TABLE grvars (id INT PRIMARY KEY AUTO_INCREMENT, varname VARCHAR(64), var
3838
INSERT INTO grvars (varname, varvalue)
3939
SELECT * FROM performance_schema.global_variables
4040
WHERE VARIABLE_NAME LIKE '%group_replication%'
41+
AND VARIABLE_NAME NOT LIKE 'group_replication_force_members'
4142
ORDER BY VARIABLE_NAME;
4243

4344
--let $countvars= `SELECT COUNT(*) FROM grvars;`

plugin/group_replication/src/plugin.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3958,7 +3958,7 @@ static MYSQL_SYSVAR_STR(
39583958
force_members, /* name */
39593959
ov.force_members_var, /* var */
39603960
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_MEMALLOC |
3961-
PLUGIN_VAR_PERSIST_AS_READ_ONLY, /* optional var | malloc string*/
3961+
PLUGIN_VAR_NOPERSIST, /* optional var | malloc string*/
39623962
"The list of members, comma separated. E.g., host1:port1,host2:port2. "
39633963
"This option is used to force a new group membership, on which the "
39643964
"excluded "

0 commit comments

Comments
 (0)