Debian Codegraph @

mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.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/have_debug.inc
10
11 # [Warning] Hostname 'santa.claus.ipv4.example.com' does not resolve to '192.0.2.4'.
12 # [Note] Hostname 'santa.claus.ipv4.example.com' has the following IP addresses:
13 # [Note] - 192.0.2.126
14 # [Note] - 192.0.2.127
15 call mtr.add_suppression("santa.claus.ipv4.example.com");
16
17 # Enforce a clean state
18 --source ../include/wait_for_pfs_thread_count.inc
19 --source ../include/hostcache_set_state.inc
20
21 create user 'root'@'192.0.2.4';
22 grant select on test.* to 'root'@'192.0.2.4';
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 global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
31
32 connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
33 select "Con2 is alive";
34 select current_user();
35 disconnect con2;
36
37 --connection default
38 --source ../include/hostcache_dump.inc
39
40 connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
41 select "Con3 is alive";
42 select current_user();
43 disconnect con3;
44
45 --connection default
46 --source ../include/hostcache_dump.inc
47
48 revoke select on test.* from 'root'@'192.0.2.4';
49 drop user 'root'@'192.0.2.4';
50
51 set global debug= default;
52