Debian Codegraph @

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

raw
1
2 #
3 # Tests for the performance_schema host_cache.
4 #
5 # Simulate success from DNS full round trip (FCRDNS):
6 # - IP --> HOST --> IP returns the client IP
7 # - completes host validation in HOST_VALIDATED
8
9 --source include/have_debug.inc
10 --source include/have_ipv6.inc
11
12 # [Warning] IP address '192.0.2.4' could not be resolved:
13 # no reverse address mapping.
14 call mtr.add_suppression("192.0.2.4");
15
16 # Enforce a clean state
17 --source ../include/wait_for_pfs_thread_count.inc
18 --source ../include/hostcache_set_state.inc
19
20 create user 'root'@'santa.claus.ipv6.example.com';
21 grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
22
23 connect (con1,"::1",root,,test,$MASTER_MYPORT,);
24 select "Con1 is alive";
25 select current_user();
26 disconnect con1;
27
28 --connection default
29 set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
30
31 connect (con2,"::1",root,,test,$MASTER_MYPORT,);
32 select "Con2 is alive";
33 select current_user();
34 disconnect con2;
35
36 --connection default
37 --source ../include/hostcache_dump.inc
38
39 connect (con3,"::1",root,,test,$MASTER_MYPORT,);
40 select "Con3 is alive";
41 select current_user();
42 disconnect con3;
43
44 --connection default
45 --source ../include/hostcache_dump.inc
46
47 revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
48 drop user 'root'@'santa.claus.ipv6.example.com';
49
50 set global debug= default;
51