Debian Codegraph @

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

raw
1 #
2 # Tests for the performance_schema host_cache.
3 #
4 # Simulate failures from DNS:
5 # - getaddrinfo() fails with AGAIN
6 # - reported in COUNT_ADDRINFO_TRANSIENT_ERRORS
7
8 --source include/not_embedded.inc
9 --source include/have_debug.inc
10 --source include/have_perfschema.inc
11 --source include/have_hostname_cache.inc
12
13 # [Warning] Host name 'santa.claus.ipv4.example.com' could not be resolved:
14 # Temporary failure in name resolution
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 @saved_dbug = @@GLOBAL.debug_dbug;
31 set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
32
33 connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
34 select "Con2 is alive";
35 select current_user();
36 disconnect con2;
37
38 --connection default
39 --source ../include/hostcache_dump.inc
40
41 connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
42 select "Con3 is alive";
43 select current_user();
44 disconnect con3;
45
46 --connection default
47 --source ../include/hostcache_dump.inc
48
49 revoke select on test.* from 'root'@'192.0.2.4';
50 drop user 'root'@'192.0.2.4';
51
52 SET @@GLOBAL.debug_dbug = @saved_dbug;
53