1 2# 3# Tests for the performance_schema host_cache. 4# 5# Simulate failures from SSL: 6# - reported in COUNT_SSL_ERRORS 7 8--source include/not_embedded.inc 9--source include/have_debug.inc 10--source include/have_perfschema.inc 11 12# Enforce a clean state 13--source ../include/wait_for_pfs_thread_count.inc 14--source ../include/hostcache_set_state.inc 15 16create user 'user_ssl'@'santa.claus.ipv4.example.com'; 17create user 'user_ssl_x509'@'santa.claus.ipv4.example.com' 18 identified by 'good_password'; 19grant select on test.* to 'user_ssl'@'santa.claus.ipv4.example.com' 20 REQUIRE SSL; 21grant select on test.* to 'user_ssl_x509'@'santa.claus.ipv4.example.com' 22 REQUIRE SUBJECT '/C=??/ST=??/L=??/ 23 O=No such thing/ 24 CN=Santa Claus/emailAddress=santa.claus@example.com'; 25 26connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,); 27select "Con1 is alive"; 28select current_user(); 29disconnect con1; 30 31--connection default 32set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; 33 34--disable_query_log 35--error ER_ACCESS_DENIED_ERROR 36connect (con2a,"127.0.0.1",user_ssl,,test,$MASTER_MYPORT,); 37--enable_query_log 38 39--connection default 40--source ../include/hostcache_dump.inc 41 42--disable_query_log 43--error ER_ACCESS_DENIED_ERROR 44connect (con2b,"127.0.0.1",user_ssl,,test,$MASTER_MYPORT,); 45--enable_query_log 46 47--connection default 48--source ../include/hostcache_dump.inc 49 50--disable_query_log 51--error ER_ACCESS_DENIED_ERROR 52connect (con2c,"127.0.0.1",user_ssl_x509,good_password,test,$MASTER_MYPORT,,SSL); 53--enable_query_log 54 55--connection default 56--source ../include/hostcache_dump.inc 57 58--disable_query_log 59--error ER_ACCESS_DENIED_ERROR 60connect (con2d,"127.0.0.1",user_ssl_x509,good_password,test,$MASTER_MYPORT,,SSL); 61--enable_query_log 62 63--connection default 64--source ../include/hostcache_dump.inc 65 66drop user 'user_ssl'@'santa.claus.ipv4.example.com'; 67drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com'; 68 69set global debug= default; 70 71