1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-28 05:01:24 +03:00

fixed redundant repetition of use db in mysqlbinlog

added support for virtual master ( replicating from a directory with binlogs)
test case for backup/restore with virtual master
This commit is contained in:
sasha@mysql.sashanet.com
2001-04-24 17:39:26 -06:00
parent 1e3df575b9
commit be8f18e020
13 changed files with 262 additions and 46 deletions

View File

@ -132,7 +132,7 @@ static int send_file(THD *thd)
}
static File open_log(IO_CACHE *log, const char *log_file_name,
File open_binlog(IO_CACHE *log, const char *log_file_name,
const char **errmsg)
{
File file;
@ -294,7 +294,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
goto err;
}
if ((file=open_log(&log, log_file_name, &errmsg)) < 0)
if ((file=open_binlog(&log, log_file_name, &errmsg)) < 0)
goto err;
if(pos < 4)
@ -483,7 +483,7 @@ sweepstakes if you report the bug";
// fake Rotate_log event just in case it did not make it to the log
// otherwise the slave make get confused about the offset
if ((file=open_log(&log, log_file_name, &errmsg)) < 0 ||
if ((file=open_binlog(&log, log_file_name, &errmsg)) < 0 ||
fake_rotate_event(net, packet, log_file_name, &errmsg))
goto err;
@ -694,7 +694,12 @@ int change_master(THD* thd)
glob_mi.pos = lex_mi->pos;
if(lex_mi->host)
strmake(glob_mi.host, lex_mi->host, sizeof(glob_mi.host));
{
if(glob_mi.virtual_master)
glob_mi.close_virtual_master();
strmake(glob_mi.host, lex_mi->host, sizeof(glob_mi.host));
glob_mi.virtual_master = (glob_mi.host[0] == FN_LIBCHAR);
}
if(lex_mi->user)
strmake(glob_mi.user, lex_mi->user, sizeof(glob_mi.user));
if(lex_mi->password)