Debian Codegraph @

mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test

raw
1
2 #
3 # Tests for the performance_schema host_cache.
4 #
5 # Simulate failures from DNS:
6 # - getnameinfo() fails with NONAME
7 # - reported in COUNT_NAMEINFO_PERMANENT_ERRORS
8
9 --source include/not_embedded.inc
10 --source include/have_debug.inc
11 --source include/have_perfschema.inc
12 --source include/have_hostname_cache.inc
13
14 # [Warning] IP address '192.0.2.4' could not be resolved:
15 # no reverse address mapping.
16 call mtr.add_suppression("192.0.2.4");
17
18 # Enforce a clean state
19 --source ../include/wait_for_pfs_thread_count.inc
20 --source ../include/hostcache_set_state.inc
21
22 connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
23 select "Con1 is alive";
24 select current_user();
25 disconnect con1;
26
27 --connection default
28 SET @saved_dbug = @@GLOBAL.debug_dbug;
29 set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
30
31 --disable_query_log
32 --error ER_HOST_NOT_PRIVILEGED
33 connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
34 --enable_query_log
35
36 --connection default
37 --source ../include/hostcache_dump.inc
38
39 --disable_query_log
40 --error ER_HOST_NOT_PRIVILEGED
41 connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
42 --enable_query_log
43
44 --connection default
45 --source ../include/hostcache_dump.inc
46
47 SET @@GLOBAL.debug_dbug = @saved_dbug;
48