403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.68.164.134
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/mysql-test/suite/perfschema/include/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/suite/perfschema/include/socket_event_dbg.inc
# include/socket_event.inc
#
# Auxiliary routine
# - running some statement in connection con1
#   and checking the changes for the client_connction" entry belonging to con1
#   within socket_summary_by_instance and
# - checking if the changes to values caused by the statement execution are
#   reasonable and stable
#
# Requirements:
# 1. Have socket_summary_by_instance_func running
# 2. Have a connection con1
#    @con1_object_instance_begin needs to be the OBJECT_INSTANCE_BEGIN
#    value of the "client_connction" entry belonging to con1 within
#    socket_summary_by_instance.
# 3. $statement needs to contain the statement to be executed by con1.
#

let $my_errno= 0;

let $loop_round= 1;
while($loop_round <= $loop_rounds)
{

if (!$my_socket_debug)
{
  --disable_query_log
}

# Collect the current state
#==========================
eval $truncate;
eval $insert_before;

# Run the operation
#==================
if($is_connect)
{
   let $statement= Connect (con1,$connect_host,$connect_user,,$connect_db,,);
   # Some statements fail with ER_ACCESS_DENIED_ERROR
   --disable_abort_on_error
   --connect (con1,$connect_host,$connect_user,,$connect_db,,)
   --enable_abort_on_error
   let $my_errno= $mysql_errno;
}
if(!$is_connect)
{
   --connection con1
   # Print the statement outcome once.
   if($loop_round == 1)
   {
   --enable_query_log
   --enable_result_log
   --horizontal_results
   }
   # One of the statements to be checked is expected to fail with ER_NO_SUCH_TABLE.
   --disable_abort_on_error
   eval $statement;
   --enable_abort_on_error

  if (!$my_socket_debug)
  {
    --disable_query_log
    --disable_result_log
  }
}

# Wait till the operation is really finished. We expect that there will be no
# changes to the statistics of the additional connection after this point of time.
#=================================================================================

--connection default
if($my_errno)
{
   # Wait a bit and hope that the counter maintenence is finished.
   --sleep 3
}
if(!$my_errno)
{
   --source ../include/wait_till_sleep.inc
}

# Various checks
#===============
# 1. Check statistics in general
#-------------------------------
# ../include/socket_summary_check.inc also inserts the 'After' state into
# mysqltest.my_socket_summary_by_instance.
--source ../include/socket_summary_check_dbg.inc

if (!$my_socket_debug)
{
  --disable_query_log
  --disable_result_log
}

if($is_connect)
{
   eval $get_object_instance_begin;
   eval $insert_pseudo_before;
}

eval $insert_delta;
# Correct the values of the columns statement and run
eval
UPDATE mysqltest.socket_summary_by_instance_detail
SET statement = '$statement'
WHERE statement IS NULL;
eval
UPDATE mysqltest.socket_summary_by_instance_detail
SET run = $loop_round
WHERE run IS NULL;

if($is_connect)
{
   if(!$my_errno)
   {
      --connection con1
      --disconnect con1
      --source include/wait_until_disconnected.inc
      --connection default
   }
}
inc $loop_round;

}

--enable_query_log
--enable_result_log


Youez - 2016 - github.com/yon3zu
LinuXploit