403Webshell
Server IP : 112.74.42.100  /  Your IP : 216.73.216.142
Web Server : nginx/1.20.2
System : Linux iZwz96lx4pjqiy84w4hni7Z 5.10.134-17.3.al8.x86_64 #1 SMP Thu Oct 31 14:29:57 CST 2024 x86_64
User : www ( 1000)
PHP Version : 8.0.26
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 : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/mysql-test/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/t/temp_table_debug.test
# Test that checks that we properly delete temporary tables
# on server restart.
#
# This test crashes server on purpose.
# Add includes which are necessary to do this safely.
--source include/have_debug.inc
--source include/not_valgrind.inc
--source include/not_crashrep.inc

# It also requires various storage engines.
--source include/have_archive.inc
--source include/have_blackhole.inc
--source include/have_myisam.inc

# windows does not support symlink
--source include/not_windows.inc

--echo # Create temporary tables in various storage engines.
create temporary table ta (i int not null) engine=archive;
create temporary table tb (i int not null) engine=blackhole;
create temporary table tc (i int not null) engine=csv;
create temporary table th (i int not null) engine=heap;
create temporary table ti (i int not null) engine=innodb;
create temporary table tm (i int not null) engine=myisam;
create temporary table tg (i int not null) engine=merge union=();

--echo # Also manually create files mimicing temporary table files which
--echo # are symlinks to files in data-directory.
let $MYSQLD_DATADIR= `select @@datadir`;
create database mysqltest;
create table mysqltest.t1 (i int not null) engine=myisam;
--exec ln -s $MYSQLD_DATADIR/mysqltest/t1.MYI $MYSQL_TMP_DIR/mysqld.1/#sqlzzzz.MYI
--exec ln -s $MYSQLD_DATADIR/mysqltest/t1.MYD $MYSQL_TMP_DIR/mysqld.1/#sqlzzzz.MYD

--echo # Check files created for them.
--replace_regex /#sql.*\./#sqlXXXX./ /_[0-9]+\.sdi/_XXX.sdi/
--list_files $MYSQL_TMP_DIR/mysqld.1/

--echo # Crash server:
begin;
select * from ti;
--echo # Ask server to crash on next commit.
set session debug="+d,crash_commit_before";
--echo # Write file to make mysql-test-run.pl start up the server again.
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--echo # Crash server.
--error 2013
commit;

--echo # Wait until disconnected.
--source include/wait_until_disconnected.inc

--echo # Check that temporary table files are still around.
--replace_regex /#sql.*\./#sqlXXXX./ /_[0-9]+\.sdi/_XXX.sdi/
--list_files $MYSQL_TMP_DIR/mysqld.1/

--echo # Reconnect.
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect

--echo # Check that temporary table files are gone after restart,
--echo # including symlinks.
--replace_regex /#sql.*\./#sqlXXXX./
--list_files $MYSQL_TMP_DIR/mysqld.1/

--echo # But files in data-directory to which these symlinks were pointing
--echo # should still be around.
--replace_regex /_[0-9]+\.sdi/_XXX.sdi/
--list_files $MYSQLD_DATADIR/mysqltest/
drop database mysqltest;


Youez - 2016 - github.com/yon3zu
LinuXploit