mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	mysql-test/mysql-test-run.pl: Use same location for slave-load-tmpdir in all versions mysql-test/mysql-test-run.sh: Use same location for slave-load-tmpdir in all versions mysql-test/r/rpl_loaddata.result: Update result after changing slave-load-tmpdir to use a shorter path mysql-test/r/rpl_loaddatalocal.result: Update result after changing slave-load-tmpdir to use a shorter path mysql-test/r/rpl_log.result: Update result after changing slave-load-tmpdir to use a shorter path mysql-test/t/rpl_loaddatalocal.test: Use MYSQLTEST_VARDIR when specifying path to load from(backport from 5.0) Use new command "remove_file" instead of s"ystem rm"
		
			
				
	
	
		
			41 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
# See if "LOAD DATA LOCAL INFILE" is well replicated
 | 
						|
# (LOAD DATA LOCAL INFILE is not written to the binlog
 | 
						|
# the same way as LOAD DATA INFILE : Append_blocks are smaller).
 | 
						|
# In MySQL 4.0 <4.0.12 there were 2 bugs with LOAD DATA LOCAL INFILE :
 | 
						|
# - the loaded file was not written entirely to the master's binlog,
 | 
						|
# only the first 4KB, 8KB or 16KB usually.
 | 
						|
# - the loaded file's first line was not written entirely to the
 | 
						|
# master's binlog (1st char was absent)
 | 
						|
source include/master-slave.inc;
 | 
						|
 | 
						|
create table t1(a int);
 | 
						|
let $1=10000;
 | 
						|
disable_query_log;
 | 
						|
set SQL_LOG_BIN=0;
 | 
						|
while ($1)
 | 
						|
{
 | 
						|
#eval means expand $ expressions
 | 
						|
 eval insert into t1 values(1);
 | 
						|
 dec $1;
 | 
						|
}
 | 
						|
set SQL_LOG_BIN=1;
 | 
						|
enable_query_log;
 | 
						|
--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;
 | 
						|
--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;
 | 
						|
select a,count(*) from t1 group by a;
 | 
						|
connection master;
 | 
						|
drop table t1;
 | 
						|
save_master_pos;
 | 
						|
connection slave;
 | 
						|
sync_with_master;
 | 
						|
 | 
						|
# End of 4.1 tests
 |