Use same --slave-load-tmpdir in all versions(backport from 5.0)

parent c5fba0a8
......@@ -3153,10 +3153,6 @@ sub mysqld_arguments ($$$$$) {
# on the server. The path need to have constant length otherwise
# test results will vary, thus a relative path is used.
my $slave_load_path= "../tmp";
if ( $mysql_version_id < 50000 )
{
$slave_load_path= "../../var/tmp";
}
mtr_add_arg($args, "%s--slave-load-tmpdir=%s", $prefix,
$slave_load_path);
mtr_add_arg($args, "%s--socket=%s", $prefix,
......
......@@ -188,7 +188,7 @@ SYST=0
REALT=0
FAST_START=""
MYSQL_TMP_DIR=$MYSQL_TEST_DIR/var/tmp
SLAVE_LOAD_TMPDIR=../../var/tmp #needs to be same length to test logging
SLAVE_LOAD_TMPDIR=../tmp #needs to be same length to test logging
RES_SPACE=" "
MYSQLD_SRC_DIRS="strings mysys include extra regex isam merge myisam \
myisammrg heap sql"
......
......@@ -22,7 +22,7 @@ day id category name
2003-03-22 2416 a bbbbb
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
slave-bin.000001 964
slave-bin.000001 950
drop table t1;
drop table t2;
drop table t3;
......
......@@ -5,9 +5,9 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1(a int);
select * into outfile '../../var/master-data/rpl_loaddatalocal.select_outfile' from t1;
select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1;
truncate table t1;
load data local infile './var/master-data/rpl_loaddatalocal.select_outfile' into table t1;
load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1;
select a,count(*) from t1 group by a;
a count(*)
1 10000
......
......@@ -73,7 +73,7 @@ master-bin.000002 276
start slave;
show binary logs;
Log_name File_size
slave-bin.000001 1285
slave-bin.000001 1278
slave-bin.000002 170
show binlog events in 'slave-bin.000001' from 4;
Log_name Pos Event_type Server_id Orig_log_pos Info
......@@ -84,11 +84,11 @@ slave-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL)
slave-bin.000001 263 Query 1 263 use `test`; drop table t1
slave-bin.000001 311 Query 1 311 use `test`; create table t1 (word char(20) not null)
slave-bin.000001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=581
slave-bin.000001 1065 Exec_load 1 1065 ;file_id=1
slave-bin.000001 1088 Query 1 1088 use `test`; drop table t1
slave-bin.000001 1136 Query 1 1136 use `test`; create table t5 (a int)
slave-bin.000001 1194 Query 1 1194 use `test`; drop table t5
slave-bin.000001 1242 Rotate 2 1242 slave-bin.000002;pos=4
slave-bin.000001 1058 Exec_load 1 1058 ;file_id=1
slave-bin.000001 1081 Query 1 1081 use `test`; drop table t1
slave-bin.000001 1129 Query 1 1129 use `test`; create table t5 (a int)
slave-bin.000001 1187 Query 1 1187 use `test`; drop table t5
slave-bin.000001 1235 Rotate 2 1235 slave-bin.000002;pos=4
show binlog events in 'slave-bin.000002' from 4;
Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000002 4 Query 1 4 use `test`; create table t1 (n int)
......
......@@ -20,11 +20,13 @@ while ($1)
}
set SQL_LOG_BIN=1;
enable_query_log;
select * into outfile '../../var/master-data/rpl_loaddatalocal.select_outfile' from t1;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1;
#This will generate a 20KB file, now test LOAD DATA LOCAL
truncate table t1;
load data local infile './var/master-data/rpl_loaddatalocal.select_outfile' into table t1;
system rm ./var/master-data/rpl_loaddatalocal.select_outfile ;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1;
--remove_file $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile
save_master_pos;
connection slave;
sync_with_master;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment