| 1 |
call mtr.add_suppression("192.0.2.4"); |
| 2 |
flush status; |
| 3 |
TRUNCATE TABLE performance_schema.host_cache; |
| 4 |
flush user_resources; |
| 5 |
flush privileges; |
| 6 |
select @@global.debug; |
| 7 |
@@global.debug |
| 8 |
|
| 9 |
select @@global.max_connect_errors; |
| 10 |
@@global.max_connect_errors |
| 11 |
100 |
| 12 |
select @@global.max_user_connections; |
| 13 |
@@global.max_user_connections |
| 14 |
0 |
| 15 |
select @@global.max_connections; |
| 16 |
@@global.max_connections |
| 17 |
151 |
| 18 |
select `User`, `Host` from mysql.`user` where `host` like '%\\%%'; |
| 19 |
User Host |
| 20 |
select `User`, `Host` from mysql.`user` where `user` like '192.%'; |
| 21 |
User Host |
| 22 |
select `User`, `Host` from mysql.`user` where `user` like '2001:%'; |
| 23 |
User Host |
| 24 |
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%'; |
| 25 |
User Host |
| 26 |
CREATE USER 'user4'@'santa.claus.ipv4.example.com'; |
| 27 |
GRANT SELECT ON test.* TO 'user4'@'santa.claus.ipv4.example.com'; |
| 28 |
SET global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; |
| 29 |
SELECT "Con4 is alive" AS ""; |
| 30 |
|
| 31 |
Con4 is alive |
| 32 |
SELECT current_user() AS ""; |
| 33 |
|
| 34 |
[email protected] |
| 35 |
SET global debug= default; |
| 36 |
|
| 37 |
==================================================================== |
| 38 |
Testing index for columns IP |
| 39 |
==================================================================== |
| 40 |
############ Explain for Query #################################### |
| 41 |
explain select SUM_CONNECT_ERRORS |
| 42 |
from performance_schema.host_cache |
| 43 |
where IP = "impossible"; |
| 44 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 45 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL # NULL no matching row in const table |
| 46 |
############ Explain for Query #################################### |
| 47 |
explain select SUM_CONNECT_ERRORS |
| 48 |
from performance_schema.host_cache |
| 49 |
where IP > "impossible"; |
| 50 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 51 |
1 SIMPLE host_cache NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where |
| 52 |
############ Explain for Query #################################### |
| 53 |
explain select SUM_CONNECT_ERRORS |
| 54 |
from performance_schema.host_cache |
| 55 |
where IP < "2"; |
| 56 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 57 |
1 SIMPLE host_cache NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where |
| 58 |
############ Explain for Query #################################### |
| 59 |
explain select SUM_CONNECT_ERRORS |
| 60 |
from performance_schema.host_cache |
| 61 |
where IP = "192.0.2.4"; |
| 62 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 63 |
1 SIMPLE host_cache NULL const PRIMARY PRIMARY 258 const # 100.00 NULL |
| 64 |
############# Explain End ######################################### |
| 65 |
flush status; |
| 66 |
select SUM_CONNECT_ERRORS |
| 67 |
from performance_schema.host_cache |
| 68 |
where IP = "192.0.2.4"; |
| 69 |
SUM_CONNECT_ERRORS |
| 70 |
# |
| 71 |
OK: handler_read_key incremented |
| 72 |
|
| 73 |
==================================================================== |
| 74 |
Testing index for columns HOST |
| 75 |
==================================================================== |
| 76 |
############ Explain for Query #################################### |
| 77 |
explain select SUM_CONNECT_ERRORS |
| 78 |
from performance_schema.host_cache |
| 79 |
where HOST = "impossible"; |
| 80 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 81 |
1 SIMPLE host_cache NULL ref HOST HOST 258 const # 100.00 NULL |
| 82 |
############ Explain for Query #################################### |
| 83 |
explain select SUM_CONNECT_ERRORS |
| 84 |
from performance_schema.host_cache |
| 85 |
where HOST > "impossible"; |
| 86 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 87 |
1 SIMPLE host_cache NULL ALL HOST NULL NULL NULL # 33.33 Using where |
| 88 |
############ Explain for Query #################################### |
| 89 |
explain select SUM_CONNECT_ERRORS |
| 90 |
from performance_schema.host_cache |
| 91 |
where HOST < "2"; |
| 92 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 93 |
1 SIMPLE host_cache NULL ALL HOST NULL NULL NULL # 33.33 Using where |
| 94 |
############ Explain for Query #################################### |
| 95 |
explain select SUM_CONNECT_ERRORS |
| 96 |
from performance_schema.host_cache |
| 97 |
where HOST = "santa.claus.ipv4.example.com"; |
| 98 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 99 |
1 SIMPLE host_cache NULL ref HOST HOST 258 const # 100.00 NULL |
| 100 |
############# Explain End ######################################### |
| 101 |
flush status; |
| 102 |
select SUM_CONNECT_ERRORS |
| 103 |
from performance_schema.host_cache |
| 104 |
where HOST = "santa.claus.ipv4.example.com"; |
| 105 |
SUM_CONNECT_ERRORS |
| 106 |
# |
| 107 |
OK: handler_read_key incremented |
| 108 |
REVOKE SELECT ON test.* FROM 'user4'@'santa.claus.ipv4.example.com'; |
| 109 |
DROP USER 'user4'@'santa.claus.ipv4.example.com'; |