Debian Codegraph @

mysql-test/suite/perfschema/t/hostcache_ipv4_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/have_perfschema.inc
11 --source include/have_hostname_cache.inc
12
13 # Enforce a clean state
14 --source ../include/wait_for_pfs_thread_count.inc
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 'user_without'@'santa.claus.ipv4.example.com';
21 create user 'user_with'@'santa.claus.ipv4.example.com'
22 identified by 'good_password';
23 grant select on test.* to 'user_without'@'santa.claus.ipv4.example.com';
24 grant select on test.* to 'user_with'@'santa.claus.ipv4.example.com';
25
26 connect (con1,"127.0.0.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_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
34
35 --disable_query_log
36 --error ER_ACCESS_DENIED_ERROR
37 connect (con2a,"127.0.0.1",user_without,extra_password,test,$MASTER_MYPORT,);
38 --enable_query_log
39
40 --connection default
41 --source ../include/hostcache_dump.inc
42
43 --disable_query_log
44 --error ER_ACCESS_DENIED_ERROR
45 connect (con2b,"127.0.0.1",user_without,extra_password,test,$MASTER_MYPORT,);
46 --enable_query_log
47
48 --connection default
49 --source ../include/hostcache_dump.inc
50
51 --disable_query_log
52 --error ER_ACCESS_DENIED_ERROR
53 connect (con2c,"127.0.0.1",user_with,,test,$MASTER_MYPORT,);
54 --enable_query_log
55
56 --connection default
57 --source ../include/hostcache_dump.inc
58
59 --disable_query_log
60 --error ER_ACCESS_DENIED_ERROR
61 connect (con2d,"127.0.0.1",user_with,,test,$MASTER_MYPORT,);
62 --enable_query_log
63
64 --connection default
65 --source ../include/hostcache_dump.inc
66
67 --disable_query_log
68 --error ER_ACCESS_DENIED_ERROR
69 connect (con2e,"127.0.0.1",user_with,wrong_password,test,$MASTER_MYPORT,);
70 --enable_query_log
71
72 --connection default
73 --source ../include/hostcache_dump.inc
74
75 --disable_query_log
76 --error ER_ACCESS_DENIED_ERROR
77 connect (con2f,"127.0.0.1",user_with,wrong_password,test,$MASTER_MYPORT,);
78 --enable_query_log
79
80 --connection default
81 --source ../include/hostcache_dump.inc
82
83 drop user 'user_with'@'santa.claus.ipv4.example.com';
84 drop user 'user_without'@'santa.claus.ipv4.example.com';
85
86 SET @@GLOBAL.debug_dbug = @saved_dbug;
87