⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
mysql
/
mysql-test
/
t
/
View File Name :
server_offline_2.test
# Created: Horst Hunger 2014-05-19 # WL#3836: Method to bring servers off line -- source include/not_embedded.inc -- source include/not_threadpool.inc # test case 2.1.6 1) --disable_warnings SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name LIKE '%offline_mode%'; --enable_warnings # Save the global value to be used to restore the original value. let $global_saved_tmp = `SELECT @@global.offline_mode`; --enable_connect_log # This count may not be 1, because of the probably existing connections # from the previous/parallel test runs let $user_count= `SELECT COUNT(USER) FROM INFORMATION_SCHEMA.PROCESSLIST`; # Create 3 non-super users CREATE USER 'user1'@'localhost'; CREATE USER 'user2'@'localhost'; CREATE USER 'user3'@'localhost'; --connect(conu1,localhost,user1) --connect(conu2,localhost,user2) --connect(conu3,localhost,user3) --connection default SELECT COUNT(USER) FROM INFORMATION_SCHEMA.PROCESSLIST; SHOW STATUS LIKE 'threads_connected'; SET GLOBAL offline_mode = ON; # Wait until all non super user have been disconnected (for slow machines) let $count_sessions= $user_count; --source include/wait_until_count_sessions.inc SELECT COUNT(USER) FROM INFORMATION_SCHEMA.PROCESSLIST; SHOW STATUS LIKE 'threads_connected'; # test case 2.1.1 5) --disconnect default # To remove connect info on client side (mysqltest client). --disconnect conu1 --disable_connect_log --disable_query_log --error ER_SERVER_OFFLINE_MODE --connect(conu1,localhost,user1) --enable_query_log --echo connect(conu1,localhost,user1) --connect(root,localhost,root) --echo connect(root,localhost,root) # Wait until all non super user have been disconnected (for slow machines) let $count_sessions= $user_count; --source include/wait_until_count_sessions.inc SELECT COUNT(USER) FROM INFORMATION_SCHEMA.PROCESSLIST; --echo connect(default,localhost,root) --connect(default,localhost,root) # test case 2.1.6 1) SHOW VARIABLES LIKE '%offline_mode%'; SELECT COUNT(USER) FROM INFORMATION_SCHEMA.PROCESSLIST; SHOW STATUS LIKE 'threads_connected'; # Clean up DROP USER 'user1'@'localhost'; DROP USER 'user2'@'localhost'; DROP USER 'user3'@'localhost'; --echo # Restoring the original values. --eval SET @@global.offline_mode = $global_saved_tmp