| 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/have_debug.inc |
| 9 |
|
| 10 |
# Enforce a clean state |
| 11 |
--source ../include/wait_for_pfs_thread_count.inc |
| 12 |
|
| 13 |
# Enforce a clean state |
| 14 |
--source ../include/wait_for_pfs_thread_count.inc |
| 15 |
--source ../include/hostcache_set_state.inc |
| 16 |
|
| 17 |
create user 'user_without'@'santa.claus.ipv4.example.com'; |
| 18 |
create user 'user_with'@'santa.claus.ipv4.example.com' |
| 19 |
identified by 'good_password'; |
| 20 |
grant select on test.* to 'user_without'@'santa.claus.ipv4.example.com'; |
| 21 |
grant select on test.* to 'user_with'@'santa.claus.ipv4.example.com'; |
| 22 |
|
| 23 |
connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,); |
| 24 |
select "Con1 is alive"; |
| 25 |
select current_user(); |
| 26 |
disconnect con1; |
| 27 |
|
| 28 |
--connection default |
| 29 |
set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; |
| 30 |
|
| 31 |
--disable_query_log |
| 32 |
--error ER_ACCESS_DENIED_ERROR |
| 33 |
connect (con2a,"127.0.0.1",user_without,extra_password,test,$MASTER_MYPORT,); |
| 34 |
--enable_query_log |
| 35 |
|
| 36 |
--connection default |
| 37 |
--source ../include/hostcache_dump.inc |
| 38 |
|
| 39 |
--disable_query_log |
| 40 |
--error ER_ACCESS_DENIED_ERROR |
| 41 |
connect (con2b,"127.0.0.1",user_without,extra_password,test,$MASTER_MYPORT,); |
| 42 |
--enable_query_log |
| 43 |
|
| 44 |
--connection default |
| 45 |
--source ../include/hostcache_dump.inc |
| 46 |
|
| 47 |
--disable_query_log |
| 48 |
--error ER_ACCESS_DENIED_ERROR |
| 49 |
connect (con2c,"127.0.0.1",user_with,,test,$MASTER_MYPORT,); |
| 50 |
--enable_query_log |
| 51 |
|
| 52 |
--connection default |
| 53 |
--source ../include/hostcache_dump.inc |
| 54 |
|
| 55 |
--disable_query_log |
| 56 |
--error ER_ACCESS_DENIED_ERROR |
| 57 |
connect (con2d,"127.0.0.1",user_with,,test,$MASTER_MYPORT,); |
| 58 |
--enable_query_log |
| 59 |
|
| 60 |
--connection default |
| 61 |
--source ../include/hostcache_dump.inc |
| 62 |
|
| 63 |
--disable_query_log |
| 64 |
--error ER_ACCESS_DENIED_ERROR |
| 65 |
connect (con2e,"127.0.0.1",user_with,wrong_password,test,$MASTER_MYPORT,); |
| 66 |
--enable_query_log |
| 67 |
|
| 68 |
--connection default |
| 69 |
--source ../include/hostcache_dump.inc |
| 70 |
|
| 71 |
--disable_query_log |
| 72 |
--error ER_ACCESS_DENIED_ERROR |
| 73 |
connect (con2f,"127.0.0.1",user_with,wrong_password,test,$MASTER_MYPORT,); |
| 74 |
--enable_query_log |
| 75 |
|
| 76 |
--connection default |
| 77 |
--source ../include/hostcache_dump.inc |
| 78 |
|
| 79 |
drop user 'user_with'@'santa.claus.ipv4.example.com'; |
| 80 |
drop user 'user_without'@'santa.claus.ipv4.example.com'; |
| 81 |
|
| 82 |
set global debug= default; |
| 83 |
|