Commit 9990ce57 authored by guilhem@mysql.com's avatar guilhem@mysql.com

Fixed cleanup_load_tmpdir() which deleted nothing.

parent 04e5a6ba
......@@ -168,12 +168,15 @@ static void cleanup_load_tmpdir()
uint i;
if (!(dirp=my_dir(slave_load_tmpdir,MYF(MY_WME))))
return;
char fname[FN_REFLEN];
for (i=0 ; i < (uint)dirp->number_off_files; i++)
{
file=dirp->dir_entry+i;
if (is_prefix(file->name,"SQL_LOAD-"))
my_delete(file->name, MYF(0));
{
fn_format(fname,file->name,slave_load_tmpdir,"",0);
my_delete(fname, MYF(0));
}
}
my_dirend(dirp);
......@@ -813,7 +816,7 @@ Rotate_log_event::Rotate_log_event(const char* buf, int event_len,
int Rotate_log_event::write_data(IO_CACHE* file)
{
char buf[ROTATE_HEADER_LEN];
int8store(buf, pos + R_POS_OFFSET);
int8store(buf + R_POS_OFFSET, pos);
return (my_b_safe_write(file, (byte*)buf, ROTATE_HEADER_LEN) ||
my_b_safe_write(file, (byte*)new_log_ident, (uint) ident_len));
}
......
......@@ -68,9 +68,12 @@ static int fake_rotate_event(NET* net, String* packet, char* log_file_name,
int4store(header + LOG_POS_OFFSET, 0);
packet->append(header, sizeof(header));
/* We need to split the next statement because of problem with cxx */
int4store(buf,position);
int4store(buf+4,0);
/*
An old comment said talked about a need for splitting the int8store below
into 2 int4store because of a problem with cxx; I can't understand that as
we already use int8store in Rotatel_log_event::write_data().
*/
int8store(buf+R_POS_OFFSET,position);
packet->append(buf, ROTATE_HEADER_LEN);
packet->append(p,ident_len);
if (my_net_write(net, (char*)packet->ptr(), packet->length()))
......
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