Debian Codegraph @

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

raw
1
2 #
3 # Tests for the performance_schema host_cache.
4 #
5 # Simulate failures from DNS:
6 # - getaddrinfo() fails with AGAIN
7 # - reported in COUNT_ADDRINFO_TRANSIENT_ERRORS
8
9 --source include/have_debug.inc
10 --source include/have_ipv6.inc
11
12 # [Warning] Host name 'santa.claus.ipv6.example.com' could not be resolved:
13 # Name or service not known
14 call mtr.add_suppression("santa.claus.ipv6.example.com");
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', 'root'@'2001:db8::6:6';
21 grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
22 grant select on test.* to 'root'@'2001:db8::6:6';
23
24 connect (con1,"::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_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
31
32 connect (con2,"::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,"::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'@'santa.claus.ipv6.example.com';
49 revoke select on test.* from 'root'@'2001:db8::6:6';
50 drop user 'root'@'santa.claus.ipv6.example.com';
51 drop user 'root'@'2001:db8::6:6';
52
53 set global debug= default;
54