Debian Codegraph @

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

raw
1
2 #
3 # Tests for the performance_schema host_cache.
4 #
5 # Simulate failures from DNS:
6 # - getnameinfo() fails with NONAME
7 # - reported in COUNT_NAMEINFO_PERMANENT_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] IP address '2001:db8::6:6' could not be resolved:
16 # Name or service not known
17 call mtr.add_suppression("2001:db8::6:6");
18
19 # Enforce a clean state
20 --source ../include/wait_for_pfs_thread_count.inc
21 --source ../include/hostcache_set_state.inc
22
23 create user 'root'@'2001:db8::6:6';
24 grant select on test.* to 'root'@'2001:db8::6:6';
25
26 connect (con1,"::1",root,,test,$MASTER_MYPORT,);
27 select "Con1 is alive";
28 select current_user();
29 disconnect con1;
30
31 --connection default
32 SET @saved_dbug = @@GLOBAL.debug_dbug;
33 set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
34
35 connect (con2,"::1",root,,test,$MASTER_MYPORT,);
36 select "Con2 is alive";
37 select current_user();
38 disconnect con2;
39
40 --connection default
41 --source ../include/hostcache_dump.inc
42
43 connect (con3,"::1",root,,test,$MASTER_MYPORT,);
44 select "Con3 is alive";
45 select current_user();
46 disconnect con3;
47
48 --connection default
49 --source ../include/hostcache_dump.inc
50
51 revoke select on test.* from 'root'@'2001:db8::6:6';
52 drop user 'root'@'2001:db8::6:6';
53
54 SET @@GLOBAL.debug_dbug = @saved_dbug;
55