1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

fixed race condition in automatic binlog rotation

remove extension from binary log if the user specifies one to avoid
    non-rotatable logs
fixed possible use of unitialized IO_CACHE in debug mode
This commit is contained in:
sasha@mysql.sashanet.com
2001-07-11 19:29:23 -06:00
parent b6273bfce0
commit 21a8aaa29d
5 changed files with 27 additions and 10 deletions

View File

@ -1477,6 +1477,13 @@ static void open_log(MYSQL_LOG *log, const char *hostname,
strmov(strcend(tmp,'.'),extension);
opt_name=tmp;
}
// get rid of extention if the log is binary to avoid problems
if (type == LOG_BIN)
{
char* p = strrchr(opt_name, FN_EXTCHAR);
if (p)
*p = 0;
}
log->open(opt_name,type);
}