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/initialize_gtid.test
# ==== Purpose ====
#
# This test will initialize a new instance of a mysql server enabling binary
# logging and GTID features. After the server initialization, the test case
# will connect to the new server and no GTIDs are expected to be generated
# during the initialization (GTID_EXECUTED should be empty) except from the
# statements in the initialization file.
#
# ==== Related Bugs and Worklogs ====
#
# Bug#22102456 ENABLING GTID AT STARTUP RESULTS IN UNNECESSARY GTID SETS
#

--source include/not_embedded.inc
--source include/have_no_undo_tablespaces.inc

--let BASEDIR= `select @@basedir`
--let DDIR=$MYSQL_TMP_DIR/installdb_test
--let MYSQLD_LOG=$MYSQL_TMP_DIR/server.log
--let extra_args=--no-defaults --console --log-syslog=0 --loose-skip-auto_generate_certs --loose-skip-sha256_password_auto_generate_rsa_keys --skip-ssl --basedir=$BASEDIR --lc-messages-dir=$MYSQL_SHAREDIR
--let init_args=--explicit_defaults_for_timestamp --gtid-mode=on --enforce-gtid-consistency=on --log-bin=mysql-bin --server-id=1
--let BOOTSTRAP_SQL=$MYSQL_TMP_DIR/tiny_bootstrap.sql

# We don't care about innodb warnings at this point
CALL mtr.add_suppression("InnoDB:");
USE mysql;

--echo # Create bootstrap file
write_file $BOOTSTRAP_SQL;
CREATE DATABASE test;
CREATE TABLE test.t1(a INT) ENGINE=innodb;
BEGIN;
INSERT INTO test.t1 VALUES (1);
COMMIT;
SET sql_log_bin= 0;
BEGIN;
INSERT INTO test.t1 VALUES (2);
COMMIT;
SET sql_log_bin= 1;
DROP TABLE test.t1;
DROP DATABASE test;
EOF

--echo # Shut server down
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
--echo # Server is down

--echo # Run the server with:
--echo #   --initialize-insecure
--echo #   $init_args
--exec $MYSQLD $extra_args --initialize-insecure --datadir=$DDIR $init_args --init-file=$BOOTSTRAP_SQL > $MYSQLD_LOG 2>&1

--echo # Restart the server against DDIR
--exec echo "restart:--datadir=$DDIR $init_args" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc

--echo # Connect as root
connect(root_con,localhost,root,,mysql);

--let $master_uuid= `SELECT @@GLOBAL.SERVER_UUID`
--let $assert_text= GTID_EXECUTED should have only the 5 GTIDs from the init-file
--let $assert_cond= @@GLOBAL.GTID_EXECUTED = "$master_uuid:1-5"
--source include/assert.inc

--echo # Clean up
# Shut server down
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc

# Delete mysqld log and init file
remove_file $MYSQLD_LOG;
# Delete datadir
--perl
use File::Path 'rmtree';
$DDIR=$ENV{"DDIR"};
rmtree([ "$DDIR" ]);
EOF

remove_file $BOOTSTRAP_SQL;

--echo # Restarting the server after cleaning it up
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc

Anon7 - 2022
AnonSec Team