maxbinlogcheck update

maxbinlogcheck update
This commit is contained in:
MassimilianoPinto
2015-09-08 17:27:28 +02:00
parent 41ea2849a4
commit 9bfefa95ae
3 changed files with 343 additions and 10 deletions

View File

@ -161,7 +161,12 @@ int main(int argc, char **argv) {
strncpy(path, argv[num_args], PATH_MAX);
if ((fd = open(path, O_RDONLY, 0666)) == -1)
if (fix_file)
fd = open(path, O_RDWR, 0666);
else
fd = open(path, O_RDONLY, 0666);
if (fd == -1)
{
LOGIF(LE, (skygw_log_write(LOGFILE_ERROR,
"Failed to open binlog file %s: %s",