Server IP : 104.21.38.3 / Your IP : 162.158.108.124 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/perfschema/include/ |
Upload File : |
# Tests for the performance schema # ============= # DOCUMENTATION # ============= # Verify how connections are counted into various tables: # - accounts # - users # - hosts # # The tests are written with the following helpers: # - include/connection_setup.inc # - include/connection_load.inc # - include/connection_cleanup.inc # # Helpers are intended to be used as follows. # # A Typical test t/connection_xxx.test will consist of: # --source ../include/connection_setup.inc # --source ../include/connection_load.inc # --source ../include/connection_cleanup.inc # and a t/connection_xxx-master.opt file # # Naming conventions for t/connection_xxx.test are as follows: # t/connection_<account><user><host> # # <account> corresponds to different sizing settings for # the variable performance-schema-accounts-size # - (blank): accounts-size sufficient to represent all records # - 3a: accounts-size set to 3 # - no_a: accounts-size set to 0 # # <user> corresponds to different sizing settings for # the variable performance-schema-users-size # - (blank): users-size sufficient to represent all records # - 3u: users-size set to 3 # - no_u: users-size set to 0 # # <host> corresponds to different sizing settings for # the variable performance-schema-hosts-size # - (blank): hosts-size sufficient to represent all records # - no_h: hosts-size set to 0 # ======================================== # HELPER include/event_aggregate_setup.inc # ======================================== --source include/not_embedded.inc --source include/have_perfschema.inc --source include/no_protocol.inc --source ../include/wait_for_pfs_thread_count.inc --disable_query_log set @orig_sql_mode= @@sql_mode; set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER','')); grant ALL on *.* to user1@localhost; grant ALL on *.* to user2@localhost; grant ALL on *.* to user3@localhost; grant ALL on *.* to user4@localhost; grant ALL on *.* to user5@localhost; set sql_mode= @orig_sql_mode; flush privileges; # Purge old users, hosts, user/host from previous tests truncate table performance_schema.accounts; truncate table performance_schema.users; truncate table performance_schema.hosts; # Save the setup # Start from a known clean state, to avoid noise from previous tests flush tables; flush status; --disable_warnings drop procedure if exists dump_all; --enable_warnings delimiter $$; create procedure dump_all() begin select processlist_user, processlist_host from performance_schema.threads where (processlist_user is not null) and (processlist_host is not null) order by processlist_user; select * from performance_schema.accounts where (user is not null) and (host is not null) order by user, host; select * from performance_schema.users where user is not null order by user; select * from performance_schema.hosts where host is not null order by host; select variable_name, variable_value from information_schema.global_status where variable_name in ('PERFORMANCE_SCHEMA_ACCOUNTS_LOST', 'PERFORMANCE_SCHEMA_USERS_LOST', 'PERFORMANCE_SCHEMA_HOSTS_LOST'); end $$ delimiter ;$$ --enable_query_log