mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
b97083dfc7
Compiling with debug and assigning an invalid directory to --slave-load-tmpdir was crashing the slave due to the following assertion DBUG_ASSERT(! is_set() || can_overwrite_status). This assertion assumes that a thread can change its state once (i.e. ok,error, etc) before aborting, cleaning/resuming or completing its execution unless the overwrite flag (i.e. can_overwrite_status) is true. The Append_block_log_event::do_apply_event which is responsible for creating temporary file(s) was not cleaning the thread state. Thus a failure while trying to create a file in an invalid temporary directory was causing the crash. To fix the problem we check if the temporary directory is valid before starting the SQL Thread and reset the thread state before creating a file in Append_block_log_event::do_apply_event.
50 lines
1.8 KiB
Text
50 lines
1.8 KiB
Text
##########################################################################
|
|
# 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.
|
|
##########################################################################
|
|
--source include/have_innodb.inc
|
|
--source include/master-slave.inc
|
|
|
|
##########################################################################
|
|
# Loading data
|
|
##########################################################################
|
|
connection master;
|
|
|
|
create table t1(a int not null auto_increment, b int, primary key(a));
|
|
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
|
|
##########################################################################
|
|
sync_slave_with_master;
|
|
|
|
let $diff_table_1=master:test.t1;
|
|
let $diff_table_2=slave:test.t1;
|
|
source include/diff_tables.inc;
|
|
|
|
let $diff_table_1=master:test.t2;
|
|
let $diff_table_2=slave:test.t2;
|
|
source include/diff_tables.inc;
|
|
|
|
##########################################################################
|
|
# Clean up
|
|
##########################################################################
|
|
connection master;
|
|
|
|
drop table t1;
|
|
drop table t2;
|
|
|
|
sync_slave_with_master;
|