AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.213
Web Server : Apache
System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 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 : OFF
Directory :  /www/server/mysql/mysql-test/include/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /www/server/mysql/mysql-test/include/gtid_step_assert_on_retrieved.inc
# ==== Purpose ====
#
# Assert that exactly one GTID (or a specified number) was added to
# the Retrieved_Gtid_Set since last call to gtid_step_reset_on_retrieved.inc
# or gtid_step_assert_on_retrieved.inc
#
# ==== Usage ====
#
# [--let $gtid_step_count= N]
# [--let $gtid_step_only_count= [0|1]]
# [--let $gtid_step_uuid= UUID]
# --source include/gtid_step_assert_on_retrieved.inc
#
# Parameters:
#   $gtid_step_count
#     Assert that N GTIDs were added to the Retrieved_Gtid_Set.
#     If this is not given, the default value is 1.
#
#   $gtid_step_only_count
#     By default, this script checks the numeric component of the
#     GTIDs added to the Retrieved_Gtid_Set to see that the correct
#     number was generated.
#     If this parameter is nonzero, it only counts the number of added
#     GTIDs to see that it is equal to $gtid_step_count, without caring
#     that they were generated in order (or generated on this server).
#
#   $gtid_step_uuid
#     By default, when $gtid_step_count is not set, asserts that the
#     uuid component of all GTIDs added to the Retrieved_Gtid_set
#     is equal to @@GLOBAL.SERVER_UUID.
#     If this parameter is given, uses that UUID instead.
#
# ==== Example ====
#
# # (1) Remember the current position.
# --source include/rpl_connection_slave.inc
# --source include/gtid_step_reset_on_retrieved.inc
# --source include/rpl_connection_master.inc
# CREATE TABLE t1 (a INT);
# # (2) Assert that exactly one GTID was generated since (1).
# --source include/rpl_connection_slave.inc
# --source include/gtid_step_assert_on_retrieved.inc
# --source include/rpl_connection_master.inc
# INSERT INTO t1 VALUES (1);
# INSERT INTO t1 VALUES (2);
# # (3) Assert that exactly 2 GTIDs were generated since (2).
# --let $gtid_step_count= 2
# --source include/rpl_connection_slave.inc
# --source include/gtid_step_assert_on_retrieved.inc
# # (4) Assert that no GTID was generated since (3).
# --let $gtid_step_count= 0
# --source include/gtid_step_assert_on_retrieved.inc

if ($uuidf == '')
{
  --die You must source gtid_utils.inc before using gtid_step_assert_on_retrieved.inc
}

--let $_gtid_step_count= 1
if ($gtid_step_count != '')
{
  --let $_gtid_step_count= $gtid_step_count
}

--let $_gtid_step_only_count= 0
if ($gtid_step_only_count != '')
{
  --let $_gtid_step_only_count= $gtid_step_only_count
}

--let $include_filename= gtid_step_assert_on_retrieved.inc [count=$_gtid_step_count, only_count=$_gtid_step_only_count]
--source include/begin_include_file.inc

--let $_gtid_step_uuid= $gtid_step_uuid
if ($_gtid_step_uuid == '')
{
  --let $_gtid_step_uuid= `SELECT @@GLOBAL.SERVER_UUID`
}

--let $_gsa_extra_debug_eval_old= $extra_debug_eval

--let $local_gtid_set= query_get_value(SHOW SLAVE STATUS, Retrieved_Gtid_Set, 1)
--echo Asserting based on SHOW SLAVE STATUS(Retrieved_Gtid_Set)

--let $extra_debug_eval= "$local_gtid_set", GTID_NEXT_GENERATED_MULTIPLE("$gtid_step_last", "$_gtid_step_uuid", $_gtid_step_count), GTID_SUBTRACT("$local_gtid_set", "$gtid_step_last")

if ($_gtid_step_only_count)
{
  --let $assert_text= Exactly $_gtid_step_count GTIDs should have been retrieved since last invocation
  --let $assert_cond= GTID_COUNT(GTID_SUBTRACT("$local_gtid_set", "$gtid_step_last")) = $_gtid_step_count
  --source include/assert.inc
}
if (!$_gtid_step_only_count)
{
  --let $assert_text= Exactly $_gtid_step_count GTIDs should have been retrieved since last invocation
  --let $assert_cond= GTID_NEXT_GENERATED_MULTIPLE("$gtid_step_last", "$_gtid_step_uuid", $_gtid_step_count) = GTID_SUBTRACT("$local_gtid_set", "$gtid_step_last")
  --source include/assert.inc
}

--let $extra_debug_eval= $_gsa_extra_debug_eval_old

--source include/gtid_step_reset_on_retrieved.inc

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

Anon7 - 2022
AnonSec Team