1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel

into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
This commit is contained in:
jani@ua141d10.elisa.omakaista.fi
2007-03-29 17:27:42 +03:00
41 changed files with 1017 additions and 348 deletions

View File

@ -1101,7 +1101,7 @@ static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
uint logname_len;
NET* net;
int error= 0;
my_off_t old_off= start_position_mot;
my_off_t old_off= min(start_position_mot, BIN_LOG_HEADER_SIZE);
char fname[FN_REFLEN+1];
DBUG_ENTER("dump_remote_log_entries");
@ -1164,7 +1164,7 @@ could be out of memory");
}
if (len < 8 && net->read_pos[0] == 254)
break; // end of data
DBUG_PRINT("info",( "len: %lu, net->read_pos[5]: %d\n",
DBUG_PRINT("info",( "len: %lu net->read_pos[5]: %d\n",
len, net->read_pos[5]));
if (!(ev= Log_event::read_log_event((const char*) net->read_pos + 1 ,
len - 1, &error_msg,
@ -1253,10 +1253,17 @@ could be out of memory");
}
}
/*
Let's adjust offset for remote log as for local log to produce
similar text.
Let's adjust offset for remote log as for local log to produce
similar text and to have --stop-position to work identically.
Exception - the server sends Format_description_log_event
in the beginning of the dump, and only after it the event from
start_position. Let the old_off reflect it.
*/
old_off+= len-1;
if (old_off < start_position_mot)
old_off= start_position_mot;
else
old_off+= len-1;
}
err: