Debian Codegraph @

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

raw
1
2 #
3 # Tests for the performance_schema host_cache.
4 #
5 # Simulate failures from DNS full round trip (FCRDNS):
6 # - IP --> HOST --> IP returns no match
7 # - reported in COUNT_FCRDNS_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] Hostname 'santa.claus.ipv4.example.com' does not resolve to '192.0.2.4'.
15 # [Note] Hostname 'santa.claus.ipv4.example.com' has the following IP addresses:
16 # [Note] - 192.0.2.126
17 # [Note] - 192.0.2.127
18 call mtr.add_suppression("santa.claus.ipv4.example.com");
19
20 # Enforce a clean state
21 --source ../include/wait_for_pfs_thread_count.inc
22 --source ../include/hostcache_set_state.inc
23
24 connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
25 select "Con1 is alive";
26 select current_user();
27 disconnect con1;
28
29 --connection default
30 SET @saved_dbug = @@GLOBAL.debug_dbug;
31 set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
32
33 --disable_query_log
34 --error ER_HOST_NOT_PRIVILEGED
35 connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
36 --enable_query_log
37
38 --connection default
39 --source ../include/hostcache_dump.inc
40
41 --disable_query_log
42 --error ER_HOST_NOT_PRIVILEGED
43 connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
44 --enable_query_log
45
46 --connection default
47 --source ../include/hostcache_dump.inc
48
49 SET @@GLOBAL.debug_dbug = @saved_dbug;
50