403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.163.117
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/rpl/t/rpl_slave_load_in.test
##########################################################################
# This test verifies if a slave is able to process a "LOAD DATA INFILE"
# event while the "--secure-file-priv" option is set.
#
# The test is divided in two steps:
#    1 - Creates tables and populates them through "LOAD DATA INFILE".
#    2 - Compares the master and slave.
#
# === References ===
# Bug#28541204 SECURE-FILE-PRIV BREAKS LOAD DATA INFILE REPLICATION IN
#              STATEMENT MODE ON 5.7.23
##########################################################################

# This test does not work with var being a softlink.
--source include/not_var_link.inc
--source include/have_binlog_format_statement.inc
--source include/master-slave.inc

# Bug#28541204 SECURE-FILE-PRIV BREAKS LOAD DATA INFILE REPLICATION IN
#              STATEMENT MODE ON 5.7.23

--echo # Restart the slave with a different secure path.
--source include/rpl_connection_slave.inc
--let $old_secure_file_path=`SELECT @@GLOBAL.secure_file_priv`
--let $datadir=`SELECT @@GLOBAL.datadir`
--let $include_silent=1
--let $rpl_server_number=2
--let $rpl_server_parameters=--secure-file-priv=$datadir
--source include/rpl_restart_server.inc
--let $include_silent=0

# Assert that @@GLOBAL.secure_file_priv equals @@GLOBAL.datadir
--let $assert_text= Datadir is the new secure file path
--let $assert_cond= "[SELECT @@GLOBAL.secure_file_priv]" = "[SELECT @@GLOBAL.datadir]"
--source include/assert.inc
--source include/start_slave.inc

##########################################################################
#                            Loading data
##########################################################################
--source include/rpl_connection_master.inc

create table t1(a int not null auto_increment, b int, primary key(a)) engine=myisam;
create table t2(a int not null auto_increment, b int, primary key(a)) engine=innodb;

load data infile '../../std_data/rpl_loaddata.dat' into table t1;

start transaction;
  insert into t2(b) values (1);
  insert into t2(b) values (2);
  load data infile '../../std_data/rpl_loaddata.dat' into table t2;
  load data infile '../../std_data/rpl_loaddata.dat' into table t2;
commit;

##########################################################################
#                       Checking Consistency
##########################################################################
--source include/sync_slave_sql_with_master.inc

--echo # Restore the old secure path on slave.
--let $include_silent=1
--let $rpl_server_number=2
--let $rpl_server_parameters=--secure-file-priv=$old_secure_file_path
--source include/rpl_restart_server.inc
--let $include_silent=0

# Assert that @@GLOBAL.secure_file_priv is restored.
--let $assert_text= Old secure file path is restored.
--let $assert_cond= "[SELECT @@GLOBAL.secure_file_priv]" = "$old_secure_file_path"
--source include/assert.inc

--source include/start_slave.inc

let $diff_tables= master:t1, slave:t1;
source include/diff_tables.inc;

let $diff_tables= master:t2, slave:t2;
source include/diff_tables.inc;

##########################################################################
#                             Clean up
##########################################################################
--source include/rpl_connection_master.inc

drop table t1;
drop table t2;

--source include/sync_slave_sql_with_master.inc
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit