mirror of
https://github.com/MariaDB/server.git
synced 2025-08-17 06:42:17 +03:00
sorting them by usernames first, and then by get_sort() value. Search functions now use binary search to find the the first entry with given name. Then, linear search is done, until the first match.
194 lines
5.2 KiB
Plaintext
194 lines
5.2 KiB
Plaintext
call mtr.add_suppression("192.0.2.4");
|
|
flush status;
|
|
flush hosts;
|
|
flush user_resources;
|
|
flush privileges;
|
|
select @@global.debug;
|
|
@@global.debug
|
|
|
|
select @@global.max_connect_errors;
|
|
@@global.max_connect_errors
|
|
100
|
|
select @@global.max_user_connections;
|
|
@@global.max_user_connections
|
|
0
|
|
select @@global.max_connections;
|
|
@@global.max_connections
|
|
151
|
|
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
|
|
User Host
|
|
select `User`, `Host` from mysql.`user` where `user` like '192.%';
|
|
User Host
|
|
select `User`, `Host` from mysql.`user` where `user` like '2001:%';
|
|
User Host
|
|
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
|
|
User Host
|
|
create user 'root'@'192.0.2.4';
|
|
grant select on test.* to 'root'@'192.0.2.4';
|
|
create user 'root'@'santa.claus.ipv4.example.com';
|
|
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
|
|
connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
|
|
select "Con1 is alive";
|
|
Con1 is alive
|
|
Con1 is alive
|
|
select current_user();
|
|
current_user()
|
|
root@localhost
|
|
disconnect con1;
|
|
connection default;
|
|
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
|
|
connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
|
|
select "Con2 is alive";
|
|
Con2 is alive
|
|
Con2 is alive
|
|
select current_user();
|
|
current_user()
|
|
root@192.0.2.4
|
|
disconnect con2;
|
|
connection default;
|
|
"Dumping performance_schema.host_cache"
|
|
IP 192.0.2.4
|
|
HOST NULL
|
|
HOST_VALIDATED NO
|
|
SUM_CONNECT_ERRORS 0
|
|
COUNT_HOST_BLOCKED_ERRORS 0
|
|
COUNT_NAMEINFO_TRANSIENT_ERRORS 1
|
|
COUNT_NAMEINFO_PERMANENT_ERRORS 0
|
|
COUNT_FORMAT_ERRORS 0
|
|
COUNT_ADDRINFO_TRANSIENT_ERRORS 0
|
|
COUNT_ADDRINFO_PERMANENT_ERRORS 0
|
|
COUNT_FCRDNS_ERRORS 0
|
|
COUNT_HOST_ACL_ERRORS 0
|
|
COUNT_NO_AUTH_PLUGIN_ERRORS 0
|
|
COUNT_AUTH_PLUGIN_ERRORS 0
|
|
COUNT_HANDSHAKE_ERRORS 0
|
|
COUNT_PROXY_USER_ERRORS 0
|
|
COUNT_PROXY_USER_ACL_ERRORS 0
|
|
COUNT_AUTHENTICATION_ERRORS 0
|
|
COUNT_SSL_ERRORS 0
|
|
COUNT_MAX_USER_CONNECTIONS_ERRORS 0
|
|
COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
|
|
COUNT_DEFAULT_DATABASE_ERRORS 0
|
|
COUNT_INIT_CONNECT_ERRORS 0
|
|
COUNT_LOCAL_ERRORS 0
|
|
COUNT_UNKNOWN_ERRORS 0
|
|
FIRST_ERROR_SEEN set
|
|
LAST_ERROR_SEEN set
|
|
connect con3,"127.0.0.1",root,,test,$MASTER_MYPORT,;
|
|
select "Con3 is alive";
|
|
Con3 is alive
|
|
Con3 is alive
|
|
select current_user();
|
|
current_user()
|
|
root@192.0.2.4
|
|
disconnect con3;
|
|
connection default;
|
|
"Dumping performance_schema.host_cache"
|
|
IP 192.0.2.4
|
|
HOST NULL
|
|
HOST_VALIDATED NO
|
|
SUM_CONNECT_ERRORS 0
|
|
COUNT_HOST_BLOCKED_ERRORS 0
|
|
COUNT_NAMEINFO_TRANSIENT_ERRORS 2
|
|
COUNT_NAMEINFO_PERMANENT_ERRORS 0
|
|
COUNT_FORMAT_ERRORS 0
|
|
COUNT_ADDRINFO_TRANSIENT_ERRORS 0
|
|
COUNT_ADDRINFO_PERMANENT_ERRORS 0
|
|
COUNT_FCRDNS_ERRORS 0
|
|
COUNT_HOST_ACL_ERRORS 0
|
|
COUNT_NO_AUTH_PLUGIN_ERRORS 0
|
|
COUNT_AUTH_PLUGIN_ERRORS 0
|
|
COUNT_HANDSHAKE_ERRORS 0
|
|
COUNT_PROXY_USER_ERRORS 0
|
|
COUNT_PROXY_USER_ACL_ERRORS 0
|
|
COUNT_AUTHENTICATION_ERRORS 0
|
|
COUNT_SSL_ERRORS 0
|
|
COUNT_MAX_USER_CONNECTIONS_ERRORS 0
|
|
COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
|
|
COUNT_DEFAULT_DATABASE_ERRORS 0
|
|
COUNT_INIT_CONNECT_ERRORS 0
|
|
COUNT_LOCAL_ERRORS 0
|
|
COUNT_UNKNOWN_ERRORS 0
|
|
FIRST_ERROR_SEEN set
|
|
LAST_ERROR_SEEN set
|
|
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
|
|
connect con4,"127.0.0.1",root,,test,$MASTER_MYPORT,;
|
|
select "Con4 is alive";
|
|
Con4 is alive
|
|
Con4 is alive
|
|
select current_user();
|
|
current_user()
|
|
root@santa.claus.ipv4.example.com
|
|
disconnect con4;
|
|
connection default;
|
|
"Dumping performance_schema.host_cache"
|
|
IP 192.0.2.4
|
|
HOST santa.claus.ipv4.example.com
|
|
HOST_VALIDATED YES
|
|
SUM_CONNECT_ERRORS 0
|
|
COUNT_HOST_BLOCKED_ERRORS 0
|
|
COUNT_NAMEINFO_TRANSIENT_ERRORS 2
|
|
COUNT_NAMEINFO_PERMANENT_ERRORS 0
|
|
COUNT_FORMAT_ERRORS 0
|
|
COUNT_ADDRINFO_TRANSIENT_ERRORS 0
|
|
COUNT_ADDRINFO_PERMANENT_ERRORS 0
|
|
COUNT_FCRDNS_ERRORS 0
|
|
COUNT_HOST_ACL_ERRORS 0
|
|
COUNT_NO_AUTH_PLUGIN_ERRORS 0
|
|
COUNT_AUTH_PLUGIN_ERRORS 0
|
|
COUNT_HANDSHAKE_ERRORS 0
|
|
COUNT_PROXY_USER_ERRORS 0
|
|
COUNT_PROXY_USER_ACL_ERRORS 0
|
|
COUNT_AUTHENTICATION_ERRORS 0
|
|
COUNT_SSL_ERRORS 0
|
|
COUNT_MAX_USER_CONNECTIONS_ERRORS 0
|
|
COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
|
|
COUNT_DEFAULT_DATABASE_ERRORS 0
|
|
COUNT_INIT_CONNECT_ERRORS 0
|
|
COUNT_LOCAL_ERRORS 0
|
|
COUNT_UNKNOWN_ERRORS 0
|
|
FIRST_ERROR_SEEN set
|
|
LAST_ERROR_SEEN set
|
|
connect con5,"127.0.0.1",root,,test,$MASTER_MYPORT,;
|
|
select "Con5 is alive";
|
|
Con5 is alive
|
|
Con5 is alive
|
|
select current_user();
|
|
current_user()
|
|
root@santa.claus.ipv4.example.com
|
|
disconnect con5;
|
|
connection default;
|
|
"Dumping performance_schema.host_cache"
|
|
IP 192.0.2.4
|
|
HOST santa.claus.ipv4.example.com
|
|
HOST_VALIDATED YES
|
|
SUM_CONNECT_ERRORS 0
|
|
COUNT_HOST_BLOCKED_ERRORS 0
|
|
COUNT_NAMEINFO_TRANSIENT_ERRORS 2
|
|
COUNT_NAMEINFO_PERMANENT_ERRORS 0
|
|
COUNT_FORMAT_ERRORS 0
|
|
COUNT_ADDRINFO_TRANSIENT_ERRORS 0
|
|
COUNT_ADDRINFO_PERMANENT_ERRORS 0
|
|
COUNT_FCRDNS_ERRORS 0
|
|
COUNT_HOST_ACL_ERRORS 0
|
|
COUNT_NO_AUTH_PLUGIN_ERRORS 0
|
|
COUNT_AUTH_PLUGIN_ERRORS 0
|
|
COUNT_HANDSHAKE_ERRORS 0
|
|
COUNT_PROXY_USER_ERRORS 0
|
|
COUNT_PROXY_USER_ACL_ERRORS 0
|
|
COUNT_AUTHENTICATION_ERRORS 0
|
|
COUNT_SSL_ERRORS 0
|
|
COUNT_MAX_USER_CONNECTIONS_ERRORS 0
|
|
COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
|
|
COUNT_DEFAULT_DATABASE_ERRORS 0
|
|
COUNT_INIT_CONNECT_ERRORS 0
|
|
COUNT_LOCAL_ERRORS 0
|
|
COUNT_UNKNOWN_ERRORS 0
|
|
FIRST_ERROR_SEEN set
|
|
LAST_ERROR_SEEN set
|
|
revoke select on test.* from 'root'@'192.0.2.4';
|
|
revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
|
|
drop user 'root'@'192.0.2.4';
|
|
drop user 'root'@'santa.claus.ipv4.example.com';
|
|
set global debug_dbug= default;
|