Debian Codegraph @

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

raw
1
2 #
3 # Tests for the performance_schema host_cache.
4 #
5 # Simulate failures from user authentication:
6 # - reported in COUNT_AUTHENTICATION_ERRORS
7
8 --source include/not_embedded.inc
9 --source include/have_debug.inc
10 --source include/check_ipv6.inc
11 --source include/have_perfschema.inc
12 --source include/have_hostname_cache.inc
13
14 # Enforce a clean state
15 --source ../include/wait_for_pfs_thread_count.inc
16 --source ../include/hostcache_set_state.inc
17
18 create user 'user_without'@'santa.claus.ipv6.example.com';
19 create user 'user_with'@'santa.claus.ipv6.example.com'
20 identified by 'good_password';
21 grant select on test.* to 'user_without'@'santa.claus.ipv6.example.com';
22 grant select on test.* to 'user_with'@'santa.claus.ipv6.example.com';
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 @saved_dbug = @@GLOBAL.debug_dbug;
31 set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
32
33 --disable_query_log
34 --error ER_ACCESS_DENIED_ERROR
35 connect (con2a,"::1",user_without,extra_password,test,$MASTER_MYPORT,);
36 --enable_query_log
37
38 --connection default
39 --source ../include/hostcache_dump.inc
40
41 --disable_query_log
42 --error ER_ACCESS_DENIED_ERROR
43 connect (con2b,"::1",user_without,extra_password,test,$MASTER_MYPORT,);
44 --enable_query_log
45
46 --connection default
47 --source ../include/hostcache_dump.inc
48
49 --disable_query_log
50 --error ER_ACCESS_DENIED_ERROR
51 connect (con2c,"::1",user_with,,test,$MASTER_MYPORT,);
52 --enable_query_log
53
54 --connection default
55 --source ../include/hostcache_dump.inc
56
57 --disable_query_log
58 --error ER_ACCESS_DENIED_ERROR
59 connect (con2d,"::1",user_with,,test,$MASTER_MYPORT,);
60 --enable_query_log
61
62 --connection default
63 --source ../include/hostcache_dump.inc
64
65 --disable_query_log
66 --error ER_ACCESS_DENIED_ERROR
67 connect (con2e,"::1",user_with,wrong_password,test,$MASTER_MYPORT,);
68 --enable_query_log
69
70 --connection default
71 --source ../include/hostcache_dump.inc
72
73 --disable_query_log
74 --error ER_ACCESS_DENIED_ERROR
75 connect (con2f,"::1",user_with,wrong_password,test,$MASTER_MYPORT,);
76 --enable_query_log
77
78 --connection default
79 --source ../include/hostcache_dump.inc
80
81 drop user 'user_with'@'santa.claus.ipv6.example.com';
82 drop user 'user_without'@'santa.claus.ipv6.example.com';
83
84 SET @@GLOBAL.debug_dbug = @saved_dbug;
85