403Webshell
Server IP : 172.67.216.182  /  Your IP : 108.162.227.120
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/src/mysql-test/suite/innodb/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/innodb/t/innodb_wl6501_crash_8.test
#
# WL#6501: make truncate table atomic
#

# TC tries to hit crash point during truncate of
# non-compressed non-temp table residing in single tablespace.
# with row_format=compact

--source include/have_innodb.inc
--source include/have_debug.inc
--source include/big_test.inc

# Valgrind would complain about memory leaks when we crash on purpose.
--source include/not_valgrind.inc
# Embedded server does not support crashing
--source include/not_embedded.inc
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc

--disable_query_log
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number 2 in a file operation.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot find the path specified.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot open datafile for read-only:");
--enable_query_log

################################################################################
#
# Will test following scenarios:
# 1. Hit crash point while truncate with data-directory option set.
#
################################################################################

#-----------------------------------------------------------------------------
#
# create test-bed
#
let $MYSQL_TMP_DIR = `select @@tmpdir`;
let NEW_DATA_DIR = $MYSQL_TMP_DIR/alt-dir;
let $MYSQL_DATA_DIR = `select @@datadir`;
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err;

#-----------------------------------------------------------------------------
#
# 1. Hit crash point while truncate with data-directory option set.
#
#
--mkdir $NEW_DATA_DIR
--replace_result $NEW_DATA_DIR NEW_DATA_DIR
eval create table t1 (i int, f float)
	engine = innodb data directory = '$NEW_DATA_DIR';
insert into t1 values (1, 1.1), (2, 2.2), (3, 3.3);
--list_files $NEW_DATA_DIR/test t1.ibd
select * from t1;
#
set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
truncate table t1;
#
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
#
select * from t1;
--list_files $NEW_DATA_DIR/test t1.ibd
insert into t1 values (1, 1.1), (2, 2.2), (3, 3.3);
select * from t1;
drop table t1;
#
#
--rmdir $NEW_DATA_DIR/test
--rmdir $NEW_DATA_DIR

Youez - 2016 - github.com/yon3zu
LinuXploit