mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +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 client/mysqltest.c: fix to accomodate for new test case mysql-test/mysql-test-run.sh: do not automagically start slave sql/log.cc: support for virtual master sql/log_event.cc: fix for mysqlbinlog sql/log_event.h: fix for mysqlbinlog sql/mysqlbinlog.cc: fix for mysqlbinlog sql/slave.cc: virtual master sql/slave.h: virtual master sql/sql_class.h: clean-up/fixes for virtual master sql/sql_repl.cc: cleanup/fixes for virtual master sql/sql_repl.h: virtual master
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user