1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-15501 : Make proxy_protocol_networks variable read-write.

This commit is contained in:
Vladislav Vaintroub
2018-03-21 18:09:52 +00:00
parent 865cec928a
commit 96ecf3ff23
5 changed files with 152 additions and 30 deletions

View File

@@ -20220,6 +20220,18 @@ static void test_proxy_header_ignore()
mysql_optionsv(m, MARIADB_OPT_PROXY_HEADER, &v2_header,16);
DIE_UNLESS(mysql_real_connect(m, opt_host, "root", "", NULL, opt_port, opt_unix_socket, 0) == m);
mysql_close(m);
/* test for connection denied with empty proxy_protocol_networks */
int rc = mysql_query(mysql, "select @@proxy_protocol_networks into @sv_proxy_protocol_networks");
myquery(rc);
mysql_query(mysql, "set global proxy_protocol_networks=default");
myquery(rc);
m = mysql_client_init(NULL);
mysql_optionsv(m, MARIADB_OPT_PROXY_HEADER, &v2_header,16);
DIE_UNLESS(mysql_real_connect(m, opt_host, "root", "", NULL, opt_port, opt_unix_socket, 0) == 0);
mysql_close(m);
mysql_query(mysql, "set global proxy_protocol_networks= @sv_proxy_protocol_networks");
myquery(rc);
}