Server IP : 172.67.216.182 / Your IP : 108.162.227.108 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 : |
############### suite/perfschema/include/show_aggregate.inc #################### # # # Gather status by thread, by user, by host, by account and global. # # # ################################################################################ --echo #================= --echo # Global results --echo #================= USE test; UPDATE test.status_results sr, performance_schema.global_status sg SET sr.stop = sg.variable_value WHERE sr.variable_name = sg.variable_name AND sg.variable_name IN ('handler_delete', 'handler_rollback'); --echo --echo # Global deltas: END - START. UPDATE test.status_results sr SET sr.delta = sr.stop - sr.start; #--echo DEBUG #SELECT * FROM test.status_results; #SELECT * from performance_schema.global_status where variable_name in ('handler_delete', 'handler_rollback'); --echo #================= --echo # Status by thread --echo #================= --echo # Thread results from CON1. UPDATE test.status_results sr, performance_schema.status_by_thread sbt SET sr.t1 = sbt.variable_value WHERE sr.variable_name = sbt.variable_name AND sbt.variable_name IN ('handler_delete', 'handler_rollback') AND sbt.thread_id = @con1_id; --echo --echo # Thread results from CON2. UPDATE test.status_results sr, performance_schema.status_by_thread sbt SET sr.t2 = sbt.variable_value WHERE sr.variable_name = sbt.variable_name AND sbt.variable_name IN ('handler_delete', 'handler_rollback') AND sbt.thread_id = @con2_id; --echo --echo # Thread results from CON3. UPDATE test.status_results sr, performance_schema.status_by_thread sbt SET sr.t3 = sbt.variable_value WHERE sr.variable_name = sbt.variable_name AND sbt.variable_name IN ('handler_delete', 'handler_rollback') AND sbt.thread_id = @con3_id; --echo --echo # Thread totals for 3 connections. UPDATE test.status_results sr SET sr.thread = sr.t1 + sr.t2 + sr.t3; --echo #================= --echo # Status by user --echo #================= --echo # User1 UPDATE test.status_results sr, performance_schema.status_by_user sbu SET sr.u1 = sbu.variable_value WHERE sr.variable_name = sbu.variable_name AND sbu.variable_name IN ('handler_delete', 'handler_rollback') AND sbu.user IN ('user1'); --echo --echo # User2 UPDATE test.status_results sr, performance_schema.status_by_user sbu SET sr.u2 = sbu.variable_value WHERE sr.variable_name = sbu.variable_name AND sbu.variable_name IN ('handler_delete', 'handler_rollback') AND sbu.user IN ('user2'); --echo --echo # User3 UPDATE test.status_results sr, performance_schema.status_by_user sbu SET sr.u3 = sbu.variable_value WHERE sr.variable_name = sbu.variable_name AND sbu.variable_name IN ('handler_delete', 'handler_rollback') AND sbu.user IN ('user3'); --echo --echo # Status totals for 3 users. UPDATE test.status_results sr SET sr.user = sr.u1 + sr.u2 + sr.u3; --echo #=========================== --echo # Status by host (localhost) --echo #=========================== --echo --echo # host1 = localhost UPDATE test.status_results sr, performance_schema.status_by_host sbh SET sr.h1 = sbh.variable_value WHERE sr.variable_name = sbh.variable_name AND sbh.variable_name IN ('handler_delete', 'handler_rollback') AND sbh.host IN ('localhost'); --echo --echo # Status totals for 'localhost' only. UPDATE test.status_results sr SET sr.host = sr.h1 + sr.h2 + sr.h3; --echo #================== --echo # Status by account --echo #================== --echo # User1@localhost UPDATE test.status_results sr, performance_schema.status_by_account sba SET sr.a1 = sba.variable_value WHERE sr.variable_name = sba.variable_name AND sba.variable_name IN ('handler_delete', 'handler_rollback') AND sba.user IN ('user1'); --echo --echo # User2@localhost UPDATE test.status_results sr, performance_schema.status_by_account sba SET sr.a2 = sba.variable_value WHERE sr.variable_name = sba.variable_name AND sba.variable_name IN ('handler_delete', 'handler_rollback') AND sba.user IN ('user2'); --echo --echo # User3@localhost UPDATE test.status_results sr, performance_schema.status_by_account sba SET sr.a3 = sba.variable_value WHERE sr.variable_name = sba.variable_name AND sba.variable_name IN ('handler_delete', 'handler_rollback') AND sba.user IN ('user3'); --echo --echo --echo # Status totals for 3 accounts. UPDATE test.status_results sr SET sr.acct = sr.a1 + sr.a2 + sr.a3; #--echo DEBUG #SELECT * FROM test.status_results;