summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2018-03-21 18:09:52 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2018-03-23 20:23:12 +0000
commit96ecf3ff23011ee7e8b92da5d9561d9cd7e75d53 (patch)
treef584ddc42bd0b8540b4813c3609522af8117c55e /tests
parent865cec928a0f33ea1e6f71d0a3d8ac0d0570252a (diff)
downloadmariadb-git-96ecf3ff23011ee7e8b92da5d9561d9cd7e75d53.tar.gz
MDEV-15501 : Make `proxy_protocol_networks` variable read-write.
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index f188287a001..0289e26ad05 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -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);
}