403Webshell
Server IP : 172.67.216.182  /  Your IP : 104.23.175.16
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/group_replication/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/suite/group_replication/t/gr_random_view_id_generator.test
################################################################################
# BUG#21495778 - VIEW CHANGE ID GENERATION CAN POSSIBLY REPEAT IDS
#
# This test checks that the view_id generated for 100 view_changes do not
# conflict with any of the already existing view_id
#
# It starts/stops the group 100 times and check if the view_id is getting
# repeated.
#
# Test:
# 0. The test requires one server.
# 1. Set bootstrap group ON on member and iterate START and STOP
#    GROUP_REPLICATION 100 times.
# 2. Check for view_ids. View_id should not be repeated.
################################################################################
--source include/big_test.inc
--source include/not_valgrind.inc
--source ../inc/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source ../inc/group_replication.inc
--source ../inc/gr_set_bootstrap_group.inc

--let $iterations_expected=50
--let $iteration_count=0
# disable the logging of the include files since they will just increase the
# size of the result log file.
--let $include_silent=1
while ($iteration_count < $iterations_expected)
{
  --source include/start_group_replication.inc
  --source include/stop_group_replication.inc

  if (!$include_silent)
  {
    --echo ITERATION_COUNT=$iteration_count
  }

  --inc $iteration_count
}
--let $include_silent=0

--let $grep_file=$MYSQLTEST_VARDIR/tmp/random_view_id_generator.err
--let _GP_GREP_FILE= $grep_file
--let _ITERATIONS_EXPECTED= $iterations_expected

--perl
  use strict;
  my $file= $ENV{'_GP_GREP_FILE'} or die "grep_file is not set";
  my $iterations_expected= $ENV{'_ITERATIONS_EXPECTED'} or die "iterations_expected not set";
  open(FILE, "$file") or die("Unable to open $file: $!\n");

  my $pattern= 'Group membership changed to';
  my @view_id;
  my $count= 0;
  my $count_occurence= 0;

  while(<FILE>)
  {
    my $line = $_;
    if ($line =~ /$pattern/)
    {
      my $result = index($line, $pattern);
      my $first = substr($line, $result+length($pattern));
      push(@view_id, $first);
      $count_occurence++;
    }
  }

  if ($count_occurence != $iterations_expected)
  {
    die("Failed to generate the specified number of view_id's: expected: $iterations_expected, observed: $count_occurence \n");
  }

  my @B = sort @view_id;
  my $previous = pop @B;

  foreach my $value (@B)
  {
    if ($previous eq $value)
    {
      $count++;
    }
    $previous = $value;
  }
  print $count ? "View_id repeated.\n" : "View_id not repeated.\n";
  close (FILE) or die "Error closing $file: $!";
EOF

--source ../inc/group_replication_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit