| 1 |
# |
| 2 |
# Tests for the performance_schema host_cache. |
| 3 |
# |
| 4 |
# Test authorization with auth plugins. |
| 5 |
# error reporting in: |
| 6 |
# - column COUNT_AUTH_PLUGIN_ERRORS |
| 7 |
# - column COUNT_PROXY_USER_ERRORS |
| 8 |
# - column COUNT_PROXY_USER_ACL_ERRORS |
| 9 |
|
| 10 |
source include/not_embedded.inc; |
| 11 |
source include/have_debug.inc; |
| 12 |
source include/have_perfschema.inc; |
| 13 |
source include/have_plugin_auth.inc; |
| 14 |
source include/have_hostname_cache.inc; |
| 15 |
|
| 16 |
if (!$AUTH_ED25519_SO) { |
| 17 |
skip No auth_ed25519 plugin; |
| 18 |
} |
| 19 |
install soname 'auth_ed25519'; |
| 20 |
|
| 21 |
# Enforce a clean state |
| 22 |
source ../include/wait_for_pfs_thread_count.inc; |
| 23 |
source ../include/hostcache_set_state.inc; |
| 24 |
|
| 25 |
create user plug1@'santa.claus.ipv4.example.com' |
| 26 |
identified with ed25519; |
| 27 |
update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'foo') where user='plug1'; |
| 28 |
flush privileges; |
| 29 |
|
| 30 |
create user plug2@'santa.claus.ipv4.example.com' |
| 31 |
identified with ED25519 as 'vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI'; |
| 32 |
|
| 33 |
set @saved_dbug = @@global.debug_dbug; |
| 34 |
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; |
| 35 |
|
| 36 |
replace_result $MASTER_MYPORT PORT $MASTER_MYSOCK SOCKET; |
| 37 |
error ER_ACCESS_DENIED_ERROR; |
| 38 |
connect con1, 127.0.0.1, plug1,foo,,$MASTER_MYPORT; |
| 39 |
source ../include/hostcache_dump.inc; |
| 40 |
|
| 41 |
replace_result $MASTER_MYPORT PORT $MASTER_MYSOCK SOCKET; |
| 42 |
error ER_ACCESS_DENIED_ERROR; |
| 43 |
connect con1, 127.0.0.1, plug2,bar,,$MASTER_MYPORT; |
| 44 |
source ../include/hostcache_dump.inc; |
| 45 |
|
| 46 |
connect con1, 127.0.0.1, plug2,foo,,$MASTER_MYPORT; |
| 47 |
select current_user(); |
| 48 |
disconnect con1; |
| 49 |
connection default; |
| 50 |
source ../include/hostcache_dump.inc; |
| 51 |
|
| 52 |
drop user plug1@'santa.claus.ipv4.example.com'; |
| 53 |
drop user plug2@'santa.claus.ipv4.example.com'; |
| 54 |
|
| 55 |
set @@global.debug_dbug = @saved_dbug; |
| 56 |
uninstall plugin ed25519; |