Server IP : 172.67.216.182 / Your IP : 162.158.163.135 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/rpl/t/ |
Upload File : |
# ==== Purpose ==== # # This test verifies if the slave fails gracefully when the temporary # file used to load data is removed while it is about to be used. # Similar errors are caught if the temporary directory is removed. # # ==== Implementation ==== # # Steps: # 0 - Set debug variable remove_slave_load_file_before_write. This # causes the slave to remove the file. # 1 - Creates a table and populates it through "LOAD DATA INFILE". # 2 - Catches error. # # ==== References ==== # # BUG#42861: Assigning invalid directories to --slave-load-tmpdir crashes the slave # BUG#11872422: rpl_slave_load_remove_tmpfile fails sporadically in pb2 --source include/not_group_replication_plugin.inc --source include/have_binlog_format_statement.inc --source include/have_innodb.inc --source include/have_debug.inc --source include/not_embedded.inc --source include/master-slave.inc ########################################################################## # Loading data ########################################################################## connection slave; --let $old_debug= `SELECT @@GLOBAL.DEBUG` SET @@GLOBAL.DEBUG = '+d,remove_slave_load_file_before_write'; connection master; create table t1(a int not null auto_increment, b int, primary key(a)) engine=innodb; start transaction; insert into t1(b) values (1); insert into t1(b) values (2); load data infile '../../std_data/rpl_loaddata.dat' into table t1; commit; ########################################################################## # Catch Error ########################################################################## connection slave; # windows and linux different error numbers here: # Windows: # - Last_Errno 29 (File not found) # Unix like OS: # - Last_Errno 13 (Can't stat file) # - Last_Errno 1290 (When datadir was set to a symlink when the load # data file is removed the server won't be able to # resolve the realpath, ending up stating that we # have a mismatch) call mtr.add_suppression("LOAD DATA INFILE in the slave SQL Thread can only read from --slave-load-tmpdir"); call mtr.add_suppression("The MySQL server is running with the --slave-load-tmpdir option so it cannot execute this statement.*Error_code: 1290"); --let $slave_sql_errno= 29, 13, 1290 --source include/wait_for_slave_sql_error.inc ########################################################################## # Clean up ########################################################################## connection master; drop table t1; --source include/sync_slave_io_with_master.inc --source include/stop_slave_io.inc RESET SLAVE; drop table t1; call mtr.add_suppression("Slave: Can't get stat of .*"); call mtr.add_suppression("Slave SQL for channel '': .*Error .Can.t get stat of.* Error_code: 13"); call mtr.add_suppression("Slave.*: File.* not found.*"); call mtr.add_suppression("Slave.*: .*Error .File.* not found.* Error_code: 29"); call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); --let $rpl_only_running_threads= 1 eval SET @@GLOBAL.DEBUG = '$old_debug'; --source include/rpl_end.inc