mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
client/mysqltest.c
fixed bug that created empty result files in no-record mode mysql-test/t/rpl000007.test testing non-replication of load data infile when the table is excluded from replication mysql-test/t/rpl000016.test test purge master logs sql/slave.cc fix memory leaks found by purge master logs test sql/sql_repl.cc fixed race condition and delete before close bug in reset_slave() Overall comments - coverage testing is a very good thing!
This commit is contained in:
@ -577,16 +577,22 @@ void reset_slave()
|
||||
{
|
||||
MY_STAT stat_area;
|
||||
char fname[FN_REFLEN];
|
||||
bool slave_was_running = slave_running;
|
||||
|
||||
if(slave_running)
|
||||
stop_slave(0,0);
|
||||
bool slave_was_running ;
|
||||
|
||||
pthread_mutex_lock(&LOCK_slave);
|
||||
if((slave_was_running = slave_running))
|
||||
{
|
||||
pthread_mutex_unlock(&LOCK_slave);
|
||||
stop_slave(0,0);
|
||||
}
|
||||
else
|
||||
pthread_mutex_unlock(&LOCK_slave);
|
||||
|
||||
end_master_info(&glob_mi);
|
||||
fn_format(fname, master_info_file, mysql_data_home, "", 4+16+32);
|
||||
if(my_stat(fname, &stat_area, MYF(0)))
|
||||
if(my_delete(fname, MYF(MY_WME)))
|
||||
return;
|
||||
end_master_info(&glob_mi);
|
||||
if(slave_was_running)
|
||||
start_slave(0,0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user