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-bug21335821.test
--source include/big_test.inc
--source include/not_embedded.inc
--source include/have_no_undo_tablespaces.inc
--source include/have_validate_password_plugin.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 BOOTSTRAP_SQL=$MYSQL_TMP_DIR/tiny_bootstrap.sql;

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

--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 #
--echo # Try --initialize with --init-file [UN]INSTALL PLUGIN
--echo #

--echo # Create the bootstrap file
--perl
  use strict;
  my $bootstrap_file= $ENV{'BOOTSTRAP_SQL'} or die;
  open(OUT_FILE, "> $bootstrap_file") or die;

  print OUT_FILE "INSTALL PLUGIN validate_password SONAME '" or die;
  print OUT_FILE $ENV{'VALIDATE_PASSWORD'} or die;
  print OUT_FILE "';\n" or die;

  print OUT_FILE "CREATE TABLE mysql.t1 AS SELECT * FROM INFORMATION_SCHEMA.plugins;\n" or die;
  print OUT_FILE "UNINSTALL PLUGIN validate_password;\n" or die;

  print OUT_FILE "INSTALL PLUGIN validate_password SONAME '" or die;
  print OUT_FILE $ENV{'VALIDATE_PASSWORD'} or die;
  print OUT_FILE "';\n" or die;

  print OUT_FILE "CREATE DATABASE test;\n" or die;

  close(OUT_FILE);
EOF

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

--echo # Restart the server against DDIR
--exec echo "restart:--datadir=$DDIR $VALIDATE_PASSWORD_OPT" > $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);

--echo # Check the status of the plugin as loaded by --init-file
SELECT PLUGIN_STATUS FROM mysql.t1
  WHERE PLUGIN_NAME = 'validate_password';

--echo # Check the current status of the plugin
SELECT PLUGIN_STATUS FROM INFORMATION_SCHEMA.plugins
  WHERE PLUGIN_NAME = 'validate_password';

--echo # must work as the plugin must be loaded at startup
UNINSTALL PLUGIN validate_password;

--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 # close the test connection
connection default;
disconnect root_con;

--echo # delete mysqld log
remove_file $MYSQLD_LOG;

--echo # delete datadir
--perl
use File::Path 'rmtree';
$DDIR=$ENV{"DDIR"};
rmtree([ "$DDIR" ]);
EOF

--echo # delete the bootsrap file
remove_file $BOOTSTRAP_SQL;


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

--echo # End of 5.7 tests

Anon7 - 2022
AnonSec Team