Debian Codegraph @

mysql-test/suite/rpl_gtid/r/rpl_async_conn_failover_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 greater than 3 and less then 5,
8 # i.e. channel_name, hostname and port must be provided.
9 #
10 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1');
11 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_source'; Wrong arguments: You need to specify all mandatory arguments.
12 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
13 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', 3100, 'net', 30, 11);
14 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_source'; Wrong arguments: You must specify max 5 arguments.
15 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
16 #
17 # 2. Check that the channel name is provided.
18 #
19 SELECT asynchronous_connection_failover_add_source(9, '127.0.0.1', 3100);
20 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_source'; Wrong arguments: You need to specify channel name.
21 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
22 #
23 # 3. Check host parameters values is provided and not empty.
24 #
25 SELECT asynchronous_connection_failover_add_source('', '', 3100);
26 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_source'; Wrong arguments: You need to specify hostname.
27 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
28 #
29 # 4. Check port parameters values is provided.
30 #
31 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', '3100');
32 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_source'; Wrong arguments: You need to specify value for port.
33 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
34 #
35 # 5. Check the weight parameter value is integer value between 1-100.
36 #
37 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', 3100, '', 0);
38 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_source'; Wrong arguments: The weight argument value should be integer value between 1-100.
39 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
40 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', 3100, '', 200);
41 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_source'; Wrong arguments: The weight argument value should be integer value between 1-100.
42 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
43 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', 3100, '', '100');
44 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_source'; Wrong arguments: The weight argument value should be integer value between 1-100.
45 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
46 #
47 # 6. Check the default value of weight parameter is 50.
48 #
49 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', 3100);
50 asynchronous_connection_failover_add_source('', '127.0.0.1', 3100)
51 The UDF asynchronous_connection_failover_add_source() executed successfully.
52 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
53 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
54 SELECT asynchronous_connection_failover_delete_source('', '127.0.0.1', 3100);
55 asynchronous_connection_failover_delete_source('', '127.0.0.1', 3100)
56 The UDF asynchronous_connection_failover_delete_source() executed successfully.
57 #
58 # 7. Check asynchronous_connection_failover_add_source returns warning
59 # on network_namespace value. Also if network_namespace is set through
60 # CHANGE REPLICATION SOURCE TO command that network_namespace is
61 # returned on querying
62 # performance_schema.replication_asynchronous_connection_failover
63 # table for the channel.
64 #
65 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', 3100, 100);
66 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_add_source'; Wrong arguments: You need to specify a string value for network_namespace.
67 include/assert.inc ['There is no row in performance_schema.replication_asynchronous_connection_failover']
68 include/assert.inc ['There is no row in performance_schema.replication_asynchronous_connection_failover']
69 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', 3100, 'blue');
70 asynchronous_connection_failover_add_source('', '127.0.0.1', 3100, 'blue')
71 The UDF asynchronous_connection_failover_add_source() executed successfully.
72 Warnings:
73 Warning 4030 The parameter network_namespace is reserved for future use. Please use the CHANGE REPLICATION SOURCE command to set channel network_namespace parameter.
74 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
75 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
76 CHANGE REPLICATION SOURCE TO SOURCE_HOST="127.0.0.1", SOURCE_USER="root", SOURCE_PASSWORD="", SOURCE_PORT=SERVER_1_PORT, NETWORK_NAMESPACE='red' FOR CHANNEL "";
77 Warnings:
78 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
79 Note 1760 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.
80 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
81 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover with NETWORK_NAMESPACE="red"']
82 #
83 # 8. Check that the parameter count is greater than 3 and less then 4,
84 # i.e. channel_name, hostname and port must be provided.
85 #
86 SELECT asynchronous_connection_failover_delete_source('', '127.0.0.1');
87 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_delete_source'; Wrong arguments: You need to specify all mandatory arguments.
88 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
89 SELECT asynchronous_connection_failover_delete_source('', '127.0.0.1', 3100, 'net', 30);
90 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_delete_source'; Wrong arguments: You must specify max 4 arguments.
91 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
92 #
93 # 9. Check that the channel name is provided.
94 #
95 SELECT asynchronous_connection_failover_delete_source(9, '127.0.0.1', 3100);
96 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_delete_source'; Wrong arguments: You need to specify channel name.
97 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
98 #
99 # 10. Check host parameters values is provided and not empty.
100 #
101 SELECT asynchronous_connection_failover_delete_source('', '', 3100);
102 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_delete_source'; Wrong arguments: You need to specify hostname.
103 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
104 #
105 # 11. Check port parameters values is provided.
106 #
107 SELECT asynchronous_connection_failover_delete_source('', '127.0.0.1', '3100');
108 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_delete_source'; Wrong arguments: You need to specify value for port.
109 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
110 #
111 # 12. Check correct string value is provided for network_namespace.
112 #
113 SELECT asynchronous_connection_failover_delete_source('', '127.0.0.1', 3100, 100);
114 ERROR HY000: Can't initialize function 'asynchronous_connection_failover_delete_source'; Wrong arguments: You need to specify a string value for network_namespace.
115 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
116 #
117 # 13. Add existing credentials. Delete non existing credentials.
118 #
119 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', 3100, '');
120 ERROR HY000: asynchronous_connection_failover_add_source UDF failed; Error inserting row to the table.
121 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
122 SELECT asynchronous_connection_failover_delete_source('', '127.0.0.1', 3100, '');
123 asynchronous_connection_failover_delete_source('', '127.0.0.1', 3100, '')
124 The UDF asynchronous_connection_failover_delete_source() executed successfully.
125 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
126 SELECT asynchronous_connection_failover_delete_source('ch2', '127.0.0.1', 77100);
127 ERROR HY000: asynchronous_connection_failover_delete_source UDF failed; Error no matching row was found to be deleted.
128 include/assert.inc ['The performance_schema.replication_asynchronous_connection_failover table is empty']
129 #
130 # 14. Verify user without SUPER or REPLICATION_SLAVE_ADMIN fails with
131 # ER_SPECIFIC_ACCESS_DENIED_ERROR error when execute
132 # asynchronous_connection_failover_add_source and
133 # asynchronous_connection_failover_delete_source UDF.
134 #
135 CREATE USER 'async_user' IDENTIFIED BY 'pass';
136 [connection connect_async]
137 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', 3100);
138 ERROR 42000: Access denied; you need (at least one of) the SUPER or REPLICATION_SLAVE_ADMIN privilege(s) for this operation
139 SELECT asynchronous_connection_failover_delete_source('', '127.0.0.1', 3100);
140 ERROR 42000: Access denied; you need (at least one of) the SUPER or REPLICATION_SLAVE_ADMIN privilege(s) for this operation
141 SELECT * FROM mysql.replication_asynchronous_connection_failover;
142 ERROR 42000: SELECT command denied to user 'async_user'@'localhost' for table 'replication_asynchronous_connection_failover'
143 SELECT asynchronous_connection_failover_reset();
144 ERROR 42000: Access denied; you need (at least one of) the SUPER or REPLICATION_SLAVE_ADMIN privilege(s) for this operation
145 #
146 # 15. Verify user with REPLICATION_SLAVE_ADMIN privilege can execute
147 # asynchronous_connection_failover_add_source and
148 # asynchronous_connection_failover_delete_source UDF.
149 #
150 [connection master]
151 GRANT REPLICATION_SLAVE_ADMIN ON *.* TO 'async_user';
152 [connection connect_async]
153 SELECT asynchronous_connection_failover_add_source('', '127.0.0.1', 3100);
154 asynchronous_connection_failover_add_source('', '127.0.0.1', 3100)
155 The UDF asynchronous_connection_failover_add_source() executed successfully.
156 SELECT asynchronous_connection_failover_delete_source('', '127.0.0.1', 3100);
157 asynchronous_connection_failover_delete_source('', '127.0.0.1', 3100)
158 The UDF asynchronous_connection_failover_delete_source() executed successfully.
159 SELECT asynchronous_connection_failover_reset();
160 asynchronous_connection_failover_reset()
161 The UDF asynchronous_connection_failover_reset() executed successfully.
162 [connection master]
163 DROP USER 'async_user';
164 include/assert.inc ['There are 0 rows in performance_schema.replication_asynchronous_connection_failover']
165 RESET REPLICA ALL;
166 include/rpl_end.inc