Debian Codegraph @

mysql-test/suite/perfschema/t/hostcache_ipv6_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/not_embedded.inc
10 --source include/have_debug.inc
11 --source include/check_ipv6.inc
12 --source include/have_perfschema.inc
13 --source include/have_hostname_cache.inc
14
15 # [Warning] Hostname 'santa.claus.ipv6.example.com' does not resolve to '2001:db8::6:6'.
16 # [Note] Hostname 'santa.claus.ipv6.example.com' has the following IP addresses:
17 # [Note] - 2001:db8::6:7e
18 # [Note] - 2001:db8::6:7f
19 call mtr.add_suppression("santa.claus.ipv6.example.com");
20
21 # Enforce a clean state
22 --source ../include/wait_for_pfs_thread_count.inc
23 --source ../include/hostcache_set_state.inc
24
25 create user 'root'@'2001:db8::6:6';
26 grant select on test.* to 'root'@'2001:db8::6:6';
27
28 connect (con1,"::1",root,,test,$MASTER_MYPORT,);
29 select "Con1 is alive";
30 select current_user();
31 disconnect con1;
32
33 --connection default
34 SET @saved_dbug = @@GLOBAL.debug_dbug;
35 set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
36
37 connect (con2,"::1",root,,test,$MASTER_MYPORT,);
38 select "Con2 is alive";
39 select current_user();
40 disconnect con2;
41
42 --connection default
43 --source ../include/hostcache_dump.inc
44
45 connect (con3,"::1",root,,test,$MASTER_MYPORT,);
46 select "Con3 is alive";
47 select current_user();
48 disconnect con3;
49
50 --connection default
51 --source ../include/hostcache_dump.inc
52
53 revoke select on test.* from 'root'@'2001:db8::6:6';
54 drop user 'root'@'2001:db8::6:6';
55
56 SET @@GLOBAL.debug_dbug = @saved_dbug;
57