Commit 68890fe7 authored by Marko Mäkelä's avatar Marko Mäkelä

Revert part of MDEV-12113

commit 1af8bf39 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.
parent 18f62d94
......@@ -2766,17 +2766,8 @@ innobase_start_or_create_for_mysql(void)
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);
......
......@@ -2852,16 +2852,6 @@ innobase_start_or_create_for_mysql(void)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment