| 1 |
# |
| 2 |
# Verify that query results are the same with and without indexes. |
| 3 |
# |
| 4 |
--source include/have_debug_sync.inc |
| 5 |
|
| 6 |
#setup |
| 7 |
let $select_column = SUM_CONNECT_ERRORS; |
| 8 |
let $table = performance_schema.host_cache; |
| 9 |
|
| 10 |
# Create an entry in the host_cache |
| 11 |
|
| 12 |
# [Warning] IP address '192.0.2.4' could not be resolved: |
| 13 |
# no reverse address mapping. |
| 14 |
call mtr.add_suppression("192.0.2.4"); |
| 15 |
|
| 16 |
--source ../include/hostcache_set_state.inc |
| 17 |
|
| 18 |
CREATE USER 'user4'@'santa.claus.ipv4.example.com'; |
| 19 |
GRANT SELECT ON test.* TO 'user4'@'santa.claus.ipv4.example.com'; |
| 20 |
|
| 21 |
SET global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; |
| 22 |
|
| 23 |
connect (con4, "127.0.0.1", user4, , test, $MASTER_MYPORT,); |
| 24 |
SELECT "Con4 is alive" AS ""; |
| 25 |
SELECT current_user() AS ""; |
| 26 |
disconnect con4; |
| 27 |
|
| 28 |
--connection default |
| 29 |
SET global debug= default; |
| 30 |
|
| 31 |
########################################################################### |
| 32 |
# Test index on IP |
| 33 |
########################################################################### |
| 34 |
|
| 35 |
let $column_count = 1; |
| 36 |
let $col1 = IP; |
| 37 |
let $col1_act = "192.0.2.4"; |
| 38 |
|
| 39 |
--source ../include/idx_explain_test.inc |
| 40 |
|
| 41 |
########################################################################### |
| 42 |
# Test index on HOST |
| 43 |
########################################################################### |
| 44 |
|
| 45 |
let $column_count = 1; |
| 46 |
let $col1 = HOST; |
| 47 |
let $col1_act = "santa.claus.ipv4.example.com"; |
| 48 |
|
| 49 |
--source ../include/idx_explain_test.inc |
| 50 |
|
| 51 |
# Cleanup |
| 52 |
REVOKE SELECT ON test.* FROM 'user4'@'santa.claus.ipv4.example.com'; |
| 53 |
DROP USER 'user4'@'santa.claus.ipv4.example.com'; |