Revert part of MDEV-12113

commit 1af8bf39ca2513bfdf43a55af0b6af10d32dcebb added unnecessary
calls to fil_write_flushed_lsn() during redo log resizing at
InnoDB server startup.

Because fil_write_flushed_lsn() is neither redo-logged nor doublewrite
buffered, the call is risky and should be avoided, because if the
server killed during the write call, the whole InnoDB instance can
become inaccessible (corrupted page 0 in the system tablespace).

In the best case, this call might prevent a diagnostic message from
being emitted to the error log on the next startup.
This commit is contained in:
Marko Mäkelä 2017-06-06 15:24:43 +03:00
parent 18f62d94d6
commit 68890fe7d4
2 changed files with 2 additions and 21 deletions

View File

@ -2766,17 +2766,8 @@ files_checked:
return(err);
}
/* create_log_files() can increase system lsn that is
why FIL_PAGE_FILE_FLUSH_LSN have to be updated */
flushed_lsn = log_get_lsn();
err = fil_write_flushed_lsn(flushed_lsn);
if (err == DB_SUCCESS) {
err = create_log_files_rename(
logfilename, dirnamelen,
flushed_lsn, logfile0);
}
err = create_log_files_rename(logfilename, dirnamelen,
log_get_lsn(), logfile0);
if (err != DB_SUCCESS) {
return(err);

View File

@ -2852,16 +2852,6 @@ files_checked:
return(err);
}
/* create_log_files() can increase system lsn that is
why FIL_PAGE_FILE_FLUSH_LSN have to be updated */
flushed_lsn = log_get_lsn();
err = fil_write_flushed_lsn(flushed_lsn);
if (err != DB_SUCCESS) {
return(err);
}
err = create_log_files_rename(logfilename, dirnamelen,
log_get_lsn(), logfile0);