Debian Codegraph @

mysql-test/suite/rpl_gtid/r/rpl_async_conn_failover_managed_udf_check.result

raw
1 include/master-slave.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 connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 #
7 # 1. Check that the parameter count is equal to 8.
8 #
9 SELECT asynchronous_connection_failover_add_managed('ch1', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3310);
10 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: You need to specify all mandatory arguments.
11 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
12 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
13 SELECT asynchronous_connection_failover_add_managed('ch1', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3310, '', 80, 60, 11);
14 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: You need to specify all mandatory arguments.
15 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
16 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
17 #
18 # 2. Check that the channel name is provided.
19 #
20 SELECT asynchronous_connection_failover_add_managed(9, 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3310, '', 80, 60);
21 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: You need to specify channel name.
22 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
23 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
24 #
25 # 3. Check that host parameters values is provided and not empty.
26 #
27 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '', 3310, '', 80, 60);
28 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: You need to specify hostname.
29 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
30 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
31 #
32 # 4. Check that port parameters values is provided.
33 #
34 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', '3310', '', 80, 60);
35 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: The port argument should be integer between 1-65535.
36 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
37 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
38 #
39 # 5. Check that the primary_weight parameter value is integer value
40 # between 1-100.
41 #
42 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3310, '', 0, 60);
43 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: The primary_weight argument should be integer between 1-100.
44 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
45 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
46 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3310, '', 180, 60);
47 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: The primary_weight argument should be integer between 1-100.
48 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
49 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
50 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3310, '', '80', 60);
51 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: The primary_weight argument should be integer between 1-100.
52 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
53 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
54 #
55 # 6. Check that the secondary_weight parameter value is integer value
56 # between 1-100.
57 #
58 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3310, '', 80, 0);
59 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: The secondary_weight argument should be integer between 1-100.
60 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
61 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
62 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3310, '', 80, 160);
63 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: The secondary_weight argument should be integer between 1-100.
64 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
65 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
66 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3310, '', 80, '60');
67 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: The secondary_weight argument should be integer between 1-100.
68 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
69 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
70 #
71 # 7. Check that the default value of weight parameter is
72 # secondary_weight.
73 #
74 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3310, '', 80, 60);
75 asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3310, '', 80, 60)
76 The UDF asynchronous_connection_failover_add_managed() executed successfully.
77 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
78 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover with weight=60']
79 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover_managed']
80 #
81 # 8. Check correct string value is provided for network_namespace.
82 #
83 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb', '127.0.0.1', 3310, 100, 80, 60);
84 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong arguments: You need to specify a string value for network_namespace.
85 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
86 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover_managed']
87 SELECT * FROM performance_schema.replication_asynchronous_connection_failover;
88 CHANNEL_NAME HOST PORT NETWORK_NAMESPACE WEIGHT MANAGED_NAME
89 127.0.0.1 3310 60 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
90 SELECT * FROM performance_schema.replication_asynchronous_connection_failover_managed;
91 CHANNEL_NAME MANAGED_NAME MANAGED_TYPE CONFIGURATION
92 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa GroupReplication {"Primary_weight": 80, "Secondary_weight": 60}
93 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb', '10.0.0.10', 1111, 'nets', 20, 10);
94 asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb', '10.0.0.10', 1111, 'nets', 20, 10)
95 The UDF asynchronous_connection_failover_add_managed() executed successfully.
96 Warnings:
97 Warning 4030 The parameter network_namespace is reserved for future use. Please use the CHANGE REPLICATION SOURCE command to set channel network_namespace parameter.
98 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
99 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover_managed']
100 SELECT * FROM performance_schema.replication_asynchronous_connection_failover;
101 CHANNEL_NAME HOST PORT NETWORK_NAMESPACE WEIGHT MANAGED_NAME
102 10.0.0.10 1111 10 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb
103 127.0.0.1 3310 60 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
104 SELECT * FROM performance_schema.replication_asynchronous_connection_failover_managed;
105 CHANNEL_NAME MANAGED_NAME MANAGED_TYPE CONFIGURATION
106 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa GroupReplication {"Primary_weight": 80, "Secondary_weight": 60}
107 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb GroupReplication {"Primary_weight": 20, "Secondary_weight": 10}
108 SELECT asynchronous_connection_failover_add_managed('ch1', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb', '10.0.0.11', 2222, 'blue', 25, 15);
109 asynchronous_connection_failover_add_managed('ch1', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb', '10.0.0.11', 2222, 'blue', 25, 15)
110 The UDF asynchronous_connection_failover_add_managed() executed successfully.
111 Warnings:
112 Warning 4030 The parameter network_namespace is reserved for future use. Please use the CHANGE REPLICATION SOURCE command to set channel network_namespace parameter.
113 include/assert.inc ['There are 2 rows in performance_schema.replication_asynchronous_connection_failover']
114 include/assert.inc ['There are 2 rows in performance_schema.replication_asynchronous_connection_failover_managed']
115 SELECT * FROM performance_schema.replication_asynchronous_connection_failover;
116 CHANNEL_NAME HOST PORT NETWORK_NAMESPACE WEIGHT MANAGED_NAME
117 10.0.0.10 1111 10 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb
118 127.0.0.1 3310 60 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
119 ch1 10.0.0.11 2222 15 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb
120 SELECT * FROM performance_schema.replication_asynchronous_connection_failover_managed;
121 CHANNEL_NAME MANAGED_NAME MANAGED_TYPE CONFIGURATION
122 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa GroupReplication {"Primary_weight": 80, "Secondary_weight": 60}
123 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb GroupReplication {"Primary_weight": 20, "Secondary_weight": 10}
124 ch1 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb GroupReplication {"Primary_weight": 25, "Secondary_weight": 15}
125 SELECT asynchronous_connection_failover_delete_managed('', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb');
126 asynchronous_connection_failover_delete_managed('', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb')
127 The UDF asynchronous_connection_failover_delete_managed() executed successfully.
128 SELECT asynchronous_connection_failover_delete_managed('ch1', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb');
129 asynchronous_connection_failover_delete_managed('ch1', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaabb')
130 The UDF asynchronous_connection_failover_delete_managed() executed successfully.
131 #
132 # 9. Check that the parameter count is equal to 2.
133 # i.e. channel_name, managed_name must be provided.
134 #
135 SELECT asynchronous_connection_failover_delete_managed('');
136 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_delete_managed'; Wrong arguments: You need to specify all mandatory arguments.
137 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
138 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
139 SELECT asynchronous_connection_failover_delete_managed('', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 3);
140 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_delete_managed'; Wrong arguments: You must specify all arguments.
141 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
142 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
143 #
144 # 10. Check that the channel name is provided.
145 #
146 SELECT asynchronous_connection_failover_delete_managed(9, 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa');
147 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_delete_managed'; Wrong arguments: You need to specify channel name.
148 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
149 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
150 #
151 # 11. Check that managed_name parameter value is provided and not empty.
152 #
153 SELECT asynchronous_connection_failover_delete_managed('', '');
154 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_delete_managed'; Wrong arguments: You need to specify managed_name.
155 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
156 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
157 SELECT asynchronous_connection_failover_delete_managed('', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa');
158 asynchronous_connection_failover_delete_managed('', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa')
159 The UDF asynchronous_connection_failover_delete_managed() executed successfully.
160 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
161 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
162 #
163 # 12. Verify user without SUPER or REPLICATION_SLAVE_ADMIN fails with
164 # ER_SPECIFIC_ACCESS_DENIED_ERROR error when execute
165 # asynchronous_connection_failover_add_managed and
166 # asynchronous_connection_failover_delete_managed UDF.
167 #
168 CREATE USER 'async_user' IDENTIFIED BY 'pass';
169 [connection connect_async]
170 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-bbbb-aaaa-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3100, '', 80, 60);
171 ERROR 42000: Access denied; you need (at least one of) the SUPER or REPLICATION_SLAVE_ADMIN privilege(s) for this operation
172 SELECT asynchronous_connection_failover_delete_managed('', 'aaaaaaaa-bbbb-aaaa-aaaa-aaaaaaaaaaaa');
173 ERROR 42000: Access denied; you need (at least one of) the SUPER or REPLICATION_SLAVE_ADMIN privilege(s) for this operation
174 SELECT * FROM mysql.replication_asynchronous_connection_failover;
175 ERROR 42000: SELECT command denied to user 'async_user'@'localhost' for table 'replication_asynchronous_connection_failover'
176 SELECT * FROM mysql.replication_asynchronous_connection_failover_managed;
177 ERROR 42000: SELECT command denied to user 'async_user'@'localhost' for table 'replication_asynchronous_connection_failover_managed'
178 #
179 # 13. Verify user with REPLICATION_SLAVE_ADMIN privilege can execute
180 # asynchronous_connection_failover_add_source and
181 # asynchronous_connection_failover_delete_source UDF.
182 #
183 [connection master]
184 GRANT REPLICATION_SLAVE_ADMIN ON *.* TO 'async_user';
185 [connection connect_async]
186 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-bbbb-bbbb-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3100, '', 80, 60);
187 asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-bbbb-bbbb-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3100, '', 80, 60)
188 The UDF asynchronous_connection_failover_add_managed() executed successfully.
189 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'aaaaaaaa-bbbb-bbbb-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3100, '', 80, 60);
190 ERROR HY000: asynchronous_connection_failover_add_managed UDF failed; Error inserting row to the table.
191 SELECT asynchronous_connection_failover_add_managed('', 'AsyncReplication', 'aaaaaaaa-bbbb-bbbb-aaaa-aaaaaaaaaaaa', '127.0.0.1', 3100, '', 80, 60);
192 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong value: Managed type must be GroupReplication.
193 SELECT asynchronous_connection_failover_add_managed('', 'GroupReplication', 'UUID', '127.0.0.1', 3100, '', 80, 60);
194 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_managed'; Wrong value: Please specify valid UUID for managed name.
195 SELECT asynchronous_connection_failover_delete_managed('', 'aaaaaaaa-bbbb-bbbb-aaaa-aaaaaaaaaaaa');
196 asynchronous_connection_failover_delete_managed('', 'aaaaaaaa-bbbb-bbbb-aaaa-aaaaaaaaaaaa')
197 The UDF asynchronous_connection_failover_delete_managed() executed successfully.
198 SELECT asynchronous_connection_failover_delete_managed('', 'aaaaaaaa-bbbb-bbbb-aaaa-aaaaaaaaaaaa');
199 ERROR HY000: asynchronous_connection_failover_delete_managed UDF failed; Error no matching row was found to be deleted.
200 SELECT asynchronous_connection_failover_delete_managed('', 'UUID');
201 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_delete_managed'; Wrong value: Please specify valid UUID for managed name.
202 [connection master]
203 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
204 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover_managed table is empty']
205 #
206 # 14. Cleanup.
207 #
208 DROP USER 'async_user';
209 SET SESSION sql_log_bin = 0;
210 call mtr.add_suppression("The source .* for channel '.*' has joined the group .*, and so added its entry into replication_asynchronous_connection_failover table.");
211 call mtr.add_suppression("The group .* for the channel .* has been removed, and so removed its entry from replication_asynchronous_connection_failover_managed and all the group members from replication_asynchronous_connection_failover table.");
212 call mtr.add_suppression("The group .* for the channel .* has been added, and so added its entry in replication_asynchronous_connection_failover_managed and source to replication_asynchronous_connection_failover table.");
213 SET SESSION sql_log_bin = 1;
214 include/rpl_end.inc