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